lilypond-user
[Top][All Lists]
Advanced

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

Re: variables for specific kinds of markup?


From: David Kastrup
Subject: Re: variables for specific kinds of markup?
Date: Mon, 17 Sep 2018 21:35:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

"Marc Evanstein" <address@hidden> writes:

> Thanks so much – changing it to define-event-function worked
> perfectly. Is a markup considered an "event" rather than "music"?

No.  But ^\markup ... is.

> Was define-music-function somehow returning that event attached to
> empty music or something?

The decision whether to attach is made when the function is _called_,
not when it returns.

If you write something like

\displayLilyMusic c \displayLilyMusic d

then LilyPond cannot tentatively call the second \displayLilyMusic
before the first in order to decide whether it might return some
articulation to attach to the c before it calls the first
\displayLilyMusic .

LilyPond 2.20 has an additional sweepup stage that will let

\displayLilyMusic c \displayLilyMusic ^"Hi"

attach the ^"Hi" from the second \displayLilyMusic call to the finished
c from the first \displayLilyMusic call so that while the order of
evaluation gets messed up you would not get to see the same error
message as you do with your version.

This will likely reduce the number of complaints, but evaluation order
will not likely be always what one would expect.

-- 
David Kastrup



reply via email to

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