LilyPond has one syntactic construct for specifying different types of repeats. The syntax is
\repeat variant repeatcount repeatbody
If you have alternative endings, you may add
\alternativewhere each alternative is a music expression. If you do not give enough alternatives for all of the repeats, then the first alternative is assumed to be played more than once.{
alternative1 alternative2 alternative3 ...}
Normal notation repeats are used like this:
c1 \repeat volta 2 { c4 d e f } \repeat volta 2 { f e d c }
With alternative endings:
c1 \repeat volta 2 {c4 d e f} \alternative { {d2 d} {f f,} }
\context Staff { \partial 4 \repeat volta 4 { e | c2 d2 | e2 f2 | } \alternative { { g4 g g } { a | a a a a | b2. } } }
If you do a nested repeat like
\repeat ... \repeat ... \alternative
then it is ambiguous to which \repeat
the \alternative
belongs. This ambiguity is resolved by always having the
\alternative
belong to the inner \repeat
. For clarity,
it is advisable to use braces in such situations.
This page is for LilyPond-2.0.0 (stable-branch).