On Wed, Apr 20, 2022 at 8:21 PM John Helly <[email protected]> wrote:

> Aloha.
>
> I've not used LP for a while but in coming back to it I've been struggling
> with repeats and find that this 'preferred syntax' does not seem to work in
> that it produces:
>

> Starting lilypond 2.20.0 [test2.ly]...
>
> Processing
> `/Volumes/Pegasus32R6/Music-100/Music-Lilypond/Songs/Our-Shangri-La/
> test2.ly'
>
> Parsing...
>
>
> /Volumes/Pegasus32R6/Music-100/Music-Lilypond/Songs/Our-Shangri-La/test2.ly:6:10:
> error: syntax error, unexpected \alternative
>
> ...
>
> \version "2.20.0"
> {
> \fixed c'' {
>        \repeat volta 6 {
>          c4 d e f
>          \alternative {
>            \volta 1,2,3 { c2 e }
>            \volta 4,5 { f2 d }
>            \volta 6 { e2 f }
> } }
> c1 }
> }
>

The error messages indicate that \volta is an "unknown escaped string", so
it's not correct.

I think you misunderstand how volta labeling works in 2.20.  Here's code
that works for me[1]:

\version "2.20.0"
{
\fixed c'' {
       \repeat volta 6 {
         c4 d e f}
         \alternative {
          { \set Score.repeatCommands = #'((volta "1. 2. 3.")) c2 e  }
          {  \set Score.repeatCommands = #'((volta #f) (volta "4. 5.")
end-repeat) f2 d }
           { e2 f }
         }
c1 }
}


HTH,

Carl

1.
https://lilypond.org/doc/v2.20/Documentation/notation/long-repeats#manual-repeat-marks

Reply via email to