Le 22/01/2023 à 21:25, Mark Mathias a écrit :
Jean,
Ahh... of course. I had forgotten that LilyPond doesn't require the braces for a single note, but does for anything more.



Well... that is true in a sense, but from the way you phrase it, I have the
impression that the underlying logic that explains why this behavior makes
sense is not clear to you.

Ok, let me try again. LilyPond thinks in terms of music expressions. This:

  a4

is an expression. This:

  a4 a4 a4 a4

is four distinct music expressions. The syntax of \volta is

  \volta <number> <expression>

so when you write

  \volta 1 a4 a4 a4 a4

it is parsed as

  \volta    1           a4        a4            a4          a4
  \volta <number> <expression>
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~          ~~~~         ~~~
        <expression>            <expression> <expression> <expression>



Now, when you have several expressions, LilyPond will let you
combine them. This:

  { a4 a4 a4 a4 }

is one single, compound expression that puts four subexpressions in
sequence, and this:

  << a4 a4 a4 a4 >>

is also a compound music expression, putting its four elements in
parallel. So, when you write

  \volta 1 { a4 a4 a4 a4 }

this is parsed as

  \volta   1        {   a4          a4             a4 a4       }
                    <expression>  <expression> <expression>  <expression>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  \volta <number>                       <expression>


Does that help?

Jean

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to