I'm sorry but I'm not able to make them working. In both cases I get unexpected post-event c1 \myGrey ~ c1
On 19 September 2017 at 23:21, Thomas Morley <thomasmorle...@gmail.com> wrote: > 2017-09-19 22:48 GMT+02:00 Gianmaria Lari <gianmarial...@gmail.com>: > > This code > > > > \version "2.19.65" > > \fixed c'' { > > \override Tie.color = #grey > > c1 ~ > > \revert Tie.color > > \override NoteHead.color = #grey > > c1 > > \revert NoteHead.color > > } > > > > > > change the color of the tie and the second c1 note (see attached image). > > I would like to simplify the previous code and write something like: > > > > \version "2.19.65" > > \fixed c'' { > > c1 \grey {~ c1} > > } > > > > Here http://lsr.di.unimi.it/LSR/Item?id=985 there is something similar > but I > > have not been able to modify it according my needs. > > How can I do it? > > > > Thank you, g > > > > The name 'grey' is taken, see: > > \void \displayScheme \grey > > returns the rgb-list of the color called grey, i.e. (list 0.5 0.5 0.5) > So use different identifiers. > > \version "2.19.65" > > %% override > colorGrey = > \override Tie.color = > #(lambda (grob) > (ly:grob-set-property! (ly:spanner-bound grob RIGHT) 'color grey) > grey) > > %% turned into tweak > tweakGrey = \single \colorGrey \etc > > \fixed c'' { > c1 \tweakGrey ~ c1 > } > > %% native tweak > myGrey = > \tweak color > #(lambda (grob) > (ly:grob-set-property! (ly:spanner-bound grob RIGHT) 'color grey) > grey) > \etc > > \fixed c'' { > c1\myGrey ~ c1 > } > > > Cheers, > Harm >
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user