[Top][All Lists]

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

Re: Shortcut for \repeat unfold

From: David Kastrup
Subject: Re: Shortcut for \repeat unfold
Date: Sat, 25 Sep 2021 20:27:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dan Eble <> writes:

> On Sep 25, 2021, at 06:32, Lukas-Fabian Moser <> wrote:
>> "\*" =
>> #(define-music-function (n mus) (index? ly:music?)
>>    #{ \repeat $repeat-shorthand $n { #mus } #})
> Instead of debating a default repeat type and function, why not
> provide access to repetition as a music function with a clear name
> like
>     \repeatFunction type n music
> And let the user decide how to abbreviate it?
>     x = \repeatFunction unfold \etc

How about we change \repeat ... \alternative in its structure to be
\repeat ... { \alternative ... }, namely introduce a separate music
expression for \alternative?  That way neither \repeat nor \alternative
need to be special.

Either \alternative could send some events caught by \repeat (with
\alternative being right behind \repeat being the last opportunity to
catch them, with \repeat \repeat ... \alternative possibly being tricky)
or a scorification hook does the final assembly.

Then we'd not need a special syntax (and the lookahead needed by
\alternative is a real nuisance) and could relitigate the meaning of
\repeat 4 .

David Kastrup

reply via email to

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