lilypond-devel
[Top][All Lists]
Advanced

[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: Sun, 30 Aug 2020 22:51:04 -0700

On Sun, Aug 30, 2020 at 10:34 PM Werner LEMBERG <wl@gnu.org> wrote:
>
>
> >> > \alternative {
> >> >   { c1 }
> >> >   1
> >> >   { d1 }
> >> >   1
> >> >    }
> >> >
> >> > Which would be interpretted as: the 1st, 2nd, and 4th endings are c,
> >> > and the 3nd  ending is d.
> >>
> >> That is already valid syntax and makes the first and second
> >> alternative c1 and the third and fourth alternative d1 .
> >
> > If Lilypond already does this, it ought to be documented. (It isn't,
> > not on the website anyway.)
>
> Nothing to be documented IMHO: Since 2.20 you can use '1' to
> repeat the same pitch with the given rhythm.
>
>     Werner

Ah. I heard about this feature, but didn't know whether it got added
officially yet.

So maybe what we need is something like a new macro like "\redo"

\alternative {
   { c1 }
   \redo 1
   { d1 }
   \redo 1
   \redo 3
    }

... although I'm starting to wonder whether the number should refer to
the index of the music sequence, and not the iteration at which it
appears.  (You'd have "\redo 2" instead of "\redo 3" in the example
above.) Otherwise you could conceivably have constructions like

\alternative { { c1 } \redo 1 \redo 1 ... \redo 1 { d1 } \redo 1 \redo x }

and you have to count the \redo's to figure out what x is. Whereas, if
the items in \alternatiave's argument that are \redo's are removed,
you get the list

{ { c1 }  { d1 } }

and you would know that x = 2 (instead of something like x = 8).

--- Christopher Heckman



reply via email to

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