Next: Manual repeat commands, Previous: Repeat syntax, Up: Writing repeats
Normal repeats, with or without alternate repeats:
\repeat volta 2 { c4 d e f } \repeat volta 2 { g f e d } \alternative { { cis2 g' } { cis,2 b } } c1
Repeats with upbeats:
\new Staff { \partial 4 e | \repeat volta 4 { c2 d2 | e2 f2 | } \alternative { { g4 g g e } { a a a a | b2. } } }
or
\new Staff { \partial 4 \repeat volta 4 { e | c2 d2 | e2 f2 | } \alternative { { \partial 4*3 g4 g g } { 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,} }
By default, the volta brackets will be drawn over all of the
alternative music, but it is possible to shorten them 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 Score.voltaSpannerDuration = #(ly:make-moment 3 4) \repeat volta 5 { d d d } \alternative { { e e e f f f } { g g g } } }
The Volta_engraver
by default resides in the Score context,
and brackets for the repeat are thus normally only printed over
the topmost staff. This can be adjusted by adding
Volta_engraver
to the Staff context where you want the
brackets to appear; see Modifying context plug-ins and
\score { << \new Staff { \repeat volta 2 { c'1 } \alternative { c' } } \new Staff { \repeat volta 2 { c'1 } \alternative { c' } } \new Staff \with { \consists Volta_engraver } { c'2 g' e' a' } \new Staff { \repeat volta 2 { c'1 } \alternative { c' } } >> }
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.
Snippets: Repeats
Internals Reference: VoltaBracket, RepeatedMusic, VoltaRepeatedMusic, and UnfoldedRepeatedMusic.
\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.
Next: Manual repeat commands, Previous: Repeat syntax, Up: Writing repeats
Diese Seite ist für LilyPond-2.11.40 (Entwicklungszweig).
Fehler bitte an http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs melden.
Ihre Vorschläge für die Dokumentation sind willkommen.