lilypond-devel
[Top][All Lists]
Advanced

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

Re: equivalent to \once within scheme?


From: Alexander Kobel
Subject: Re: equivalent to \once within scheme?
Date: Wed, 15 Sep 2010 10:20:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.12) Gecko/20100826 Lightning/1.0b1 Thunderbird/3.0.7

On 2010-09-15 10:09, Marc Hohl wrote:
Hello all,

IIUC, \override grob #'foo = #bar
is more or less the same as
(ly:grob-set-property! grob foo bar)

Is there a scheme equivalent for
\once \override Grob #'foo = #bar ?

Hi, Marc,

if _I_ understand correctly, the (ly:grob-set-property! grob ...) is _exactly_ the \once \override ..., since it applies to the specific instance of a grob you give as an parameter. It just depends where you call it - which is usually inside some callback set by \override Grob #'after-line-breaking or such. Thus, the (ly:grob-set-property grob ...) is called for every grob of type Grob. But if you, say, construct grobs in scheme, and run the function only for one of the resulting grobs, or apply it only the second instance of a broken spanner (which is divided into two grobs (or even more for a three-system-long VoltaBracket, e.g.?) it behaves exactly like a \once \override.


HTH,
Alexander



reply via email to

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