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.
79 @subsection Long repeats
81 This section discusses how to input long (usually multi-measure)
82 repeats. The repeats can take two forms: repeats enclosed between
83 repeat signs; or written out repeats, used to input repetitious music.
84 Repeat signs can also be controlled manually.
88 * Manual repeat marks::
89 * Written-out repeats (unfold)::
96 @cindex volta, seconda
100 @subsubsection Normal repeats
102 The syntax for a normal repeat is
105 \repeat volta @var{repeatcount} @var{musicexpr}
108 where @var{musicexpr} is a music expression. Alternate endings can
109 be produced using @code{\alternative}.
111 Normal repeats without alternate endings:
113 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
114 \repeat volta 2 { c4 d e f }
116 \repeat volta 2 { d4 e f g }
119 Normal repeats with alternate endings:
121 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
122 \repeat volta 2 { g4 f e d }
131 Repeats with upbeats:
133 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
137 \repeat volta 4 { c2 d | e2 f | }
148 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
151 \repeat volta 4 { e4 | c2 d | e2 f | }
153 { \partial 4*3 g4 g g }
162 Ties may be added to a second ending:
164 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
166 \repeat volta 2 {c4 d e f ~ }
175 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
176 {shortening-volta-brackets.ly}
178 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
179 {adding-volta-brackets-to-additional-staves.ly}
182 @c Is there a way to have a final bar ("|.") at the end of the
183 @c previous line? Doesn't seem to be.
184 If you want to start a repeat at the beginning of a line and have a
185 double bar at the end of the previous line, use @code{\bar}. For more
186 information, see @ref{Bar lines}.
188 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
191 \repeat volta 2 { c4 d e f }
197 Music Glossary: @rglos{repeat}, @rglos{volta}.
199 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
201 Snippets: @rlsr{Repeats}.
203 Internals Reference: @rinternals{VoltaBracket},
204 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
205 @rinternals{UnfoldedRepeatedMusic}.
209 @cindex repeat, ambiguous
220 is ambiguous, since it is is not clear to which @code{\repeat} the
221 @code{\alternative} belongs. This ambiguity is resolved by always
222 having the @code{\alternative} belong to the inner @code{\repeat}.
223 For clarity, it is advisable to use braces in such situations.
225 Timing information is not remembered at the start of an alternative,
226 so after a repeat timing information must be reset by hand; for
227 example, by setting @code{Score.measurePosition} or entering
228 @code{\partial}. Similarly, slurs or ties are also not repeated.
232 @node Manual repeat marks
233 @subsubsection Manual repeat marks
235 @funindex repeatCommands
237 @c FIXME: Markup does not work in the "text" field
238 @c And how does one change the font?
239 @c On the whole, this section needs better documentation (why the
240 @c double parentheses around the volta expressions?)
242 The property @code{repeatCommands} can be used to control the
243 layout of repeats. Its value is a Scheme list of repeat commands.
246 @item @code{start-repeat}
247 Print a @code{|:} bar line.
249 @item @code{end-repeat}
250 Print a @code{:|} bar line.
252 @item @code{(volta @var{text})}
253 Print a volta bracket saying @var{text}. The text can be specified as
254 a text string or as a markup text, see @ref{Formatting text}. Do not
255 forget to change the font, as the default number font does not contain
256 alphabetic characters;
259 @item @code{(volta #f)}
260 Stop a running volta bracket.
263 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
265 \set Score.repeatCommands = #'((volta "93") end-repeat)
267 \set Score.repeatCommands = #'((volta #f))
271 @c FIXME: improve visibility of bar lines link?
275 Notation Reference: @ref{Bar lines}, @ref{Formatting text}.
277 Snippets: @rlsr{Repeats}.
279 Internals Reference: @rinternals{VoltaBracket},
280 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic}.
283 @node Written-out repeats (unfold)
284 @subsubsection Written-out repeats (unfold)
286 @cindex written-out repeats
287 @cindex repetitious music
288 @cindex repeats, written-out
290 By using the @code{unfold} command, repeats can be used to simplify
291 the writing out of repetitious music. The syntax is
294 \repeat unfold @var{repeatcount} @var{musicexpr}
297 where @var{musicexpr} is a music expression. Unfold repeats can be
298 made with or without alternate endings. Unfold repeats without
301 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
303 \repeat unfold 2 { c4 d e f }
307 Unfold repeats with alternate endings:
309 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
311 \repeat unfold 2 { g4 f e d }
321 Snippets: @rlsr{Repeats}.
323 Internals Reference: @rinternals{RepeatedMusic},
324 @rinternals{UnfoldedRepeatedMusic}.
327 @subsection Short repeats
329 This section discusses how to input short repeats, either single-note
330 to multi-measure using slash marks, or tremolos.
337 @node Percent repeats
338 @subsubsection Percent repeats
340 @cindex percent repeats
341 @cindex measure repeats
343 Repeated short patterns of notes are also supported. The music is
344 printed once, and the pattern is replaced with a special sign.
345 Patterns of one and two measures are replaced by percent-like signs,
346 patterns that are shorter than one measure are replaced by slashes.
347 Percent repeats must be declared within a @code{Voice} context. The
351 @code{\repeat percent @var{number} @var{musicexpr}}
354 where @var{musicexpr} is a music expression.
356 @lilypond[quote,verbatim,ragged-right]
358 \repeat percent 4 { c4 }
359 \repeat percent 2 { b'4 a g f }
360 \repeat percent 2 { c2 es | f4 fis g c | }
364 Measure repeats of more than two measures get a counter if you
365 switch on the @code{countPercentRepeats} property:
367 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
369 \set countPercentRepeats = ##t
370 \repeat percent 4 { c1 }
375 Isolated percents can also be printed. This is done by entering a
376 multi-measure rest with a different print function:
378 @lilypond[fragment,verbatim,quote]
379 \override MultiMeasureRest #'stencil
380 = #ly:multi-measure-rest::percent
387 Snippets: @rlsr{Repeats}.
389 Internals Reference: @rinternals{RepeatSlash},
390 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
391 @rinternals{DoublePercentRepeatCounter},
392 @rinternals{PercentRepeatCounter},
393 @rinternals{PercentRepeatedMusic}.
395 @node Tremolo repeats
396 @subsubsection Tremolo repeats
398 @cindex tremolo beams
400 To place tremolo marks between notes, use @code{\repeat} with
403 @lilypond[quote,verbatim,ragged-right]
405 \repeat tremolo 8 { c16 d }
406 \repeat tremolo 4 { c16 d }
407 \repeat tremolo 2 { c16 d }
411 The @code{\repeat tremolo} syntax expects exactly two notes within
412 the braces, and the number of repetitions must correspond to a
413 note value that can be expressed with plain or dotted notes. Thus,
414 @code{\repeat tremolo 7} is valid and produces a double dotted
415 note, but @code{\repeat tremolo 9} is not.
417 The duration of the tremolo equals the duration of the
418 braced expression multiplied by the number of repeats:
419 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
420 notated as two whole notes joined by tremolo beams.
422 There are two ways to put tremolo marks on a single note. The
423 @code{\repeat tremolo} syntax is also used here, in which case
424 the note should not be surrounded by braces:
426 @lilypond[quote,verbatim,ragged-right]
427 \repeat tremolo 4 c'16
430 @cindex tremolo marks
431 @funindex tremoloFlags
433 The same output can be obtained by adding
434 @q{@code{:}[@var{number}]} after the note. The number indicates
435 the duration of the subdivision, and it must be at least 8. A
436 @var{number} value of 8 gives one line across the note stem. If
437 the length is omitted, the last value (stored in
438 @code{tremoloFlags}) is used
440 @lilypond[quote,ragged-right,verbatim,fragment]
441 c'2:8 c':32 | c': c': |
448 Tremolos entered with @q{@code{:}[@var{number}]} do not carry over
449 into the MIDI output.
454 Notation Reference: @ref{Tremolo repeats}.
456 Internals Reference: @rinternals{Beam}, @rinternals{StemTremolo}.
458 Snippets: @rlsr{Repeats}.
460 Elsewhere: @rinternals{StemTremolo}.