|
From: | Mats Bengtsson |
Subject: | Re: Note heads and grace |
Date: | Mon, 10 Nov 2003 11:47:05 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
Actually, I do have an advanced guess on why it happens. The \grace command sets some properties for the NoteHead object within the current Voice context. Then, LilyPond will make a local copy of the list of properties for the NoteHead object within this specific Voice context. So, the properties you set with \property Staff.NoteHead ... will no more be visible to the current Voice context. This intricate detail of how property settings work is probably obvious to Han-Wen and Jan who wrote the code but I cannot find it mentioned explicitly anywhere in the documentation and I was not aware of it myself. /Mats address@hidden wrote:
Why ? :-) Selon Mats Bengtsson <address@hidden>:Don't ask me why, but if you replace Staff.NoteHead with Voice.NoteHead in your example, it will work. Also, I recommend to use \override ... \revert instead of explicitly setting the value back to default: \property Voice.NoteHead \override #'style = #'xcircle c4 c c c \property Voice.NoteHead \revert #'style d4 d d d \grace{d16 d} d4 d d d \property Voice.NoteHead \override #'style = #'xcircle e4 e e eSee http://lilypond.org/doc/v2.0/Documentation/user/out-www/lilypond/Tuning-objects.htmlfor more details. To do a setting for a single note head, use \once \property ... You can define your own shorthand macro likexcircle = \notes{ \once \property Voice.NoteHead \override #'style = #'xcircle }and use it with \xcircle c4 /Mats Marco Caliari wrote:Hi all. The following example \property Staff.NoteHead \set #'style = #'xcirclec4 c c c \property Staff.NoteHead \set #'style = #'defaultd4 d d d \grace{d16 d} d4 d d d \property Staff.NoteHead \set #'style = #'xcircle e4 e e edoes not restore note heads to xcircle (lily 2.1.0). It works if you remove \grace{d16 d}. Is it possible to change a single note head with a command likec4\xcircle ? Regards,
[Prev in Thread] | Current Thread | [Next in Thread] |