[Top][All Lists]

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

Re: Repeat alternative count

From: David Kastrup
Subject: Re: Repeat alternative count
Date: Sat, 29 Aug 2020 22:24:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dan Eble <> writes:

> On Aug 29, 2020, at 14:52, David Kastrup <> wrote:
>> My own take on it is that \alternative syntax is an abomination and it
>> should likely be more like
>> \repeat volta 40 {
>>  ...
>>  \alternative { ... }
>>  \alternative { ... }
>>  \alternative { ... }
>> }
>> since that would avoid several syntactical problems and would allow to
>> produce alternatives by music functions.
> I agree, but that's a little too far into fantasy land for me to attempt 
> right now.  The other stuff proposed so far seems more attainable.
> I've been intending to ask you how difficult you think it would be to
> make the parser treat \alternative as a music function whenever it
> does not follow a \repeat {}?

I don't think that makes sense.  I'd just remove \alternative as a
reserved word from the parser altogether, give it a music type
representation, and then let some cleanup function put the bits
together (if equivalence in music expressions is wanted, but I am not
sure of that actually).

> I've gotten \alternative << >> working to my satisfaction, but I did
> it by requiring the << >> in the parser.  I think it would be nicer if
> something like
>     \repeat volta 2 {
>       ...notes...
>       \alternative M
>       ...notes...
>     }
> would call a music function with argument M.

Sure, that should be feasible with an optional argument of type
index-list? or similar.

David Kastrup

reply via email to

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