lilypond-devel
[Top][All Lists]
Advanced

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

Re: Nested segno and volta repeats


From: Dan Eble
Subject: Re: Nested segno and volta repeats
Date: Sun, 29 May 2022 12:35:06 -0400

On May 29, 2022, at 10:01, Jean Abou Samra <jean@abou-samra.fr> wrote:
> Well, I know about \unfolded … I took it as a last resort
> for tricky cases, should I not have viewed it like that?
> Ideally, you'd be able to avoid repetituous code without
> needing variables (if there are 10 voices, you need
> 10 more variables and navigating in the file can become
> harder).

For a time during the development of this stuff, I thought about extending 
\volta to specify points in nested repeats instead of just the immediately 
enclosing repeat, but it was too much to bite off.

The syntax could have been something like this for AABA.

    \repeat _____ 2 {
      \repeat _____ 2 {
        ...
        %% Include \fine once: the first time through the inner
        %% repeat during the second time through the outer.
        \volta #'((1 2)) \fine  %%% 1.
      }
      ...
    }

The natural question is what happens when you want to specify more than one 
volta number for a specific \repeat.  There are two obvious possibilities: 
specify each occurrence in full or allow more lists.

    \repeat _____ 3 {
      \repeat _____ 2 {
        ...
        %% Include \foo the first time through the inner repeat
        %% except during the final time through the outer.
        \volta #'((1 1) (1 2)) \foo  %%% 2. or…
        \volta #'((1 (1 2)))   \foo  %%% 3. abbr. for (2)
        ...
      }
      ...
    }

I think that puts the information where it needs to be, but I'm not really fond 
of the syntax.

I currently have things to work on that are more valuable to me, but perhaps 
someone else is interested.  The work would be perhaps 10% coding in C++ 
(\volta iteration), 30% coding in Scheme (\repeat unfolding), and 60% writing 
regression tests (yum!).
— 
Dan




reply via email to

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