Dan Eble <dan@lyric.works> writes: > On Sep 25, 2021, at 06:32, Lukas-Fabian Moser <l...@gmx.de> 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