lilypond-user
[Top][All Lists]
Advanced

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

Re: Accidental Notes in different colour


From: Paul Morris
Subject: Re: Accidental Notes in different colour
Date: Sat, 1 Nov 2014 18:19:49 -0700 (PDT)

Jay Vara wrote
> Is there a similar way to get at the accidental grob from the NoteNames? I
> tried a similar method by overriding the NoteNames.stencil and giving the
> NoteName a colour there. When I do an (accidental (ly:grob-object grob
> 'accidental-grob)), it always comes up with null. Also, I have several key
> signature changes in my music and I realised that by the time Lilypond
> gets to printing the NoteNames, it seems to have lost knowledge of the key
> signatures and only remembers the very last one. 

This will be harder to do... There are no accidental grobs attached to note
names grobs, so that approach won't work. 

My next thought is to make a custom engraver, add it to the note names
context, and use it to set the color of accidental note names.  But it seems
that the note names context does not have a key signature property, like a
staff context does. (With a custom note head engraver you can access the key
signature property in the staff context, and use that to identify accidental
notes, but that won't work with note heads context.)  

So I'm not sure how to achieve this...  I'll let you know if I think of
anything.

-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Accidental-Notes-in-different-colour-tp168088p168276.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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