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{musicexpr}
51 where @var{musicexpr} 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{musicexpr}
103 where @var{musicexpr} 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 { g4 f e d }
126 Repeats with upbeats:
128 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
132 \repeat volta 4 { c2 d | e2 f | }
143 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
146 \repeat volta 4 { e4 | c2 d | e2 f | }
148 { \partial 4*3 g4 g g }
157 Ties may be added to a second ending:
159 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
161 \repeat volta 2 {c4 d e f ~ }
170 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
171 {shortening-volta-brackets.ly}
173 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
174 {adding-volta-brackets-to-additional-staves.ly}
177 @c Is there a way to have a final bar ("|.") at the end of the
178 @c previous line? Doesn't seem to be.
179 If you want to start a repeat at the beginning of a line and have a
180 double bar at the end of the previous line, use @code{\bar}. For more
181 information, see @ref{Bar lines}.
183 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
186 \repeat volta 2 { c4 d e f }
192 Music Glossary: @rglos{repeat}, @rglos{volta}.
194 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
196 Snippets: @lsrdir{Repeats,Repeats}.
198 Internals Reference: @internalsref{VoltaBracket},
199 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic},
200 @internalsref{UnfoldedRepeatedMusic}.
204 @cindex repeat, ambiguous
215 is ambiguous, since it is is not clear to which @code{\repeat} the
216 @code{\alternative} belongs. This ambiguity is resolved by always
217 having the @code{\alternative} belong to the inner @code{\repeat}.
218 For clarity, it is advisable to use braces in such situations.
220 Timing information is not remembered at the start of an alternative,
221 so after a repeat timing information must be reset by hand; for
222 example, by setting @code{Score.measurePosition} or entering
223 @code{\partial}. Similarly, slurs or ties are also not repeated.
227 @node Manual repeat marks
228 @subsubsection Manual repeat marks
230 @funindex repeatCommands
232 @c FIXME: Markup does not work in the "text" field
233 @c And how does one change the font?
234 @c On the whole, this section needs better documentation (why the
235 @c double parentheses around the volta expressions?)
237 The property @code{repeatCommands} can be used to control the
238 layout of repeats. Its value is a Scheme list of repeat commands.
241 @item @code{start-repeat}
242 Print a @code{|:} bar line.
244 @item @code{end-repeat}
245 Print a @code{:|} bar line.
247 @item @code{(volta @var{text})}
248 Print a volta bracket saying @var{text}. The text can be specified as
249 a text string or as a markup text; see @ref{Formatting text}. Do not
250 forget to change the font, as the default number font does not contain
251 alphabetic characters.
254 @item @code{(volta #f)}
255 Stop a running volta bracket.
258 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
260 \set Score.repeatCommands = #'((volta "93") end-repeat)
262 \set Score.repeatCommands = #'((volta #f))
266 @c FIXME: improve visibility of bar lines link?
270 Notation Reference: @ref{Bar lines}, @ref{Formatting text}.
272 Snippets: @lsrdir{Repeats,Repeats}.
274 Internals Reference: @internalsref{VoltaBracket},
275 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic}.
278 @node Written-out repeats
279 @subsubsection Written-out repeats
281 @cindex written-out repeats
282 @cindex repetitious music
283 @cindex repeats, written-out
285 By using the @code{unfold} command, repeats can be used to simplify
286 the writing out of repetitious music. The syntax is
289 \repeat unfold @var{repeatcount} @var{musicexpr}
292 where @var{musicexpr} is a music expression. Unfold repeats can be
293 made with or without alternate endings.
295 Unfold repeats without alternate endings:
297 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
299 \repeat unfold 2 { c4 d e f }
303 Unfold repeats with alternate endings:
305 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
307 \repeat unfold 2 { g4 f e d }
317 Snippets: @lsrdir{Repeats,Repeats}.
319 Internals Reference: @internalsref{RepeatedMusic},
320 @internalsref{UnfoldedRepeatedMusic}.
323 @subsection Short repeats
330 @node Percent repeats
331 @subsubsection Percent repeats
333 @cindex percent repeats
334 @cindex measure repeats
336 Repeated short patterns of notes are also supported. The music is
337 printed once, and the pattern is replaced with a special sign.
338 Patterns of one and two measures are replaced by percent-like signs,
339 patterns that are shorter than one measure are replaced by slashes.
340 Percent repeats must be declared within a @code{Voice} context. The
344 @code{\repeat percent @var{number} @var{musicexpr}}
347 where @var{musicexpr} is a music expression.
349 @lilypond[quote,verbatim,ragged-right]
350 \new Voice \relative c' {
351 \repeat percent 4 { c4 }
352 \repeat percent 2 { b4 a g f }
353 \repeat percent 2 { c2 es | f4 fis g c | }
357 Measure repeats of more than two measures get a counter if you
358 switch on the @code{countPercentRepeats} property:
360 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
362 \set countPercentRepeats = ##t
363 \repeat percent 4 { c1 }
368 Isolated percents can also be printed. This is done by entering a
369 multi-measure rest with a different print function:
371 @lilypond[fragment,verbatim,quote]
372 \override MultiMeasureRest #'stencil
373 = #ly:multi-measure-rest::percent
380 Snippets: @lsrdir{Repeats,Repeats}.
382 Internals Reference: @internalsref{RepeatSlash},
383 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
384 @internalsref{DoublePercentRepeatCounter},
385 @internalsref{PercentRepeatCounter},
386 @internalsref{PercentRepeatedMusic}.
388 @node Tremolo repeats
389 @subsubsection Tremolo repeats
391 @cindex tremolo beams
393 To place tremolo marks between notes, use @code{\repeat} with
396 @lilypond[quote,verbatim,ragged-right]
397 \new Voice \relative c' {
398 \repeat tremolo 8 { c16 d }
399 \repeat tremolo 4 { c16 d }
400 \repeat tremolo 2 { c16 d }
404 The @code{\repeat tremolo} syntax expects exactly two notes within
405 the braces, and the number of repetitions must correspond to a
406 note value that can be expressed with plain or dotted notes. Thus,
407 @code{\repeat tremolo 7} is valid and produces a double dotted
408 note, but @code{\repeat tremolo 9} is not.
410 The duration of the tremolo equals the duration of the
411 braced expression multiplied by the number of repeats:
412 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
413 notated as two whole notes joined by tremolo beams.
415 There are two ways to put tremolo marks on a single note. The
416 @code{\repeat tremolo} syntax is also used here, in which case
417 the note should not be surrounded by braces:
419 @lilypond[quote,verbatim,ragged-right]
420 \repeat tremolo 4 c'16
423 @cindex tremolo marks
424 @funindex tremoloFlags
426 The same output can be obtained by adding
427 @q{@code{:}[@var{number}]} after the note. The number indicates
428 the duration of the subdivision, and it must be at least 8. A
429 @var{number} value of 8 gives one line across the note stem. If
430 the length is omitted, the last value (stored in
431 @code{tremoloFlags}) is used
433 @lilypond[quote,ragged-right,verbatim,fragment]
434 c'2:8 c':32 | c': c': |
441 Tremolos entered with @q{@code{:}[@var{number}]} do not carry over
442 into the MIDI output.
447 Music Glossary: @rglos{tremolo}.
449 Notation Reference: @ref{Tremolo repeats}.
451 Internals Reference: @internalsref{Beam}, @internalsref{StemTremolo}.
453 Snippets: @lsrdir{Repeats,Repeats}.