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.
12 @lilypondfile[ragged-right,line-width=16\cm,staffsize=16,quote]
15 Repetition is a central concept in music, and multiple notations
16 exist for repetitions. LilyPond supports the following kinds of repeats:
21 The repeated music is not written out but enclosed in repeat bar
22 lines. If the repeat is at the beginning of a piece, a repeat bar
23 line is only printed at the end. Alternative endings (volte) are
24 printed, left to right with brackets. This is the standard
25 notation for repeats with alternatives.
28 The repeated music is fully written out, as many times as
29 specified by @var{repeatcount}. This is useful when
30 entering repetitious music.
33 Write beat or measure repeats. These look like percent signs.
34 Percent repeats must be declared within a @code{Voice} context.
42 LilyPond has one syntactic construct for specifying different
43 types of repeats. The syntax is
46 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
49 where @var{repeatbody} is a music expression.
52 Alternative endings are entered with
53 @funindex \alternative
64 after a @code{\repeat volta} or @code{unfold} block, where each
65 @var{alternative} is a music expression. If you give fewer
66 alternatives than @var{repeatcount}, the first alternative is assumed
67 to be played more than once.
72 * Writing long repeats::
76 @node Writing long repeats
77 @subsection Writing long repeats
81 * Manual repeat marks::
82 * Written-out repeats::
89 @cindex volta, seconda
93 @subsubsection Normal repeats
95 The syntax for a normal repeat is
98 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
101 where @var{variant} is @qq{volta} and @var{repeatbody} is a music
102 expression. Alternate endings can be produced using
105 Normal repeats without alternate endings:
107 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
108 \repeat volta 2 { c4 d e f }
110 \repeat volta 2 { d4 e f g }
113 Normal repeats with alternate endings:
115 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
116 \repeat volta 2 { g f e d }
125 Repeats with upbeats:
127 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
131 \repeat volta 4 { c2 d2 | e2 f2 | }
132 \alternative { { g4 g g e } { a a a a | b2. } }
139 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
142 \repeat volta 4 { e | c2 d2 | e2 f2 | }
143 \alternative { { \partial 4*3 g4 g g } { a a a a | b2. } }
150 Ties may be added to a second ending:
152 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
154 \repeat volta 2 {c4 d e f ~ }
155 \alternative { {f2 d} {f\repeatTie f,} }
160 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
161 {shortening-volta-brackets.ly}
163 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
164 {adding-volta-brackets-to-additional-staves.ly}
167 @c Is there a way to have a final bar ("|.") at the end of the
168 @c previous line? Doesn't seem to be.
169 If you want to start a repeat at the beginning of a line and have a
170 double bar at the end of the previous line, use @code{\bar}. See
171 @ref{Bar lines} for more information.
173 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
176 \repeat volta 2 { c4 d e f }
182 Music Glossary: @rglos{repeat}.
183 @c FIXME : add @rglos{volta} after glossary addition
185 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
187 Snippets: @lsrdir{Repeats,Repeats}.
189 Internals Reference: @internalsref{VoltaBracket},
190 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic},
191 @internalsref{UnfoldedRepeatedMusic}.
198 @cindex repeat, ambiguous
209 is ambiguous, since it is is not clear to which @code{\repeat} the
210 @code{\alternative} belongs. This ambiguity is resolved by always
211 having the @code{\alternative} belong to the inner @code{\repeat}.
212 For clarity, it is advisable to use braces in such situations.
214 Timing information is not remembered at the start of an alternative,
215 so after a repeat timing information must be reset by hand; for
216 example, by setting @code{Score.measurePosition} or entering
217 @code{\partial}. Similarly, slurs or ties are also not repeated.
221 @node Manual repeat marks
222 @subsubsection Manual repeat marks
224 @funindex repeatCommands
226 @c FIXME: Markup does not work in the "text" field
227 @c And how does one change the font?
228 @c On the whole, this section needs better documentation (why the
229 @c double parentheses around the volta expressions?)
231 The property @code{repeatCommands} can be used to control the
232 layout of repeats. Its value is a Scheme list of repeat commands.
235 @item @code{start-repeat}
236 Print a @code{|:} bar line.
238 @item @code{end-repeat}
239 Print a @code{:|} bar line.
241 @item @code{(volta @var{text})}
242 Print a volta bracket saying @var{text}. The text can be specified as
243 a text string or as a markup text, see @ref{Text markup}. Do not
244 forget to change the font, as the default number font does not contain
245 alphabetic characters;
248 @item @code{(volta #f)}
249 Stop a running volta bracket.
252 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
254 \set Score.repeatCommands = #'((volta "93") end-repeat)
256 \set Score.repeatCommands = #'((volta #f))
260 @c FIXME: improve visibility of bar lines link?
264 Notation Reference: @ref{Bar lines}.
266 Snippets: @lsrdir{Repeats,Repeats}
268 Internals Reference: @internalsref{VoltaBracket},
269 @internalsref{RepeatedMusic}, @internalsref{VoltaRepeatedMusic},
270 and @internalsref{UnfoldedRepeatedMusic}.
273 @node Written-out repeats
274 @subsubsection Written-out repeats
282 @subsection Short repeats
289 @node Percent repeats
290 @subsubsection Percent repeats
292 @cindex percent repeats
293 @cindex measure repeats
295 A note pattern can be repeated with the @code{\repeat percent
296 @var{number}} syntax. The music is printed once, and the pattern
297 is replaced with a special sign. Patterns of one and two measures
298 are replaced by percent-like signs, patterns that divide the
299 measure length are replaced by slashes. Percent repeats must be
300 declared within a @code{Voice} context.
302 @lilypond[quote,verbatim,ragged-right]
303 \new Voice \relative c' {
304 \repeat percent 4 { c4 }
305 \repeat percent 2 { c2 es2 f4 fis4 g4 c4 }
309 Measure repeats of more than two measures get a counter if you
310 switch on the @code{countPercentRepeats} property:
312 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
314 \set countPercentRepeats = ##t
315 \repeat percent 4 { c1 }
320 Isolated percents can also be printed. This is done by entering a
321 multi-measure rest with a different print function:
323 @lilypond[fragment,verbatim,quote]
324 \override MultiMeasureRest #'stencil
325 = #ly:multi-measure-rest::percent
332 Snippets: @lsrdir{Repeats,Repeats}
334 Internals Reference: @internalsref{RepeatSlash},
335 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
336 @internalsref{DoublePercentRepeatCounter},
337 @internalsref{PercentRepeatCounter},
338 @internalsref{PercentRepeatedMusic}.
340 @node Tremolo repeats
341 @subsubsection Tremolo repeats
343 @cindex tremolo beams
345 To place tremolo marks between notes, use @code{\repeat} with
348 @lilypond[quote,verbatim,ragged-right]
349 \new Voice \relative c' {
350 \repeat tremolo 8 { c16 d16 }
351 \repeat tremolo 4 { c16 d16 }
352 \repeat tremolo 2 { c16 d16 }
356 The @code{\repeat tremolo} syntax expects exactly two notes within
357 the braces, and the number of repetitions must correspond to a
358 note value that can be expressed with plain or dotted notes. Thus,
359 @code{\repeat tremolo 7} is valid and produces a double dotted
360 note, but @code{\repeat tremolo 9} is not.
362 The duration of the tremolo equals the duration of the
363 braced expression multiplied by the number of repeats:
364 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
365 notated as two whole notes joined by tremolo beams.
367 There are two ways to put tremolo marks on a single note. The
368 @code{\repeat tremolo} syntax can be used even here, in which case
369 the note should not be surrounded by braces:
371 @lilypond[quote,verbatim,ragged-right]
372 \repeat tremolo 4 c'16
375 @cindex tremolo marks
376 @funindex tremoloFlags
378 The same output can be obtained by adding
379 @q{@code{:}[@var{number}]} after the note. The number indicates
380 the duration of the subdivision, and it must be at least 8. A
381 @var{number} value of 8 gives one line across the note stem. If
382 the length is omitted, the last value (stored in
383 @code{tremoloFlags}) is used
385 @lilypond[quote,ragged-right,verbatim,fragment]
386 c'2:8 c':32 | c': c': |
393 Tremolos entered with @q{@code{:}[@var{number}]} do not carry over
394 into the MIDI output.
399 Notation Reference: @ref{Tremolo repeats}.
401 Internals Reference: @internalsref{Beam},
402 @internalsref{StemTremolo}.
404 Snippets: @lsrdir{Repeats,Repeats}
406 Elsewhere: @internalsref{StemTremolo}.