1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
12 Repetition is a central concept in music, and multiple notations
13 exist for repetitions.
21 @subsection Writing repeats
28 * Manual repeat commands::
32 @unnumberedsubsubsec Normal repeats
39 Normal repeats, with or without alternate repeats, may be printed:
41 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
42 \repeat volta 2 { c4 d e f }
43 \repeat volta 2 { g f e d }
51 Repeats with upbeats may be created.
53 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
56 \repeat volta 4 { c2 d2 | e2 f2 | }
57 \alternative { { g4 g g e } { a a a a | b2. } }
64 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
67 \repeat volta 4 { e | c2 d2 | e2 f2 | }
68 \alternative { { \partial 4*3 g4 g g } { a a a a | b2. } }
75 Ties may be added to a second ending,
77 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
79 \repeat volta 2 {c4 d e f ~ }
80 \alternative { {f2 d} {f\repeatTie f,} }
83 It is possible to shorten volta brackets by setting
84 @code{voltaSpannerDuration}. In the next example, the bracket
85 only lasts one measure, which is a duration of 3/4.
87 @lilypond[verbatim,ragged-right,quote]
91 \set Score.voltaSpannerDuration = #(ly:make-moment 3 4)
92 \repeat volta 5 { d d d }
93 \alternative { { e e e f f f }
98 If you want to start a repeat at the beginning of a line and have
99 a double bar at the end of the previous line, use
102 @dots{} \bar "||:" \break
103 \repeat volta 2 @{ @dots{}
106 see @ref{Bar lines} for more information.
110 Snippets: @lsrdir{repeats}
112 Internals Reference: @internalsref{VoltaBracket},
113 @internalsref{RepeatedMusic},
114 @internalsref{VoltaRepeatedMusic}, and
115 @internalsref{UnfoldedRepeatedMusic}.
119 Brackets for the repeat are normally only printed over the topmost
120 staff. This can be adjusted by moving @code{Volta_engraver} to
121 the Staff context where you want the brackets to appear; see
122 @ref{Modifying context plug-ins} and
123 @lsr{repeats,volta@/-multi@/-staff@/.ly}.
128 @cindex repeat, ambiguous
139 is ambiguous, since it is is not clear to which @code{\repeat} the
140 @code{\alternative} belongs. This ambiguity is resolved by always
141 having the @code{\alternative} belong to the inner @code{\repeat}.
142 For clarity, it is advisable to use braces in such situations.
144 Timing information is not remembered at the start of an
145 alternative, so after a repeat timing information must be reset by
146 hand; for example, by setting @code{Score.measurePosition} or
147 entering @code{\partial}. Similarly, slurs or ties are also not
153 @unnumberedsubsubsec Repeat syntax
157 LilyPond has one syntactic construct for specifying different
158 types of repeats. The syntax is
161 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
164 If you have alternative endings, you may add
165 @funindex \alternative
176 where each @var{alternative} is a music expression. If you do not
177 give enough alternatives for all of the repeats, the first
178 alternative is assumed to be played more than once.
180 The following types of repetition are supported
184 Repeated music is fully written (played) out. This is useful when
185 entering repetitious music. This is the only kind of repeat that
186 is included in MIDI output.
189 Repeats are not written out, but alternative endings (volte) are
190 printed, left to right with brackets. This is the standard
191 notation for repeats with alternatives. These are not played in
192 MIDI output by default.
196 Make tremolo beams. These are not played in MIDI output by
200 Make beat or measure repeats. These look like percent signs.
201 These are not played in MIDI output by default. Percent repeats
202 must be declared within a @code{Voice} context.
207 @node Manual repeat commands
208 @unnumberedsubsubsec Manual repeat commands
210 @funindex repeatCommands
212 The property @code{repeatCommands} can be used to control the
213 layout of repeats. Its value is a Scheme list of repeat commands.
216 @item @code{start-repeat}
217 Print a @code{|:} bar line.
219 @item @code{end-repeat}
220 Print a @code{:|} bar line.
222 @item @code{(volta @var{text})}
223 Print a volta bracket saying @var{text}: The text can be specified
224 as a text string or as a markup text, see @ref{Text markup}. Do
225 not forget to change the font, as the default number font does not
226 contain alphabetic characters;
228 @item @code{(volta #f)}
229 Stop a running volta bracket.
232 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
234 \set Score.repeatCommands = #'((volta "93") end-repeat)
236 \set Score.repeatCommands = #'((volta #f))
243 Snippets: @lsrdir{repeats}
245 Internals Reference: @internalsref{VoltaBracket},
246 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic},
247 and @internalsref{UnfoldedRepeatedMusic}.
251 @subsection Other repeats
255 * Tremolo subdivisions::
259 @node Tremolo repeats
260 @unnumberedsubsubsec Tremolo repeats
262 @cindex tremolo beams
264 To place tremolo marks between notes, use @code{\repeat} with
267 @lilypond[quote,verbatim,ragged-right]
268 \new Voice \relative c' {
269 \repeat tremolo 8 { c16 d16 }
270 \repeat tremolo 4 { c16 d16 }
271 \repeat tremolo 2 { c16 d16 }
275 Tremolo marks can also be put on a single note. In this case, the
276 note should not be surrounded by braces.
278 @lilypond[quote,verbatim,ragged-right]
279 \repeat tremolo 4 c'16
282 Similar output is obtained using the tremolo subdivision,
283 described in @ref{Tremolo subdivisions}.
288 Notation Reference: @ref{Tremolo subdivisions}, @ref{Repeats}.
290 Snippets: @lsrdir{repeats}
292 Internals Reference: @internalsref{Beam},
293 @internalsref{StemTremolo}.
296 @node Tremolo subdivisions
297 @unnumberedsubsubsec Tremolo subdivisions
299 @cindex tremolo marks
300 @funindex tremoloFlags
302 Tremolo marks can be printed on a single note by adding
303 @q{@code{:}[@var{number}]} after the note. The number indicates
304 the duration of the subdivision, and it must be at least 8. A
305 @var{length} value of 8 gives one line across the note stem. If
306 the length is omitted, the last value (stored in
307 @code{tremoloFlags}) is used
309 @lilypond[quote,ragged-right,verbatim,fragment]
310 c'2:8 c':32 | c': c': |
316 Tremolos entered in this way do not carry over into the MIDI
322 Notation Reference: @ref{Tremolo repeats}.
324 Snippets: @lsrdir{repeats}
326 Elsewhere: @internalsref{StemTremolo}.
329 @node Measure repeats
330 @unnumberedsubsubsec Measure repeats
332 @cindex percent repeats
333 @cindex measure repeats
335 In the @code{percent} style, a note pattern can be repeated. It
336 is printed once, and then the pattern is replaced with a special
337 sign. Patterns of one and two measures are replaced by
338 percent-like signs, patterns that divide the measure length are
339 replaced by slashes. Percent repeats must be declared within a
340 @code{Voice} context.
342 @lilypond[quote,verbatim,ragged-right]
343 \new Voice \relative c' {
344 \repeat percent 4 { c4 }
345 \repeat percent 2 { c2 es2 f4 fis4 g4 c4 }
349 Measure repeats of more than 2 measures get a counter, if you
350 switch on the @code{countPercentRepeats} property,
352 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
354 \set countPercentRepeats = ##t
355 \repeat percent 4 { c1 }
361 Isolated percents can also be printed. This is done by putting a
362 multi-measure rest with a different print function,
364 @lilypond[fragment,verbatim,quote]
365 \override MultiMeasureRest #'stencil
366 = #ly:multi-measure-rest::percent
375 Snippets: @lsrdir{repeats}
377 Internals Reference: @internalsref{RepeatSlash},
378 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
379 @internalsref{DoublePercentRepeatCounter},
380 @internalsref{PercentRepeatCounter},
381 @internalsref{PercentRepeatedMusic}.