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 @lilypondfile[ragged-right,line-width=16\cm,staffsize=16,quote]
15 Repetition is a central concept in music, and multiple notations
16 exist for repetitions. LilyPond supports the following kinds of repeats:
21 The repeated music is not written out but enclosed in repeat bar
22 lines. If the repeat is at the beginning of a piece, a repeat bar
23 line is only printed at the end. Alternative endings (volte) are
24 printed, left to right with brackets. This is the standard
25 notation for repeats with alternatives.
28 The repeated music is fully written out, as many times as
29 specified by @var{repeatcount}. This is useful when
30 entering repetitious music.
33 Write beat or measure repeats. These look like percent signs.
34 Percent repeats must be declared within a @code{Voice} context.
42 LilyPond has one syntactic construct for specifying different
43 types of repeats. The syntax is
46 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
49 where @var{repeatbody} is a music expression.
52 Alternative endings are entered with
53 @funindex \alternative
64 after a @code{\repeat volta} or @code{unfold} block, where each
65 @var{alternative} is a music expression. If you give fewer
66 alternatives than @var{repeatcount}, the first alternative is assumed
67 to be played more than once.
72 * Writing long repeats::
76 @node Writing long repeats
77 @subsection Writing long repeats
81 * Manual repeat marks::
82 * Written-out repeats::
89 @cindex volta, seconda
93 @subsubsection Normal repeats
95 The syntax for a normal repeat is
98 \repeat volta @var{repeatcount} @var{repeatbody}
101 where @var{repeatbody} is a music expression. Alternate endings can
102 be produced using @code{\alternative}.
104 Normal repeats without alternate endings:
106 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
107 \repeat volta 2 { c4 d e f }
109 \repeat volta 2 { d4 e f g }
112 Normal repeats with alternate endings:
114 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
115 \repeat volta 2 { g f e d }
124 Repeats with upbeats:
126 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
130 \repeat volta 4 { c2 d2 | e2 f2 | }
131 \alternative { { g4 g g e } { a a a a | b2. } }
138 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
141 \repeat volta 4 { e | c2 d2 | e2 f2 | }
142 \alternative { { \partial 4*3 g4 g g } { a a a a | b2. } }
149 Ties may be added to a second ending:
151 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
153 \repeat volta 2 {c4 d e f ~ }
154 \alternative { {f2 d} {f\repeatTie f,} }
159 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
160 {shortening-volta-brackets.ly}
162 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
163 {adding-volta-brackets-to-additional-staves.ly}
166 @c Is there a way to have a final bar ("|.") at the end of the
167 @c previous line? Doesn't seem to be.
168 If you want to start a repeat at the beginning of a line and have a
169 double bar at the end of the previous line, use @code{\bar}. For more
170 information, see @ref{Bar lines}.
172 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
175 \repeat volta 2 { c4 d e f }
181 Music Glossary: @rglos{repeat}, @rglos{volta}.
183 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
185 Snippets: @lsrdir{Repeats,Repeats}.
187 Internals Reference: @internalsref{VoltaBracket},
188 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic},
189 @internalsref{UnfoldedRepeatedMusic}.
193 @cindex repeat, ambiguous
204 is ambiguous, since it is is not clear to which @code{\repeat} the
205 @code{\alternative} belongs. This ambiguity is resolved by always
206 having the @code{\alternative} belong to the inner @code{\repeat}.
207 For clarity, it is advisable to use braces in such situations.
209 Timing information is not remembered at the start of an alternative,
210 so after a repeat timing information must be reset by hand; for
211 example, by setting @code{Score.measurePosition} or entering
212 @code{\partial}. Similarly, slurs or ties are also not repeated.
216 @node Manual repeat marks
217 @subsubsection Manual repeat marks
219 @funindex repeatCommands
221 @c FIXME: Markup does not work in the "text" field
222 @c And how does one change the font?
223 @c On the whole, this section needs better documentation (why the
224 @c double parentheses around the volta expressions?)
226 The property @code{repeatCommands} can be used to control the
227 layout of repeats. Its value is a Scheme list of repeat commands.
230 @item @code{start-repeat}
231 Print a @code{|:} bar line.
233 @item @code{end-repeat}
234 Print a @code{:|} bar line.
236 @item @code{(volta @var{text})}
237 Print a volta bracket saying @var{text}. The text can be specified as
238 a text string or as a markup text, see @ref{Text markup}. Do not
239 forget to change the font, as the default number font does not contain
240 alphabetic characters;
243 @item @code{(volta #f)}
244 Stop a running volta bracket.
247 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
249 \set Score.repeatCommands = #'((volta "93") end-repeat)
251 \set Score.repeatCommands = #'((volta #f))
255 @c FIXME: improve visibility of bar lines link?
259 Notation Reference: @ref{Bar lines}, @ref{Text markup}.
261 Snippets: @lsrdir{Repeats,Repeats}
263 Internals Reference: @internalsref{VoltaBracket},
264 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic}.
267 @node Written-out repeats
268 @subsubsection Written-out repeats
270 @cindex written-out repeats
271 @cindex repetitious music
272 @cindex repeats, written-out
274 By using the @code{unfold} command, repeats can be used to simplify
275 the writing out of repetitious music. The syntax is
278 \repeat unfold @var{repeatcount} @var{repeatbody}
281 Unfold repeats can be made with or without alternate endings. Unfold
282 repeats without alternate endings:
284 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
286 \repeat unfold 2 { c4 d e f }
290 Unfold repeats with alternate endings:
292 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
294 \repeat unfold 2 { g f e d }
304 Snippets: @lsrdir{Repeats,Repeats}.
306 Internals Reference: @internalsref{RepeatedMusic},
307 @internalsref{UnfoldedRepeatedMusic}.
310 @subsection Short repeats
317 @node Percent repeats
318 @subsubsection Percent repeats
320 @cindex percent repeats
321 @cindex measure repeats
323 A note pattern can be repeated with the @code{\repeat percent
324 @var{number}} syntax. The music is printed once, and the pattern
325 is replaced with a special sign. Patterns of one and two measures
326 are replaced by percent-like signs, patterns that divide the
327 measure length are replaced by slashes. Percent repeats must be
328 declared within a @code{Voice} context.
330 @lilypond[quote,verbatim,ragged-right]
331 \new Voice \relative c' {
332 \repeat percent 4 { c4 }
333 \repeat percent 2 { c2 es2 f4 fis4 g4 c4 }
337 Measure repeats of more than two measures get a counter if you
338 switch on the @code{countPercentRepeats} property:
340 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
342 \set countPercentRepeats = ##t
343 \repeat percent 4 { c1 }
348 Isolated percents can also be printed. This is done by entering a
349 multi-measure rest with a different print function:
351 @lilypond[fragment,verbatim,quote]
352 \override MultiMeasureRest #'stencil
353 = #ly:multi-measure-rest::percent
360 Snippets: @lsrdir{Repeats,Repeats}
362 Internals Reference: @internalsref{RepeatSlash},
363 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
364 @internalsref{DoublePercentRepeatCounter},
365 @internalsref{PercentRepeatCounter},
366 @internalsref{PercentRepeatedMusic}.
368 @node Tremolo repeats
369 @subsubsection Tremolo repeats
371 @cindex tremolo beams
373 To place tremolo marks between notes, use @code{\repeat} with
376 @lilypond[quote,verbatim,ragged-right]
377 \new Voice \relative c' {
378 \repeat tremolo 8 { c16 d16 }
379 \repeat tremolo 4 { c16 d16 }
380 \repeat tremolo 2 { c16 d16 }
384 The @code{\repeat tremolo} syntax expects exactly two notes within
385 the braces, and the number of repetitions must correspond to a
386 note value that can be expressed with plain or dotted notes. Thus,
387 @code{\repeat tremolo 7} is valid and produces a double dotted
388 note, but @code{\repeat tremolo 9} is not.
390 The duration of the tremolo equals the duration of the
391 braced expression multiplied by the number of repeats:
392 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
393 notated as two whole notes joined by tremolo beams.
395 There are two ways to put tremolo marks on a single note. The
396 @code{\repeat tremolo} syntax can be used even here, in which case
397 the note should not be surrounded by braces:
399 @lilypond[quote,verbatim,ragged-right]
400 \repeat tremolo 4 c'16
403 @cindex tremolo marks
404 @funindex tremoloFlags
406 The same output can be obtained by adding
407 @q{@code{:}[@var{number}]} after the note. The number indicates
408 the duration of the subdivision, and it must be at least 8. A
409 @var{number} value of 8 gives one line across the note stem. If
410 the length is omitted, the last value (stored in
411 @code{tremoloFlags}) is used
413 @lilypond[quote,ragged-right,verbatim,fragment]
414 c'2:8 c':32 | c': c': |
421 Tremolos entered with @q{@code{:}[@var{number}]} do not carry over
422 into the MIDI output.
427 Notation Reference: @ref{Tremolo repeats}.
429 Internals Reference: @internalsref{Beam},
430 @internalsref{StemTremolo}.
432 Snippets: @lsrdir{Repeats,Repeats}
434 Elsewhere: @internalsref{StemTremolo}.