lilypond-user
[Top][All Lists]
Advanced

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

Re: GDP: Rhythms: add-grace-property


From: Jonathan Kulp
Subject: Re: GDP: Rhythms: add-grace-property
Date: Mon, 11 Aug 2008 17:19:42 -0500
User-agent: Thunderbird 2.0.0.16 (X11/20080724)

Ok thanks everyone for responding to this.  What I gather is the following:

1. The "add-grace-property" example currently appearing in NR does not work anymore. --#(add-grace-property 'Voice 'Stem 'direction '()) It needs to be removed or changed

2. The way to accomplish the same thing is to use the new remove-grace-property or Neil's ly:stem::calc-direction instead of '() as the direction argument. I got Neil's solution to work but haven't grabbed the new file from git to try Carl's. Will do that tonight.

So, the question is whether it's worth introducing add-grace-property and/or remove-grace-property at that point in NR, since it already shows how to alter stem direction using \stemDown in a different example right before it. Is it sufficiently abnormal that it should belong to a snippet instead of appearing in the main text? Should I create an example that works and then move it to the @snippets area? This question is probably for Carl :)

Jon

Neil Puttock wrote:
2008/8/11 Neil Puttock <address@hidden>:
Hi Jonathan,

2008/8/11 Jonathan Kulp <address@hidden>:

"The layout of grace expressions can be changed throughout the
music using the function @code{add-grace-property}.  The following
example undefines the @code{Stem} direction for this grace, so
that stems do not always point up."

@example
\new Staff @{
 #(add-grace-property 'Voice 'Stem 'direction '())
 @dots{}
@}
@end example
I suspect this is something that worked many moons ago, but as you've
found out, you can't set 'direction to an empty list, or indeed to
CENTER.

The correct method to make grace notes behave like normal notes would
be to use the same 'direction setting callback which the Stem grob
uses:

#(add-grace-property 'Voice 'Stem ly:stem::calc-direction)

Of course, I completely ballsed this up, since 'direction is missing. :)

#(add-grace-property 'Voice 'Stem 'direction ly:stem::calc-direction)

Though now you can just use Carl's remove-grace-property function
instead, which will do the same thing without having to worry about
grob callbacks.

Regards,
Neil


--
Jonathan Kulp
http://www.jonathankulp.com




reply via email to

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