Next: Repeats and MIDI, Previous: Repeat types, Up: Repeats
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.
Standard 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,} }
Repeats with upbeats may be created.
\new Staff { \partial 4 e | \repeat volta 4 { c2 d2 | e2 f2 | } \alternative { { g4 g g e } { a a a a | b2. } } }
Ties may be added to a second ending,
c1 \repeat volta 2 {c4 d e f ~ } \alternative { {f2 d} {f\repeatTie f,} }
It is possible to shorten volta brackets
by setting voltaSpannerDuration
. In the next example, the
bracket only lasts one measure, which is a duration of 3/4.
\relative c''{ \time 3/4 c c c \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4) \repeat "volta" 5 { d d d } \alternative { { e e e f f f } { g g g } } }
If you want to start a repeat at the beginning of a line and have a double bar at the end of the previous line, use
... \bar "||:" \break \repeat volta 2 { ...
see Bar lines for more information.
Examples:
Brackets for the repeat are normally only printed over the topmost
staff. This can be adjusted by moving Volta_engraver
to the
Staff context where you want the brackets to appear;
see Modifying context plug-ins and
repeats/volta-multi-staff.ly .
\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.
Timing information is not remembered at the start of an alternative,
so after a repeat timing information must be reset by hand; for
example, by setting Score.measurePosition
or entering
\partial
. Similarly, slurs or ties are also not repeated.
Volta brackets are not vertically aligned.
Next: Repeats and MIDI, Previous: Repeat types, Up: Repeats
Diese Seite ist für LilyPond-2.11.28 (Entwicklungszweig).
Fehler bitte an http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs melden.
Your suggestions for the documentation are welcome.