Re: equivalent to \once within scheme?
On 9/15/10 2:09 AM, "Marc Hohl" wrote: > Hello all, > > IIUC, \override grob #'foo = #bar > is more or less the same as > (ly:grob-set-property! grob foo bar) Actually, this is closer to being the equivalent of \tweak. \override context.grob #'foo = #bar is accomplished in scheme with (ly:context-pushpop-property context grob 'foo bar) > > Is there a scheme equivalent for > > \once \override Grob #'foo = #bar ? But I don't know how to do the \once \override in scheme. HTH, Carl ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: equivalent to \once within scheme?
On 2010-09-15 10:24, David Kastrup wrote: Alexander Kobel writes: 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. That would rather be a \tweak, wouldn't it? \once \override affects every grob at a given timestep. D'oh. Of course. Cheers, Alexander ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: equivalent to \once within scheme?
Alexander Kobel schrieb: 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. Hi Alexander, thanks for your quick response and the explanation! Marc HTH, Alexander ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: equivalent to \once within scheme?
Alexander Kobel writes: > 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. That would rather be a \tweak, wouldn't it? \once \override affects every grob at a given timestep. -- David Kastrup ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: equivalent to \once within scheme?
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 ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
equivalent to \once within scheme?
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 ? Thanks in advance! Marc ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel