Am 15.04.2017 um 18:02 schrieb Malte Meyn:
Am 15.04.2017 um 17:32 schrieb Marc Hohl:
Hi list,
I am working on a little piece that's played as written;
after that, the musician has to turn the page upside down and play the
resulting notes.
I managed to get the clef displayed at the beginning and the end of each
line, and I can flip the clef ;-)
Unfortunately, overriding the Clef.stencil at the end of the line
changes the apperance for the clef in the next line, too.
You need before-line-breaking here so you can use the function
ly:item-break-dir:
\override Clef.before-line-breaking =
#(lambda (grob)
(if (equal? (ly:item-break-dir grob) LEFT)
(ly:grob-set-property! grob 'stencil
(lambda (grobb)
(grob-interpret-markup grobb
#{ \markup \translate #'(0 . 2) \flip \musicglyph
#"clefs.G" #})))))
Thanks a lot! Just for clarification: after-line-breaking seems to work
here, too – is there a special reason to use before-line-breaking?
I added the translate in the markup to bring the clef to the correct
vertical position.
Yep – I removed it for MWE reasons :)
Cheers,
Marc
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user