lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Height of start bar brace


From: Pierre Perol-Schneider
Subject: Re: Height of start bar brace
Date: Sun, 24 May 2015 12:31:19 +0200

Hi Joram,
Hi Nathan,

This seems to work automatically:

\version "2.19.20"

\new PianoStaff
  \with {
    \override SystemStartBrace.stencil =
      #(lambda (grob)
         (let* ((scale-amount 0.2)
                (stil (ly:system-start-delimiter::print grob))
                (scaled-stil (ly:stencil-scale stil scale-amount scale-amount))
                (extent (ly:stencil-extent stil Y))
                (height (- (cdr extent) (car extent))))
           (ly:stencil-translate-axis
             scaled-stil
               (* -0.5 (- 1 scale-amount) (+ height 3.5))
             Y)))
  } 
  <<
    \new Staff {c'1 }
    \new Staff { c'''1 }
  >>

\new PianoStaff
  \with {
    \override SystemStartBrace.stencil =
      #(lambda (grob)
         (let* ((scale-amount 0.5)
                (stil (ly:system-start-delimiter::print grob))
                (scaled-stil (ly:stencil-scale stil scale-amount scale-amount))
                (extent (ly:stencil-extent stil Y))
                (height (- (cdr extent) (car extent))))
           (ly:stencil-translate-axis
             scaled-stil
               (* -0.5 (- 1 scale-amount) (+ height 3.5))
             Y)))
  }
  <<
    \new Staff { c1 }
    \new Staff { c''''1 }
  >>

\new PianoStaff
  \with {
    \override SystemStartBrace.stencil =
      #(lambda (grob)
         (let* ((scale-amount 0.9)
                (stil (ly:system-start-delimiter::print grob))
                (scaled-stil (ly:stencil-scale stil scale-amount scale-amount))
                (extent (ly:stencil-extent stil Y))
                (height (- (cdr extent) (car extent))))
           (ly:stencil-translate-axis
             scaled-stil
               (* -0.5 (- 1 scale-amount) (+ height 3.5))
             Y)))
  }
  <<
    \new Staff { c,1 }
    \new Staff { c'''''1 }
  >>

\new PianoStaff
  \with {
    \override SystemStartBrace.stencil =
      #(lambda (grob)
         (let* ((scale-amount 1.5)
                (stil (ly:system-start-delimiter::print grob))
                (scaled-stil (ly:stencil-scale stil scale-amount scale-amount))
                (extent (ly:stencil-extent stil Y))
                (height (- (cdr extent) (car extent))))
           (ly:stencil-translate-axis
             scaled-stil
               (* -0.5 (- 1 scale-amount) (+ height 3.5))
             Y)))
  }
  <<
    \new Staff { c,,1 }
    \new Staff { c''''''1 }
  >>


Cheers,
Pierre


2015-04-27 9:26 GMT+02:00 Noeck <address@hidden>:
Thanks, Nathan, that works.

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user


reply via email to

[Prev in Thread] Current Thread [Next in Thread]