Re: Nested segno and volta repeats

2022-05-29 Thread Dan Eble
On May 29, 2022, at 10:01, Jean Abou Samra  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




Re: Nested segno and volta repeats

2022-05-29 Thread Lukas-Fabian Moser




Is there any way to get this repeat structure with the recent
repeat additions? This is from a question on the user list.

||:  A:|| B||
  Fine  D.C. Al Fine

-> A A B A

How cruel it would have been not to support sonata form!


... that would be some tonally renegade notion of sonata form. :-)




Re: Nested segno and volta repeats

2022-05-29 Thread Jean Abou Samra




Le 29/05/2022 à 15:18, Dan Eble a écrit :

On May 29, 2022, at 03:56, Jean Abou Samra  wrote:

Hi Dan,

Is there any way to get this repeat structure with the recent
repeat additions? This is from a question on the user list.

||:  A:|| B||
  Fine  D.C. Al Fine

-> A A B A

How cruel it would have been not to support sonata form!

The solution uses the functions documented in the Notation Reference in section 
"Other variation in repeated sections."

input/regression/volta-spec-volta-in-segno.ly shows how to code the variation, 
but it leaves out \fine for simplicity.  You want something like this:

```
\version "2.23.10"

exposition = \fixed c' { s1^"A" }
development = \fixed c' { s1^"B" }

piece = \new Staff <<
   \repeat segno 2 {
 \volta 1 \repeat volta 2 \exposition
 \volta 2 { \unfolded \exposition \fine }
 \development
   }
\score { \piece }
\score { \unfoldRepeats \piece }
```




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).





Re: Nested segno and volta repeats

2022-05-29 Thread Dan Eble
On May 29, 2022, at 03:56, Jean Abou Samra  wrote:
> 
> Hi Dan,
> 
> Is there any way to get this repeat structure with the recent
> repeat additions? This is from a question on the user list.
> 
> ||:  A:|| B||
>  Fine  D.C. Al Fine
> 
> -> A A B A

How cruel it would have been not to support sonata form!

The solution uses the functions documented in the Notation Reference in section 
"Other variation in repeated sections."

input/regression/volta-spec-volta-in-segno.ly shows how to code the variation, 
but it leaves out \fine for simplicity.  You want something like this:

```
\version "2.23.10"

exposition = \fixed c' { s1^"A" }
development = \fixed c' { s1^"B" }

piece = \new Staff <<
  \repeat segno 2 {
\volta 1 \repeat volta 2 \exposition
\volta 2 { \unfolded \exposition \fine }
\development
  }
>>

\score { \piece }
\score { \unfoldRepeats \piece }
```
— 
Dan


Re: Nested segno and volta repeats

2022-05-29 Thread Luca Fascione
Oh yes. I was taught aaba as well, definitely.

Sorry, somehow I heard you were saying you'd read it aab, you see

L

On Sun, 29 May 2022, 13:33 Thomas Morley,  wrote:

> Am So., 29. Mai 2022 um 13:25 Uhr schrieb Luca Fascione <
> l.fasci...@gmail.com>:
> >
> > What do you mean Thomas? When the sheet clearly indicates DC al Fine (Da
> Capo, from the beginning) why would it be normal to ignore such an explicit
> direction?
>
> Maybe I was not clear enough. For
>
> ||:  A:|| B||
>   Fine  D.C. Al Fine
>
> The "Fine" may be regarded as ambiguous.
> By _convention_ above is played  A A B A and not A A B A A.
> But a composer could be expizit in what he wants.
> That's all I wanted to say, hope it's clearer now.
>
> Cheers,
>   Harm
>
> >
> > I wasn't aware of \repeat segno, neat thing, I've always had to do it by
> hand with cadenza trickeries...
> >
> > L
> >
> > On Sun, 29 May 2022, 10:45 Thomas Morley, 
> wrote:
> >>
> >> Am So., 29. Mai 2022 um 09:56 Uhr schrieb Jean Abou Samra <
> j...@abou-samra.fr>:
> >> >
> >> > Hi Dan,
> >> >
> >> > Is there any way to get this repeat structure with the recent
> >> > repeat additions? This is from a question on the user list.
> >> >
> >> > ||:  A:|| B||
> >> >   Fine  D.C. Al Fine
> >> >
> >> > -> A A B A
> >>
> >> From a musicians point of view:
> >> I've learned not to repeat the final A here, though as a rule of
> thumb(!).
> >> A composer could be expilzit by adding "con/senza repetizione"
> >>
> >> Afaict, "senza repetizione" is not supported by now.
> >>
> >> Cheers,
> >>   Harm
> >> >
> >> >
> >> > My first thought was to do
> >> >
> >> > \version "2.23.10"
> >> >
> >> > m =
> >> > \repeat segno 2 {
> >> >\repeat volta 2 {
> >> >  a'1
> >> >}
> >> >\volta 2 \fine
> >> >b'1
> >> > }
> >> >
> >> > { \m }
> >> > { \unfoldRepeats \m }
> >> >
> >> >
> >> > That works about fine, except that the resulting
> >> > structure with \unfoldRepeats is A A B A A and
> >> > not A A B A. What I need seems to be a kind of
> >> > \volta 2 \fine within the inner \repeat volta
> >> > that would apply \volta with the outer \repeat
> >> > segno. Did miss something like that? Should
> >> > it be registered as a feature request?
> >> >
> >> > Best,
> >> > Jean
> >> >
> >> >
> >>
>


Re: Nested segno and volta repeats

2022-05-29 Thread Thomas Morley
Am So., 29. Mai 2022 um 13:25 Uhr schrieb Luca Fascione :
>
> What do you mean Thomas? When the sheet clearly indicates DC al Fine (Da 
> Capo, from the beginning) why would it be normal to ignore such an explicit 
> direction?

Maybe I was not clear enough. For

||:  A:|| B||
  Fine  D.C. Al Fine

The "Fine" may be regarded as ambiguous.
By _convention_ above is played  A A B A and not A A B A A.
But a composer could be expizit in what he wants.
That's all I wanted to say, hope it's clearer now.

Cheers,
  Harm

>
> I wasn't aware of \repeat segno, neat thing, I've always had to do it by hand 
> with cadenza trickeries...
>
> L
>
> On Sun, 29 May 2022, 10:45 Thomas Morley,  wrote:
>>
>> Am So., 29. Mai 2022 um 09:56 Uhr schrieb Jean Abou Samra 
>> :
>> >
>> > Hi Dan,
>> >
>> > Is there any way to get this repeat structure with the recent
>> > repeat additions? This is from a question on the user list.
>> >
>> > ||:  A:|| B||
>> >   Fine  D.C. Al Fine
>> >
>> > -> A A B A
>>
>> From a musicians point of view:
>> I've learned not to repeat the final A here, though as a rule of thumb(!).
>> A composer could be expilzit by adding "con/senza repetizione"
>>
>> Afaict, "senza repetizione" is not supported by now.
>>
>> Cheers,
>>   Harm
>> >
>> >
>> > My first thought was to do
>> >
>> > \version "2.23.10"
>> >
>> > m =
>> > \repeat segno 2 {
>> >\repeat volta 2 {
>> >  a'1
>> >}
>> >\volta 2 \fine
>> >b'1
>> > }
>> >
>> > { \m }
>> > { \unfoldRepeats \m }
>> >
>> >
>> > That works about fine, except that the resulting
>> > structure with \unfoldRepeats is A A B A A and
>> > not A A B A. What I need seems to be a kind of
>> > \volta 2 \fine within the inner \repeat volta
>> > that would apply \volta with the outer \repeat
>> > segno. Did miss something like that? Should
>> > it be registered as a feature request?
>> >
>> > Best,
>> > Jean
>> >
>> >
>>



Re: Nested segno and volta repeats

2022-05-29 Thread Jean Abou Samra

Le 29/05/2022 à 13:24, Luca Fascione a écrit :
What do you mean Thomas? When the sheet clearly indicates DC al Fine 
(Da Capo, from the beginning) why would it be normal to ignore such an 
explicit direction?




I think he rather means that when you do the Da
Capo, you ignore the ||: :||, i.e. the total structure
is A A B A, not A A B A A.


I wasn't aware of \repeat segno, neat thing, I've always had to do it 
by hand with cadenza trickeries...



It's one of many shiny new repeat-related features
added by Dan in this release cycle.

Jean




Re: Nested segno and volta repeats

2022-05-29 Thread Luca Fascione
What do you mean Thomas? When the sheet clearly indicates DC al Fine (Da
Capo, from the beginning) why would it be normal to ignore such an explicit
direction?

I wasn't aware of \repeat segno, neat thing, I've always had to do it by
hand with cadenza trickeries...

L

On Sun, 29 May 2022, 10:45 Thomas Morley,  wrote:

> Am So., 29. Mai 2022 um 09:56 Uhr schrieb Jean Abou Samra <
> j...@abou-samra.fr>:
> >
> > Hi Dan,
> >
> > Is there any way to get this repeat structure with the recent
> > repeat additions? This is from a question on the user list.
> >
> > ||:  A:|| B||
> >   Fine  D.C. Al Fine
> >
> > -> A A B A
>
> From a musicians point of view:
> I've learned not to repeat the final A here, though as a rule of thumb(!).
> A composer could be expilzit by adding "con/senza repetizione"
>
> Afaict, "senza repetizione" is not supported by now.
>
> Cheers,
>   Harm
> >
> >
> > My first thought was to do
> >
> > \version "2.23.10"
> >
> > m =
> > \repeat segno 2 {
> >\repeat volta 2 {
> >  a'1
> >}
> >\volta 2 \fine
> >b'1
> > }
> >
> > { \m }
> > { \unfoldRepeats \m }
> >
> >
> > That works about fine, except that the resulting
> > structure with \unfoldRepeats is A A B A A and
> > not A A B A. What I need seems to be a kind of
> > \volta 2 \fine within the inner \repeat volta
> > that would apply \volta with the outer \repeat
> > segno. Did miss something like that? Should
> > it be registered as a feature request?
> >
> > Best,
> > Jean
> >
> >
>
>


Re: Nested segno and volta repeats

2022-05-29 Thread Thomas Morley
Am So., 29. Mai 2022 um 09:56 Uhr schrieb Jean Abou Samra :
>
> Hi Dan,
>
> Is there any way to get this repeat structure with the recent
> repeat additions? This is from a question on the user list.
>
> ||:  A:|| B||
>   Fine  D.C. Al Fine
>
> -> A A B A

>From a musicians point of view:
I've learned not to repeat the final A here, though as a rule of thumb(!).
A composer could be expilzit by adding "con/senza repetizione"

Afaict, "senza repetizione" is not supported by now.

Cheers,
  Harm
>
>
> My first thought was to do
>
> \version "2.23.10"
>
> m =
> \repeat segno 2 {
>\repeat volta 2 {
>  a'1
>}
>\volta 2 \fine
>b'1
> }
>
> { \m }
> { \unfoldRepeats \m }
>
>
> That works about fine, except that the resulting
> structure with \unfoldRepeats is A A B A A and
> not A A B A. What I need seems to be a kind of
> \volta 2 \fine within the inner \repeat volta
> that would apply \volta with the outer \repeat
> segno. Did miss something like that? Should
> it be registered as a feature request?
>
> Best,
> Jean
>
>