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: Dan Eble
Subject: Re: conditional (on-the-fly) music
Date: Sun, 11 Jan 2015 09:52:06 -0500

> On Jan 11, 2015, at 07:14 , David Kastrup <address@hidden> wrote:
> 
> 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 } }

Your suggestion is very similar to what one must do already and I’m trying to 
make it simpler.  With my suggestion, if you did want something other than 
skips (maybe an instrument change?) to appear in the unfolded output, you could 
do this:

   \repeat volta 4 {
     \conditional #(except-in-nth-volta 3) { ... }
     \conditional #(only-in-nth-volta 3) { ... }
   }

> This construct would create a specific music type, place its first music
> argument into its 'element field and the second argument into ‘elements,

What I’ve got now is an OnTheFlyMusic type that runs its ‘procedure callback 
(arguments are the music event and the context) and returns the music to be 
iterated.  The procedure for the \conditional command either returns the 
‘element or a skip of the same duration.  I’ll post a review so you can see 
more detail, hopefully in the next 12 hours.

Thanks for your feedback.
— 
Dan




reply via email to

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