Hi Joram, 2015-05-26 14:46 GMT+02:00 Noeck <noeck.marb...@gmx.de>:
> Dear Pierre, > > thanks for looking into this. However, I don't understand what you tell > me here. If I run your code, I see that it does *not* automatically > scale the brace but it is rather odd: too small or too big. > > Cheers, > Joram > See: 2015-04-26 23:42 GMT+02:00 Nathan Ho <when.possi...@gmail.com>: > For some reason this solution doesn't automatically center the bracket > perfectly, but it's a start. > So I slightly change Nathan's code so that it 'centers' automatically, no matter what scaling is (crazy scalings were just to show up). As far as I understood, brace scale setting depends on you, doesn't it? E.g. #0.99 : %% => http://lilypond.1069038.n5.nabble.com/Height-of-start-bar-brace-td175422.html \version "2.19.16" \new PianoStaff \with { \override SystemStartBrace.stencil = #(lambda (grob) (let* ((scale-amount 0.99) (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.99) (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.99) (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.99) (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
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user