lilypond-devel
[Top][All Lists]
Advanced

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

Re: conditional (on-the-fly) music


From: David Kastrup
Subject: Re: conditional (on-the-fly) music
Date: Sun, 11 Jan 2015 13:14:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Dan Eble <address@hidden> writes:

> I’m working on a change that allows this:
>
>   \repeat volta 4 {
>     \conditional #(except-in-nth-volta 3) {
>        c4^"3rd time tacet” …
>     }
>   }
>
> It is engraved normally, but when \unfoldRepeats is used for MIDI output, the 
> conditional passage is skipped during the 3rd volta.  It does this by 
> checking a new context property that is set in unfolded music.
>
> Any feedback?  I am having a hard time finding the right place to put
> the predicate-generator functions "except-in-nth-volta" and
> "only-in-nth-volta".

I think a reasonable way to do that would be to allow some construct like

\expandrepeat { c4^"3rd time tacet" } { { c4 } { c4 } { r4 } { c4 } }

This construct would create a specific music type, place its first music
argument into its 'element field and the second argument into 'elements,
and the repeat expansion would then, well, expand this construct
appropriately as long as it was not nested within another repeat,
expanded or not.

More specific or limited constructs like \except-in-nth-volta could be
defined based on that principal mechanism, but that mechanism itself
looks like it would provide the basic functionality, namely differing
between unexpanded and expanded repetitions, in an exhaustive way.

-- 
David Kastrup



reply via email to

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