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. Unfold repeats without
296 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
298 \repeat unfold 2 { c4 d e f }
302 Unfold repeats with alternate endings:
304 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
306 \repeat unfold 2 { g4 f e d }
316 Snippets: @lsrdir{Repeats,Repeats}.
318 Internals Reference: @internalsref{RepeatedMusic},
319 @internalsref{UnfoldedRepeatedMusic}.
322 @subsection Short repeats
329 @node Percent repeats
330 @subsubsection Percent repeats
332 @cindex percent repeats
333 @cindex measure repeats
335 Repeated short patterns of notes are also supported. The music is
336 printed once, and the pattern is replaced with a special sign.
337 Patterns of one and two measures are replaced by percent-like signs,
338 patterns that are shorter than onee measure are replaced by slashes.
339 Percent repeats must be declared within a @code{Voice} context. The
343 @code{\repeat percent @var{number} @var{musicexpr}}
346 where @var{musicexpr} is a music expression.
348 @lilypond[quote,verbatim,ragged-right]
349 \new Voice \relative c' {
350 \repeat percent 4 { c4 }
351 \repeat percent 2 { b4 a g f }
352 \repeat percent 2 { c2 es | f4 fis g c | }
356 Measure repeats of more than two measures get a counter if you
357 switch on the @code{countPercentRepeats} property:
359 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
361 \set countPercentRepeats = ##t
362 \repeat percent 4 { c1 }
367 Isolated percents can also be printed. This is done by entering a
368 multi-measure rest with a different print function:
370 @lilypond[fragment,verbatim,quote]
371 \override MultiMeasureRest #'stencil
372 = #ly:multi-measure-rest::percent
379 Snippets: @lsrdir{Repeats,Repeats}.
381 Internals Reference: @internalsref{RepeatSlash},
382 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
383 @internalsref{DoublePercentRepeatCounter},
384 @internalsref{PercentRepeatCounter},
385 @internalsref{PercentRepeatedMusic}.
387 @node Tremolo repeats
388 @subsubsection Tremolo repeats
390 @cindex tremolo beams
392 To place tremolo marks between notes, use @code{\repeat} with
395 @lilypond[quote,verbatim,ragged-right]
396 \new Voice \relative c' {
397 \repeat tremolo 8 { c16 d }
398 \repeat tremolo 4 { c16 d }
399 \repeat tremolo 2 { c16 d }
403 The @code{\repeat tremolo} syntax expects exactly two notes within
404 the braces, and the number of repetitions must correspond to a
405 note value that can be expressed with plain or dotted notes. Thus,
406 @code{\repeat tremolo 7} is valid and produces a double dotted
407 note, but @code{\repeat tremolo 9} is not.
409 The duration of the tremolo equals the duration of the
410 braced expression multiplied by the number of repeats:
411 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
412 notated as two whole notes joined by tremolo beams.
414 There are two ways to put tremolo marks on a single note. The
415 @code{\repeat tremolo} syntax is also used here, in which case
416 the note should not be surrounded by braces:
418 @lilypond[quote,verbatim,ragged-right]
419 \repeat tremolo 4 c'16
422 @cindex tremolo marks
423 @funindex tremoloFlags
425 The same output can be obtained by adding
426 @q{@code{:}[@var{number}]} after the note. The number indicates
427 the duration of the subdivision, and it must be at least 8. A
428 @var{number} value of 8 gives one line across the note stem. If
429 the length is omitted, the last value (stored in
430 @code{tremoloFlags}) is used
432 @lilypond[quote,ragged-right,verbatim,fragment]
433 c'2:8 c':32 | c': c': |
440 Tremolos entered with @q{@code{:}[@var{number}]} do not carry over
441 into the MIDI output.
446 Notation Reference: @ref{Tremolo repeats}.
448 Internals Reference: @internalsref{Beam}, @internalsref{StemTremolo}.
450 Snippets: @lsrdir{Repeats,Repeats}.
452 Elsewhere: @internalsref{StemTremolo}.