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 single slashes or
39 This is used to write tremolo beams.
50 @subsection Long repeats
52 This section discusses how to input long (usually multi-measure)
53 repeats. The repeats can take two forms: repeats enclosed between
54 repeat signs; or written out repeats, used to input repetitious music.
55 Repeat signs can also be controlled manually.
59 * Manual repeat marks::
60 * Written-out repeats::
67 @cindex volta, seconda
71 @subsubsection Normal repeats
73 The syntax for a normal repeat is
76 \repeat volta @var{repeatcount} @var{musicexpr}
79 where @var{musicexpr} is a music expression. Alternate endings can
80 be produced using @code{\alternative}.
82 Normal repeats without alternate endings:
84 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
85 \repeat volta 2 { c4 d e f }
87 \repeat volta 2 { d4 e f g }
90 Normal repeats with alternate endings:
92 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
93 \repeat volta 2 { g4 f e d }
102 Repeats with upbeats can be entered in two ways:
104 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
108 \repeat volta 4 { c2 d | e2 f | }
119 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
122 \repeat volta 4 { e4 | c2 d | e2 f | }
124 { \partial 4*3 g4 g g }
133 Ties may be added to a second ending:
135 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
137 \repeat volta 2 {c4 d e f ~ }
146 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
147 {shortening-volta-brackets.ly}
149 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
150 {adding-volta-brackets-to-additional-staves.ly}
153 @c Is there a way to have a final bar ("|.") at the end of the
154 @c previous line? Doesn't seem to be.
155 If you want to start a repeat at the beginning of a line and have a
156 double bar at the end of the previous line, use @code{\bar}. For more
157 information, see @ref{Bar lines}.
159 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
162 \repeat volta 2 { c4 d e f }
168 Music Glossary: @rglos{repeat}, @rglos{volta}.
170 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
172 Snippets: @rlsr{Repeats}.
174 Internals Reference: @rinternals{VoltaBracket},
175 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
176 @rinternals{UnfoldedRepeatedMusic}.
180 @cindex repeat, ambiguous
191 is ambiguous, since it is is not clear to which @code{\repeat} the
192 @code{\alternative} belongs. This ambiguity is resolved by always
193 having the @code{\alternative} belong to the inner @code{\repeat}.
194 For clarity, it is advisable to use braces in such situations.
196 Timing information is not remembered at the start of an alternative,
197 so after a repeat timing information must be reset by hand; for
198 example, by setting @code{Score.measurePosition} or entering
199 @code{\partial}. Similarly, slurs are also not repeated.
203 @node Manual repeat marks
204 @subsubsection Manual repeat marks
206 @funindex repeatCommands
208 @c FIXME: Markup does not work in the "text" field
209 @c And how does one change the font?
210 @c On the whole, this section needs better documentation (why the
211 @c double parentheses around the volta expressions?)
213 The property @code{repeatCommands} can be used to control the
214 layout of repeats. Its value is a Scheme list of repeat commands.
217 @item @code{start-repeat}
218 Print a @code{|:} bar line.
220 @item @code{end-repeat}
221 Print a @code{:|} bar line.
223 @item @code{(volta @var{text})}
224 Print a volta bracket saying @var{text}. The text can be specified as
225 a text string or as a markup text, see @ref{Formatting text}. Do not
226 forget to change the font, as the default number font does not contain
227 alphabetic characters;
230 @item @code{(volta #f)}
231 Stop a running volta bracket.
234 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
236 \set Score.repeatCommands = #'((volta "93") end-repeat)
238 \set Score.repeatCommands = #'((volta #f))
242 @c FIXME: improve visibility of bar lines link?
246 Notation Reference: @ref{Bar lines}, @ref{Formatting text}.
248 Snippets: @rlsr{Repeats}.
250 Internals Reference: @rinternals{VoltaBracket},
251 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic}.
254 @node Written-out repeats
255 @subsubsection Written-out repeats
257 @cindex written-out repeats
258 @cindex repetitious music
259 @cindex repeats, written-out
261 By using the @code{unfold} command, repeats can be used to simplify
262 the writing out of repetitious music. The syntax is
265 \repeat unfold @var{repeatcount} @var{musicexpr}
268 where @var{musicexpr} is a music expression. Unfold repeats can be
269 made with or without alternate endings. Unfold repeats without
272 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
274 \repeat unfold 2 { c4 d e f }
278 Unfold repeats with alternate endings:
280 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
282 \repeat unfold 2 { g4 f e d }
292 Snippets: @rlsr{Repeats}.
294 Internals Reference: @rinternals{RepeatedMusic},
295 @rinternals{UnfoldedRepeatedMusic}.
298 @subsection Short repeats
300 This section discusses how to input short repeats. Short repeats can
301 take two basic forms: repeats of a single note to two measures,
302 represented by slashes or percent signs; and tremolos.
309 @node Percent repeats
310 @subsubsection Percent repeats
312 @cindex percent repeats
313 @cindex measure repeats
315 Repeated short patterns of notes are supported. The music is printed
316 once, and the pattern is replaced with a special sign. Patterns that
317 are shorter than one measure are replaced by slashes, and patterns of
318 one or two measures are replaced by percent-like signs. The syntax is
321 @code{\repeat percent @var{number} @var{musicexpr}}
324 where @var{musicexpr} is a music expression.
326 @lilypond[quote,verbatim,ragged-right]
328 \repeat percent 4 { c4 }
329 \repeat percent 2 { b'4 a g f }
330 \repeat percent 2 { c2 es | f4 fis g c | }
334 Measure repeats of more than two repeats get a counter if you switch
335 on the @code{countPercentRepeats} property:
337 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
339 \set countPercentRepeats = ##t
340 \repeat percent 4 { c1 }
345 Isolated percents can also be printed. This is done by entering a
346 multi-measure rest with a different print function:
348 @lilypond[fragment,verbatim,quote]
349 \override MultiMeasureRest #'stencil
350 = #ly:multi-measure-rest::percent
357 Only three kinds of percent repeats are supported: a single slash
358 representing a single beat (regardless of the duration of the repeated
359 notes); a single slash with dots representing one full measure; and
360 two slashes with dots crossing a bar line representing two full
361 measures. Neither multiple slashes representing single beat repeats
362 consisting of sixteenth or shorter notes, nor two slashes with dots
363 representing single beat repeats consisting of notes of varying
364 durations, are supported.
369 Music Glossary: @rglos{percent repeat}, @rglos{simile}.
371 Snippets: @rlsr{Repeats}.
373 Internals Reference: @rinternals{RepeatSlash},
374 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
375 @rinternals{DoublePercentRepeatCounter},
376 @rinternals{PercentRepeatCounter}, @rinternals{PercentRepeatedMusic}.
378 @node Tremolo repeats
379 @subsubsection Tremolo repeats
381 Tremolos can take two forms: alternation between two chords or two
382 notes, and rapid repetition of a single
383 note or chord. Tremolos consisting of an alternation are indicated by
384 adding beams between the notes or chords being alternated, while
385 tremolos consisting of the rapid repetition of a single note are
386 indicated by adding beams or slashes to a single note.
388 @cindex tremolo beams
390 To place tremolo marks between notes, use @code{\repeat} with
393 @lilypond[quote,verbatim,ragged-right]
395 \repeat tremolo 8 { c16 d }
396 \repeat tremolo 4 { c16 d }
397 \repeat tremolo 2 { c16 d }
401 The @code{\repeat tremolo} syntax expects exactly two notes within
402 the braces, and the number of repetitions must correspond to a
403 note value that can be expressed with plain or dotted notes. Thus,
404 @code{\repeat tremolo 7} is valid and produces a double dotted
405 note, but @code{\repeat tremolo 9} is not.
407 The duration of the tremolo equals the duration of the
408 braced expression multiplied by the number of repeats:
409 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
410 notated as two whole notes joined by tremolo beams.
412 There are two ways to put tremolo marks on a single note. The
413 @code{\repeat tremolo} syntax is also used here, in which case
414 the note should not be surrounded by braces:
416 @lilypond[quote,verbatim,ragged-right]
417 \repeat tremolo 4 c'16
420 @cindex tremolo marks
421 @funindex tremoloFlags
423 The same output can be obtained by adding
424 @q{@code{:}[@var{number}]} after the note. The number indicates
425 the duration of the subdivision, and it must be at least 8. A
426 @var{number} value of 8 gives one line across the note stem. If
427 the length is omitted, the last value (stored in
428 @code{tremoloFlags}) is used
430 @lilypond[quote,ragged-right,verbatim,fragment]
431 c'2:8 c':32 | c': c': |
438 Tremolos entered with @q{@code{:}[@var{number}]} do not carry over
439 into the MIDI output.
444 @c Notation Reference: @re