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.
38 This is used to write tremolo beams.
49 @subsection Long repeats
51 This section discusses how to input long (usually multi-measure)
52 repeats. The repeats can take two forms: repeats enclosed between
53 repeat signs; or written out repeats, used to input repetitious music.
54 Repeat signs can also be controlled manually.
58 * Manual repeat marks::
59 * Written-out repeats::
66 @cindex volta, seconda
70 @subsubsection Normal repeats
72 The syntax for a normal repeat is
75 \repeat volta @var{repeatcount} @var{musicexpr}
78 where @var{musicexpr} is a music expression. Alternate endings can
79 be produced using @code{\alternative}.
81 Normal repeats without alternate endings:
83 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
84 \repeat volta 2 { c4 d e f }
86 \repeat volta 2 { d4 e f g }
89 Normal repeats with alternate endings:
91 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
92 \repeat volta 2 { g4 f e d }
101 Repeats with upbeats:
103 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
107 \repeat volta 4 { c2 d | e2 f | }
118 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
121 \repeat volta 4 { e4 | c2 d | e2 f | }
123 { \partial 4*3 g4 g g }
132 Ties may be added to a second ending:
134 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
136 \repeat volta 2 {c4 d e f ~ }
145 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
146 {shortening-volta-brackets.ly}
148 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
149 {adding-volta-brackets-to-additional-staves.ly}
152 @c Is there a way to have a final bar ("|.") at the end of the
153 @c previous line? Doesn't seem to be.
154 If you want to start a repeat at the beginning of a line and have a
155 double bar at the end of the previous line, use @code{\bar}. For more
156 information, see @ref{Bar lines}.
158 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
161 \repeat volta 2 { c4 d e f }
167 Music Glossary: @rglos{repeat}, @rglos{volta}.
169 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
171 Snippets: @rlsr{Repeats}.
173 Internals Reference: @rinternals{VoltaBracket},
174 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
175 @rinternals{UnfoldedRepeatedMusic}.
179 @cindex repeat, ambiguous
190 is ambiguous, since it is is not clear to which @code{\repeat} the
191 @code{\alternative} belongs. This ambiguity is resolved by always
192 having the @code{\alternative} belong to the inner @code{\repeat}.
193 For clarity, it is advisable to use braces in such situations.
195 Timing information is not remembered at the start of an alternative,
196 so after a repeat timing information must be reset by hand; for
197 example, by setting @code{Score.measurePosition} or entering
198 @code{\partial}. Similarly, slurs or ties are also not repeated.
202 @node Manual repeat marks
203 @subsubsection Manual repeat marks
205 @funindex repeatCommands
207 @c FIXME: Markup does not work in the "text" field
208 @c And how does one change the font?
209 @c On the whole, this section needs better documentation (why the
210 @c double parentheses around the volta expressions?)
212 The property @code{repeatCommands} can be used to control the
213 layout of repeats. Its value is a Scheme list of repeat commands.
216 @item @code{start-repeat}
217 Print a @code{|:} bar line.
219 @item @code{end-repeat}
220 Print a @code{:|} bar line.
222 @item @code{(volta @var{text})}
223 Print a volta bracket saying @var{text}. The text can be specified as
224 a text string or as a markup text, see @ref{Formatting text}. Do not
225 forget to change the font, as the default number font does not contain
226 alphabetic characters;
229 @item @code{(volta #f)}
230 Stop a running volta bracket.
233 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
235 \set Score.repeatCommands = #'((volta "93") end-repeat)
237 \set Score.repeatCommands = #'((volta #f))
241 @c FIXME: improve visibility of bar lines link?
245 Notation Reference: @ref{Bar lines}, @ref{Formatting text}.
247 Snippets: @rlsr{Repeats}.
249 Internals Reference: @rinternals{VoltaBracket},
250 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic}.
253 @node Written-out repeats
254 @subsubsection Written-out repeats
256 @cindex written-out repeats
257 @cindex repetitious music
258 @cindex repeats, written-out
260 By using the @code{unfold} command, repeats can be used to simplify
261 the writing out of repetitious music. The syntax is
264 \repeat unfold @var{repeatcount} @var{musicexpr}
267 where @var{musicexpr} is a music expression. Unfold repeats can be
268 made with or without alternate endings. Unfold repeats without
271 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
273 \repeat unfold 2 { c4 d e f }
277 Unfold repeats with alternate endings:
279 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
281 \repeat unfold 2 { g4 f e d }
291 Snippets: @rlsr{Repeats}.
293 Internals Reference: @rinternals{RepeatedMusic},
294 @rinternals{UnfoldedRepeatedMusic}.
297 @subsection Short repeats
299 This section discusses how to input short repeats. Short repeats can
300 take two basic forms: repeats of a single note to two measures,
301 represented by slashes or percent signs; and tremolos.
308 @node Percent repeats
309 @subsubsection Percent repeats
311 @cindex percent repeats
312 @cindex measure repeats
314 Repeated short patterns of notes are supported. The music is printed
315 once, and the pattern is replaced with a special sign. Patterns that
316 are shorter than one measure are replaced by slashes, and patterns of
317 one or two measures are replaced by percent-like signs. The syntax is
320 @code{\repeat percent @var{number} @var{musicexpr}}
323 where @var{musicexpr} is a music expression.
325 @lilypond[quote,verbatim,ragged-right]
327 \repeat percent 4 { c4 }
328 \repeat percent 2 { b'4 a g f }
329 \repeat percent 2 { c2 es | f4 fis g c | }
333 Measure repeats of more than two repeats get a counter if you switch
334 on the @code{countPercentRepeats} property:
336 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
338 \set countPercentRepeats = ##t
339 \repeat percent 4 { c1 }
344 Isolated percents can also be printed. This is done by entering a
345 multi-measure rest with a different print function:
347 @lilypond[fragment,verbatim,quote]
348 \override MultiMeasureRest #'stencil
349 = #ly:multi-measure-rest::percent
356 Only three kinds of percent repeats are supported: a single slash
357 representing a single beat (regardless of the duration of the repeated
358 notes); a single slash with dots representing one full measure; and
359 two slashes with dots crossing a bar line representing two full
360 measures. Neither multiple slashes representing single beat repeats
361 consisting of sixteenth or shorter notes, nor two slashes with dots
362 representing single beat repeats consisting of notes of varying
363 durations, are supported.
368 Snippets: @rlsr{Repeats}.
370 Internals Reference: @rinternals{RepeatSlash},
371 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
372 @rinternals{DoublePercentRepeatCounter},
373 @rinternals{PercentRepeatCounter}, @rinternals{PercentRepeatedMusic}.
375 @node Tremolo repeats
376 @subsubsection Tremolo repeats
378 Tremolos can take two forms: alternation between two chords or two
379 notes, and rapid repetition of a single
380 note or chord. Tremolos consisting of an alternation are indicated by
381 adding beams between the notes or chords being alternated, while
382 tremolos consisting of the rapid repetition of a single note are
383 indicated by adding beams or slashes to a single note.
385 @cindex tremolo beams
387 To place tremolo marks between notes, use @code{\repeat} with
390 @lilypond[quote,verbatim,ragged-right]
392 \repeat tremolo 8 { c16 d }
393 \repeat tremolo 4 { c16 d }
394 \repeat tremolo 2 { c16 d }
398 The @code{\repeat tremolo} syntax expects exactly two notes within
399 the braces, and the number of repetitions must correspond to a
400 note value that can be expressed with plain or dotted notes. Thus,
401 @code{\repeat tremolo 7} is valid and produces a double dotted
402 note, but @code{\repeat tremolo 9} is not.
404 The duration of the tremolo equals the duration of the
405 braced expression multiplied by the number of repeats:
406 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
407 notated as two whole notes joined by tremolo beams.
409 There are two ways to put tremolo marks on a single note. The
410 @code{\repeat tremolo} syntax is also used here, in which case
411 the note should not be surrounded by braces:
413 @lilypond[quote,verbatim,ragged-right]
414 \repeat tremolo 4 c'16
417 @cindex tremolo marks
418 @funindex tremoloFlags
420 The same output can be obtained by adding
421 @q{@code{:}[@var{number}]} after the note. The number indicates
422 the duration of the subdivision, and it must be at least 8. A
423 @var{number} value of 8 gives one line across the note stem. If
424 the length is omitted, the last value (stored in
425 @code{tremoloFlags}) is used
427 @lilypond[quote,ragged-right,verbatim,fragment]
428 c'2:8 c':32 | c': c': |
435 Tremolos entered with @q{@code{:}[@var{number}]} do not carry over
436 into the MIDI output.
441 Notation Reference: @ref{Tremolo repeats}.
443 Internals Reference: @rinternals{Beam}, @rinternals{StemTremolo}.
445 Snippets: @rlsr{Repeats}.
447 Elsewhere: @rinternals{StemTremolo}.