Am 22.03.2014 12:43, schrieb MING TSANG:
Hi, lilyponders,
How can I combine the nrS nbS into one by passing color parameter ( red, blue
or green)?
Is there a Dots #'layer in lily?
\version "2.19.3"
nrS = { \override NoteHead #'layer = #2
\override NoteHead.color = #red
\override Stem.color = #red
\override Beam.color = #red
\override Tie #'color = #red
\override Slur.color = #red
\override Dots #'layer = #2
\override Dots #'color = #red
\override Rest.color = #red
}
nbS = { \override NoteHead #'layer = #2
\override NoteHead.color = #blue
\override Stem.color = #blue
\override Beam.color = #blue
\override Tie #'color = #blue
\override Slur.color = #blue
\override Dots #'layer = #2
\override Dots #'color = #blue
\override Rest.color = #blue
}
Thank you.
Emmanuel,
Ming.
nS =
#(define-music-function (parser location color)(color?)
#{
\override NoteHead #'layer = #2
\override NoteHead.color = $color
\override Stem.color = #blue
\override Beam.color = #blue
\override Tie #'color = #blue
\override Slur.color = #blue
\override Dots #'layer = #2
\override Dots #'color = #blue
\override Rest.color = #blue
#})
\relative c' {
c d \nS #red e( f) \nS #blue g1
}
You may consider using \temporary \override (rather new syntax)
And you should add another function that \revert-s the properties.
HTH
Urs
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user