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[quote]{repeats-headword.ly}
16 Repetition is a central concept in music, and multiple notations
17 exist for repetitions. LilyPond supports the following kinds of
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 of the repeat. Alternative endings
26 (volte) are printed left to right with brackets. This is the standard
27 notation 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
68 @cindex repeat, normal
70 @cindex repeat with alternate endings
71 @cindex alternate endings
73 @funindex \alternative
77 @unnumberedsubsubsec Normal repeats
79 The syntax for a normal repeat is
82 \repeat volta @var{repeatcount} @var{musicexpr}
86 where @var{musicexpr} is a music expression. Alternate endings can be
87 produced using @code{\alternative}. In order to delimit the alternate
88 endings, the group of alternatives must be enclosed in a set of
89 braces. If there are more repeats than there are alternate endings,
90 the earliest repeats are given the first alternative.
92 Normal repeats without alternate endings:
94 @lilypond[verbatim,quote,relative=2]
95 \repeat volta 2 { c4 d e f }
97 \repeat volta 2 { d4 e f g }
100 Normal repeats with alternate endings:
102 @lilypond[verbatim,quote,relative=2]
103 \repeat volta 4 { c4 d e f }
111 @warning{Do not include @code{@bs{}relative} inside a
112 @code{@bs{}repeat}. It will cause unwanted staves to appear.
113 See @rprogram{An extra staff appears}.}
115 @cindex repeat with upbeat
116 @cindex upbeat in a repeat
117 @cindex anacrucis in a repeat
118 @cindex repeat with anacrucis
119 @cindex repeat with pickup
120 @cindex pickup in a repeat
123 Repeats with upbeats can be entered in two ways:
125 @lilypond[verbatim,quote,relative=2]
128 \repeat volta 4 { c2 d | e2 f | }
138 @lilypond[verbatim,quote,relative=2]
140 \repeat volta 4 { e4 | c2 d | e2 f | }
142 { \partial 4*3 g4 g g }
148 @cindex repeats with ties
149 @cindex alternative endings with ties
150 @cindex ties in repeats
151 @cindex ties in alternative endings
154 Ties may be added to a second ending:
156 @lilypond[verbatim,quote,relative=2]
158 \repeat volta 2 { c4 d e f ~ }
167 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
168 {shortening-volta-brackets.ly}
170 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
171 {adding-volta-brackets-to-additional-staves.ly}
181 @ref{Modifying context plug-ins}.
187 @rinternals{VoltaBracket},
188 @rinternals{RepeatedMusic},
189 @rinternals{VoltaRepeatedMusic},
190 @rinternals{UnfoldedRepeatedMusic}.
195 @cindex repeat, ambiguous
196 @cindex nested repeat
197 @cindex repeat, nested
198 @cindex repeat timing information
199 @cindex repeat and measure number
200 @cindex timing information and repeats
201 @cindex measure number and repeats
202 @cindex repeat and slur
203 @cindex slur and repeat
214 is ambiguous, since it is is not clear to which @code{\repeat} the
215 @code{\alternative} belongs. This ambiguity is resolved by always
216 having the @code{\alternative} belong to the inner @code{\repeat}.
217 For clarity, it is advisable to use braces in such situations.
219 Timing information is not remembered at the start of an alternative,
220 so after a repeat timing information must be reset by hand; for
221 example, by setting @code{Score.measurePosition} or entering
222 @code{\partial}. Similarly, slurs are also not repeated.
226 @node Manual repeat marks
227 @unnumberedsubsubsec Manual repeat marks
229 @cindex manual repeat mark
230 @cindex repeat, manual
232 @cindex repeat, start
235 @cindex repeat number, changing
236 @cindex repeat volta, changing
237 @cindex volta bracket
238 @cindex bracket, volta
239 @funindex repeatCommands
240 @funindex start-repeat
242 @warning{These methods are only used for displaying unusual repeat
243 constructs, and may produce unexpected behavior. In most cases,
244 repeats should be created using the standard @code{\\repeat} command
245 or by printing the relevant bar lines. For more information, see
248 The property @code{repeatCommands} can be used to control the
249 layout of repeats. Its value is a Scheme list of repeat commands.
253 Print a @code{|:} bar line.
255 @lilypond[verbatim,quote,relative=2]
257 \set Score.repeatCommands = #'(start-repeat)
262 As per standard engraving practice, repeat signs are not printed
263 at the beginning of a piece.
266 Print a @code{:|} bar line:
268 @lilypond[verbatim,quote,relative=2]
271 \set Score.repeatCommands = #'(end-repeat)
275 @item (volta @var{number}) ... (volta #f)
276 Create a new volta with the specified number. The volta bracket must
277 be explicitly terminated, or it will not be printed.
279 @lilypond[verbatim,quote,relative=2]
281 \set Score.repeatCommands = #'((volta "2"))
283 \set Score.repeatCommands = #'((volta #f))
289 Multiple repeat commands may occur at the same point:
291 @lilypond[verbatim,quote,relative=2]
293 \set Score.repeatCommands = #'((volta "2, 5") end-repeat)
296 \set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat)
298 \set Score.repeatCommands = #'((volta #f))
301 @cindex volta bracket with text
302 @cindex text in volta bracket
304 Text can be included with the volta bracket. The text can be a
305 number or numbers or markup text, see @ref{Formatting text}. The
306 simplest way to use markup text is to define the markup first,
307 then include the markup in a Scheme list.
309 @lilypond[verbatim,quote]
310 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
313 \set Score.repeatCommands = #(list(list 'volta voltaAdLib) 'start-repeat)
315 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
317 \set Score.repeatCommands = #'((volta #f))
324 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
325 {printing-a-repeat-sign-at-the-beginning-of-a-piece.ly}
331 @ref{Formatting text}.
337 @rinternals{VoltaBracket},
338 @rinternals{RepeatedMusic},
339 @rinternals{VoltaRepeatedMusic}.
342 @node Written-out repeats
343 @unnumberedsubsubsec Written-out repeats
345 @cindex written-out repeats
346 @cindex repetitious music
347 @cindex repeats, written-out
348 @cindex repeat, unfold
350 @cindex unfold repeat
351 @cindex unfold repeat with alternate endings
352 @cindex unfold music with alternate endings
353 @cindex alternate ending in written-out repeats
356 By using the @code{unfold} command, repeats can be used to simplify
357 the writing out of repetitious music. The syntax is
360 \repeat unfold @var{repeatcount} @var{musicexpr}
364 where @var{musicexpr} is a music expression and @var{repeatcount} is
365 the number of times @var{musicexpr} is repeated.
367 @lilypond[verbatim,quote,relative=2]
369 \repeat unfold 2 { c4 d e f }
373 Unfold repeats can be made with alternate endings. If there are
374 more repeats than there are alternate endings, the first
375 alternative ending is applied to the earliest endings.
377 @lilypond[verbatim,quote,relative=2]
379 \repeat unfold 2 { g4 f e d }
393 @rinternals{RepeatedMusic},
394 @rinternals{UnfoldedRepeatedMusic}.
398 @subsection Short repeats
400 This section discusses how to input short repeats. Short repeats can
401 take two basic forms: repeats of a single note to two measures,
402 represented by slashes or percent signs; and tremolos.
409 @node Percent repeats
410 @unnumberedsubsubsec Percent repeats
412 @cindex percent repeats
413 @cindex measure repeats
414 @cindex repeat, percent
415 @cindex repeat, measure
416 @cindex repeat, short
417 @funindex \repeat percent
420 Repeated short patterns of notes are supported. The music is printed
421 once, and the pattern is replaced with a special sign. Patterns that
422 are shorter than one measure are replaced by slashes, and patterns of
423 one or two measures are replaced by percent-like signs. The syntax is
426 @code{\repeat percent @var{number} @var{musicexpr}}
430 where @var{musicexpr} is a music expression.
432 @lilypond[verbatim,quote,relative=2]
433 \repeat percent 4 { c4 }
434 \repeat percent 2 { b4 a g f }
435 \repeat percent 2 { c2 es | f4 fis g c | }
440 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
441 {percent-repeat-counter.ly}
443 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
444 {percent-repeat-count-visibility.ly}
446 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
447 {isolated-percent-repeats.ly}
452 @rglos{percent repeat},
459 @rinternals{RepeatSlash},
460 @rinternals{PercentRepeat},
461 @rinternals{DoublePercentRepeat},
462 @rinternals{DoublePercentRepeatCounter},
463 @rinternals{PercentRepeatCounter},
464 @rinternals{PercentRepeatedMusic}.
469 Only three kinds of percent repeats are supported: a single slash
470 representing a single beat (regardless of the duration of the repeated
471 notes); a single slash with dots representing one full measure; and
472 two slashes with dots crossing a bar line representing two full
473 measures. Neither multiple slashes representing single beat repeats
474 consisting of sixteenth or shorter notes, nor two slashes with dots
475 representing single beat repeats consisting of notes of varying
476 durations, are supported.
479 @node Tremolo repeats
480 @unnumberedsubsubsec Tremolo repeats
482 @cindex tremolo beams
484 @cindex repeat, tremolo
485 @funindex \repeat tremolo
488 Tremolos can take two forms: alternation between two chords or two
489 notes, and rapid repetition of a single note or chord. Tremolos
490 consisting of an alternation are indicated by adding beams between the
491 notes or chords being alternated, while tremolos consisting of the
492 rapid repetition of a single note are indicated by adding beams or
493 slashes to a single note.
495 To place tremolo marks between notes, use @code{\repeat} with
498 @lilypond[quote,verbatim,relative=2]
499 \repeat tremolo 8 { c16 d }
500 \repeat tremolo 6 { c16 d }
501 \repeat tremolo 2 { c16 d }
504 The @code{\repeat tremolo} syntax expects exactly two notes within
505 the braces, and the number of repetitions must correspond to a
506 note value that can be expressed with plain or dotted notes. Thus,
507 @code{\repeat tremolo 7} is valid and produces a double dotted
508 note, but @code{\repeat tremolo 9} is not.
510 The duration of the tremolo equals the duration of the
511 braced expression multiplied by the number of repeats:
512 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
513 notated as two whole notes joined by tremolo beams.
515 There are two ways to put tremolo marks on a single note. The
516 @code{\repeat tremolo} syntax is also used here, in which case
517 the note should not be surrounded by braces:
519 @lilypond[quote,verbatim,ragged-right]
520 \repeat tremolo 4 c'16
523 @cindex tremolo marks
524 @funindex tremoloFlags
527 The same output can be obtained by adding
528 @q{@code{:}[@var{number}]} after the note. The number indicates
529 the duration of the subdivision, and it must be at least 8. A
530 @var{number} value of 8 gives one line across the note stem. If
531 the length is omitted, the last value (stored in
532 @code{tremoloFlags}) is used:
534 @lilypond[quote,verbatim,relative=2]
541 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
542 {cross-staff-tremolos.ly}
549 @cindex tremolo, cross-staff
550 @cindex cross-staff tremolo
554 Cross-staff tremolos do not work well.