[Top][All Lists]

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

Re: Some engraver brainstorming

From: David Kastrup
Subject: Re: Some engraver brainstorming
Date: Sun, 09 May 2010 09:02:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> The lifetime of Threads (or whatever you call them) is tricky.  Consider
>   <c( address@hidden( g>
>  % *
>  % ..stuff..
>  %
>   <address@hidden) f)>
>  % **
> How would LilyPond know that the @1 thread context must stay alive at
> the point marked %* ? The iterator for the E note would be pointing at
> the @1 Thread, but something else must copy the reference so it doesnt
> die.

As long as a Thread has unfinished business, it would stay around.
Alternatively, they stay alive until their voice dies.

It is probably a bad idea to have Threads (or whatever) have their own
property sets since we already have enough of a mess figuring out where
\set xxx.yyy
goes.  If they are not full contexts with properties and so on, but
basically just an event filter with on-demand engraver instances, maybe
most of the complications don't arrive in practice.

> Suppose you somehow save the reference to @1.  How does lilypond know
> the context should die at %** ? If it does not, you'll risk
> accumulating them until the end of the piece, making things slow down.

End of voice, or no pending business, I'd say.  Of course, when you
forget to close a spanning engraver, there will be pending business
until end of voice.  And then we'll get the error/warning message.

I don't see this as problematic, but of course I have had no previous
exposure to the last attempt.

David Kastrup

reply via email to

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