#### 3.8.1 Repeat syntax

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

          \alternative { alternative1
                     alternative2
                     alternative3 ... }

where each alternative is a music expression. If you do not give enough alternatives for all of the repeats, the first alternative is assumed to be played more than once.

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

##### Bugs

A nested repeat like

         \repeat ...
         \repeat ...
         \alternative

is ambiguous, since it is is not clear 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.

Read comments on this page, or add one. This page is for LilyPond-2.2.5 (stable-branch).