lilypond-user
[Top][All Lists]
Advanced

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

Re: Possible source of beam properties confusion


From: David Kastrup
Subject: Re: Possible source of beam properties confusion
Date: Fri, 15 Jul 2016 18:21:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Andrew Bernard <address@hidden> writes:

> I use debug print statements when developing scheme music functions. I
> have this evening noticed for the first time that my complete
> perplexity regarding various properties may actually come from the
> following problem. When I run a function several times in a row, the
> print output comes out in backwards order to the score note order. [No
> wonder I have been confused.] The MWE here shows this.

No, it doesn't.  You don't put display statements into the music
function (which is run at the time it is encountered in the source) but
into a callback.

The order in which callbacks are called is pretty much arbitrary.  In
fact, callbacks may be called more than once in unpure-pure-containers
(I think that's the basic remaining point of duplicity) for different
line break configurations.  Or not at all, depending on when LilyPond
decides that it does not need the particular stencil for typesetting.

Or earlier than you expect when some other grob needs some
callback-triggered property of a different grob in order to figure out
some details.

So when you put debug output in callbacks, the time of call is unknown,
it is not known whether you get called at all, and depending on the
callback type, you might be called several times.  Spanners are often
active in several systems at once, at each of the spanner parts gets its
own callback calls.

-- 
David Kastrup



reply via email to

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