lilypond-user
[Top][All Lists]
Advanced

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

Re: Changing voice order...


From: Paul
Subject: Re: Changing voice order...
Date: Tue, 1 Nov 2016 21:50:23 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Hi Kieren,

On 11/01/2016 08:32 PM, Kieren MacMillan wrote:

I'm not sure how to write a function that accepts an arbitrary
number of music expressions.
Couldn’t the function “look forward” the number of entries in the udududud list?

I don't think that can work, because the function has to be called (with however many arguments it takes) before it has access to its first argument, which is the udud list or string. So a chicken and egg thing.

that seems to call for a "list of music expressions”,
but I'm not sure to what extent that would make the syntax unwieldy.
How does \alternative do it? Can something be learned from that?

So \alternative takes just one argument, a single music expression wrapped in {}, with one or more music expressions nested inside. So that approach might work, say with a function that took two arguments:

  \split udd {{...} {...} {...}}

Although, I don't know how \alternative gets the sub-expressions out of the top-level one... and after a brief cursory look at the source code it looks like \alternative is handled by the parser (as opposed to being just a scheme/music/etc function)... so I'm not sure how or even whether this kind of thing can be done in user space (at least not with existing functions like map-some-music).

Cheers,
-Paul





reply via email to

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