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.
14 @lilypondfile[ragged-right,line-width=16\cm,staffsize=16,quote]
17 Repetition is a central concept in music, and multiple notations
18 exist for repetitions. LilyPond supports the following kinds of repeats:
23 The repeated music is not written out but enclosed between repeat bar
24 lines. If the repeat is at the beginning of a piece, a repeat bar
25 line is only printed at the end. Alternative endings (volte) are
26 printed, left to right with brackets. This is the standard notation
27 for repeats with alternatives.
30 The repeated music is fully written out, as many times as
31 specified by @var{repeatcount}. This is useful when
32 entering repetitious music.
35 These are beat or measure repeats. They look like percent signs.
36 Percent repeats must be declared within a @code{Voice} context.
39 This is used to write tremolo beams.
44 LilyPond has one syntactic construct for specifying different
45 types of repeats. The syntax is
48 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
51 where @var{repeatbody} is a music expression.
54 Alternative endings are entered with
55 @funindex \alternative
66 after a @code{\repeat volta} or @code{unfold} block, where each
67 @var{alternative} is a music expression. If you give fewer
68 alternatives than @var{repeatcount}, the first alternative is assumed
69 to be played more than once.
74 * Writing long repeats::
78 @node Writing long repeats
79 @subsection Writing long repeats
83 * Manual repeat marks::
84 * Written-out repeats::
91 @cindex volta, seconda
95 @subsubsection Normal repeats
97 The syntax for a normal repeat is
100 \repeat volta @var{repeatcount} @var{repeatbody}
103 where @var{repeatbody} is a music expression. Alternate endings can
104 be produced using @code{\alternative}.
106 Normal repeats without alternate endings:
108 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
109 \repeat volta 2 { c4 d e f }
111 \repeat volta 2 { d4 e f g }
114 Normal repeats with alternate endings:
116 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
117 \repeat volta 2 { g f e d }
126 Repeats with upbeats:
128 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
132 \repeat volta 4 { c2 d2 | e2 f2 | }
133 \alternative { { g4 g g e } { a a a a | b2. } }
140 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
143 \repeat volta 4 { e | c2 d2 | e2 f2 | }
144 \alternative { { \partial 4*3 g4 g g } { a a a a | b2. } }
151 Ties may be added to a second ending:
153 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
155 \repeat volta 2 {c4 d e f ~ }
156 \alternative { {f2 d} {f\repeatTie f,} }
161 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
162 {shortening-volta-brackets.ly}
164 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
165 {adding-volta-brackets-to-additional-staves.ly}
168 @c Is there a way to have a final bar ("|.") at the end of the
169 @c previous line? Doesn't seem to be.
170 If you want to start a repeat at the beginning of a line and have a
171 double bar at the end of the previous line, use @code{\bar}. For more
172 information, see @ref{Bar lines}.
174 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
177 \repeat volta 2 { c4 d e f }
183 Music Glossary: @rglos{repeat}, @rglos{volta}.
185 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
187 Snippets: @lsrdir{Repeats,Repeats}.
189 Internals Reference: @internalsref{VoltaBracket},
190 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic},
191 @internalsref{UnfoldedRepeatedMusic}.
195 @cindex repeat, ambiguous
206 is ambiguous, since it is is not clear to which @code{\repeat} the
207 @code{\alternative} belongs. This ambiguity is resolved by always
208 having the @code{\alternative} belong to the inner @code{\repeat}.
209 For clarity, it is advisable to use braces in such situations.
211 Timing information is not remembered at the start of an alternative,
212 so after a repeat timing information must be reset by hand; for
213 example, by setting @code{Score.measurePosition} or entering
214 @code{\partial}. Similarly, slurs or ties are also not repeated.
218 @node Manual repeat marks
219 @subsubsection Manual repeat marks
221 @funindex repeatCommands
223 @c FIXME: Markup does not work in the "text" field
224 @c And how does one change the font?
225 @c On the whole, this section needs better documentation (why the
226 @c double parentheses around the volta expressions?)
228 The property @code{repeatCommands} can be used to control the
229 layout of repeats. Its value is a Scheme list of repeat commands.
232 @item @code{start-repeat}
233 Print a @code{|:} bar line.
235 @item @code{end-repeat}
236 Print a @code{:|} bar line.
238 @item @code{(volta @var{text})}
239 Print a volta bracket saying @var{text}. The text can be specified as
240 a text string or as a markup text, see @ref{Formatting text}. Do not
241 forget to change the font, as the default number font does not contain
242 alphabetic characters;
245 @item @code{(volta #f)}
246 Stop a running volta bracket.
249 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
251 \set Score.repeatCommands = #'((volta "93") end-repeat)
253 \set Score.repeatCommands = #'((volta #f))
257 @c FIXME: improve visibility of bar lines link?
261 Notation Reference: @ref{Bar lines}, @ref{Formatting text}.
263 Snippets: @lsrdir{Repeats,Repeats}
265 Internals Reference: @internalsref{VoltaBracket},
266 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic}.
269 @node Written-out repeats
270 @subsubsection Written-out repeats
272 @cindex written-out repeats
273 @cindex repetitious music
274 @cindex repeats, written-out
276 By using the @code{unfold} command, repeats can be used to simplify
277 the writing out of repetitious music. The syntax is
280 \repeat unfold @var{repeatcount} @var{repeatbody}
283 Unfold repeats can be made with or without alternate endings. Unfold
284 repeats without alternate endings:
286 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
288 \repeat unfold 2 { c4 d e f }
292 Unfold repeats with alternate endings:
294 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
296 \repeat unfold 2 { g4 f e d }
306 Snippets: @lsrdir{Repeats,Repeats}.
308 Internals Reference: @internalsref{RepeatedMusic},
309 @internalsref{UnfoldedRepeatedMusic}.
312 @subsection Short repeats
319 @node Percent repeats
320 @subsubsection Percent repeats
322 @cindex percent repeats
323 @cindex measure repeats
325 A note pattern can be repeated with the @code{\repeat percent
326 @var{number}} syntax. The music is printed once, and the pattern
327 is replaced with a special sign. Patterns of one and two measures
328 are replaced by percent-like signs, patterns that divide the
329 measure length are replaced by slashes. Percent repeats must be
330 declared within a @code{Voice} context.
332 @lilypond[quote,verbatim,ragged-right]
333 \new Voice \relative c' {
334 \repeat percent 4 { c4 }
335 \repeat percent 2 { b4 a4 g4 f4 }
336 \repeat percent 2 { c2 es2 f4 fis4 g4 c4 }
340 Measure repeats of more than two measures get a counter if you
341 switch on the @code{countPercentRepeats} property:
343 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
345 \set countPercentRepeats = ##t
346 \repeat percent 4 { c1 }
351 Isolated percents can also be printed. This is done by entering a
352 multi-measure rest with a different print function:
354 @lilypond[fragment,verbatim,quote]
355 \override MultiMeasureRest #'stencil
356 = #ly:multi-measure-rest::percent
363 Snippets: @lsrdir{Repeats,Repeats}.
365 Internals Reference: @internalsref{RepeatSlash},
366 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
367 @internalsref{DoublePercentRepeatCounter},
368 @internalsref{PercentRepeatCounter},
369 @internalsref{PercentRepeatedMusic}.
371 @node Tremolo repeats
372 @subsubsection Tremolo repeats
374 @cindex tremolo beams
376 To place tremolo marks between notes, use @code{\repeat} with
379 @lilypond[quote,verbatim,ragged-right]
380 \new Voice \relative c' {
381 \repeat tremolo 8 { c16 d16 }
382 \repeat tremolo 4 { c16 d16 }
383 \repeat tremolo 2 { c16 d16 }
387 The @code{\repeat tremolo} syntax expects exactly two notes within
388 the braces, and the number of repetitions must correspond to a
389 note value that can be expressed with plain or dotted notes. Thus,
390 @code{\repeat tremolo 7} is valid and produces a double dotted
391 note, but @code{\repeat tremolo 9} is not.
393 The duration of the tremolo equals the duration of the
394 braced expression multiplied by the number of repeats:
395 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
396 notated as two whole notes joined by tremolo beams.
398 There are two ways to put tremolo marks on a single note. The
399 @code{\repeat tremolo} syntax can be used even here, in which case
400 the note should not be surrounded by braces:
402 @lilypond[quote,verbatim,ragged-right]
403 \repeat tremolo 4 c'16
406 @cindex tremolo marks
407 @funindex tremoloFlags
409 The same output can be obtained by adding
410 @q{@code{:}[@var{number}]} after the note. The number indicates
411 the duration of the subdivision, and it must be at least 8. A
412 @var{number} value of 8 gives one line across the note stem. If
413 the length is omitted, the last value (stored in
414 @code{tremoloFlags}) is used
416 @lilypond[quote,ragged-right,verbatim,fragment]
417 c'2:8 c':32 | c': c': |
424 Tremolos entered with @q{@code{:}[@var{number}]} do not carry over
425 into the MIDI output.
430 Notation Reference: @ref{Tremolo repeats}.
432 Internals Reference: @internalsref{Beam},
433 @internalsref{StemTremolo}.
435 Snippets: @lsrdir{Repeats,Repeats}
437 Elsewhere: @internalsref{StemTremolo}.