[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Repeat alternative count
From: |
Christopher Heckman |
Subject: |
Re: Repeat alternative count |
Date: |
Sat, 29 Aug 2020 14:15:23 -0700 |
On Sat, Aug 29, 2020 at 9:00 AM <lilypond-devel-request@gnu.org> wrote:
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 29 Aug 2020 07:00:17 -0700
> From: Aaron Hill <lilypond@hillvisions.com>
> To: lilypond-devel@gnu.org
> Subject: Re: Repeat alternative count
> Message-ID: <7a86cc0e1bc3203a1d685d9e7d431e6f@hillvisions.com>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> On 2020-08-29 6:37 am, Dan Eble wrote:
> > Is there a use case for specifying the number of times to reuse a
> > repeat alternative in a way that \unfoldRepeats could honor? Right
> > now, it reuses the first alternative enough times to reach the repeat
> > count. If so, does anyone want to suggest a syntax? Here's my entry.
> >
> > \repeat volta 40 {
> > …
> > } \alternative {
> > { … }
> > \repeat alternative 3 { … }
> > { … }
> > }
> >
> > Good? Bad? Meh?
>
> What would be nice is to have a way to semantically indicate precisely
> when and how many times an alternative is used.
>
> Consider a case when you have a first ending that would be labelled
> "1.3." and a second ending that is labelled "2.4.5.". Currently, this
> can be done using custom repeat commands but \unfoldRepeats does not
> know how to parse the volta text and produce the right expansion.
>
> Perhaps:
>
> %%%%
> \repeat volta 5 {
> ...
> }
> \alternative 1,3 {
> ...
> }
> \alternative 2,4,5 {
> ...
> }
> %%%%
>
>
> -- Aaron Hill
That would break too many things, since \alternative takes a sequence
of SequentialMusic's as an argument.
How about allowing modifying the syntax of \alternative to include the
possibility of a number, which means to repeat that ending? This would
look like
\alternative {
{ c1 }
1
{ d1 }
1
}
Which would be interpretted as: the 1st, 2nd, and 4th endings are c,
and the 3nd ending is d.
Obviously, something like \alternative { 1 ... } would be illegal, although
\alternative { 2 { ... } } might be acceptable.
As a bonus, maybe Lilypond could automatically typeset the repeat
numbers based on the \alternative structure? In the example above, we
would have something that looks like
_||__1, 2, 4.___:||__3.___:||__
((A few minutes later)) Those repeat signs might make things a bit
difficult. Perhaps we could include \start-repeat to print a ||: and
\end-repeat to print a :|| ... so that the example above would look
more like
\alternative {
{ c1 \end-repeat }
1
{ d1 }
1
}
to get the following instead:
_||__1, 2, 4.___:||__3.___||__
--- Christopher Heckman
Re: Repeat alternative count,
Christopher Heckman <=