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}
85 where @var{musicexpr} is a music expression. Alternate endings can be
86 produced using @code{\alternative}. In order to delimit the alternate
87 endings, the group of alternatives must be enclosed in a set of
88 braces. If there are more repeats than there are alternate endings,
89 the earliest repeats are given the first alternative.
91 Normal repeats without alternate endings:
93 @lilypond[verbatim,quote,relative=2]
94 \repeat volta 2 { c4 d e f }
96 \repeat volta 2 { d4 e f g }
99 Normal repeats with alternate endings:
101 @lilypond[verbatim,quote,relative=2]
102 \repeat volta 4 { c4 d e f }
110 @warning{Do not include @code{@bs{}relative} inside a
111 @code{@bs{}repeat}. It will cause unwanted staves to appear.
112 See @rlearning{An extra staff appears}.}
114 @cindex repeat with upbeat
115 @cindex upbeat in a repeat
116 @cindex anacrucis in a repeat
117 @cindex repeat with anacrucis
118 @cindex repeat with pickup
119 @cindex pickup in a repeat
122 Repeats with upbeats can be entered in two ways:
124 @lilypond[verbatim,quote,relative=2]
127 \repeat volta 4 { c2 d | e2 f | }
137 @lilypond[verbatim,quote,relative=2]
139 \repeat volta 4 { e4 | c2 d | e2 f | }
141 { \partial 4*3 g4 g g }
147 @cindex repeats with ties
148 @cindex alternative endings with ties
149 @cindex ties in repeats
150 @cindex ties in alternative endings
153 Ties may be added to a second ending:
155 @lilypond[verbatim,quote,relative=2]
157 \repeat volta 2 { c4 d e f ~ }
166 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
167 {shortening-volta-brackets.ly}
169 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
170 {adding-volta-brackets-to-additional-staves.ly}
174 Music Glossary: @rglos{repeat}, @rglos{volta}.
176 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
178 Snippets: @rlsr{Repeats}.
180 Internals Reference: @rinternals{VoltaBracket},
181 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
182 @rinternals{UnfoldedRepeatedMusic}.
187 @cindex repeat, ambiguous
188 @cindex nested repeat
189 @cindex repeat, nested
190 @cindex repeat timing information
191 @cindex repeat and measure number
192 @cindex timing information and repeats
193 @cindex measure number and repeats
194 @cindex repeat and slur
195 @cindex slur and repeat
206 is ambiguous, since it is is not clear to which @code{\repeat} the
207 @code{\alternative} belongs. This ambiguity is resolved by always
208 having the @code{\alternative} belong to the inner @code{\repeat}.
209 For clarity, it is advisable to use braces in such situations.
211 Timing information is not remembered at the start of an alternative,
212 so after a repeat timing information must be reset by hand; for
213 example, by setting @code{Score.measurePosition} or entering
214 @code{\partial}. Similarly, slurs are also not repeated.
218 @node Manual repeat marks
219 @unnumberedsubsubsec Manual repeat marks
221 @cindex manual repeat mark
222 @cindex repeat, manual
224 @cindex repeat, start
227 @cindex repeat number, changing
228 @cindex repeat volta, changing
229 @cindex volta bracket
230 @cindex bracket, volta
231 @funindex repeatCommands
232 @funindex start-repeat
234 @warning{These methods are only used for displaying unusual repeat
235 constructs, and may produce unexpected behavior. In most cases,
236 repeats should be created using the standard @code{\\repeat} command
237 or by printing the relevant bar lines. For more information, see
240 The property @code{repeatCommands} can be used to control the
241 layout of repeats. Its value is a Scheme list of repeat commands.
245 Print a @code{|:} bar line.
247 @lilypond[verbatim,quote,relative=2]
249 \set Score.repeatCommands = #'(start-repeat)
254 As per standard engraving practice, repeat signs are not printed
255 at the beginning of a piece.
258 Print a @code{:|} bar line:
260 @lilypond[verbatim,quote,relative=2]
263 \set Score.repeatCommands = #'(end-repeat)
267 @item (volta @var{number}) ... (volta #f)
268 Create a new volta with the specified number. The volta bracket must
269 be explicitly terminated, or it will not be printed.
271 @lilypond[verbatim,quote,relative=2]
273 \set Score.repeatCommands = #'((volta "2"))
275 \set Score.repeatCommands = #'((volta #f))
281 Multiple repeat commands may occur at the same point:
283 @lilypond[verbatim,quote,relative=2]
285 \set Score.repeatCommands = #'((volta "2, 5") end-repeat)
288 \set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat)
290 \set Score.repeatCommands = #'((volta #f))
293 @cindex volta bracket with text
294 @cindex text in volta bracket
296 Text can be included with the volta bracket. The text can be a
297 number or numbers or markup text, see @ref{Formatting text}. The
298 simplest way to use markup text is to define the markup first,
299 then include the markup in a Scheme list.
301 @lilypond[verbatim,quote]
302 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
305 \set Score.repeatCommands = #(list(list 'volta voltaAdLib) 'start-repeat)
307 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
309 \set Score.repeatCommands = #'((volta #f))
316 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
317 {printing-a-repeat-sign-at-the-beginning-of-a-piece.ly}
323 @ref{Formatting text}.
329 @rinternals{VoltaBracket},
330 @rinternals{RepeatedMusic},
331 @rinternals{VoltaRepeatedMusic}.
334 @node Written-out repeats
335 @unnumberedsubsubsec Written-out repeats
337 @cindex written-out repeats
338 @cindex repetitious music
339 @cindex repeats, written-out
340 @cindex repeat, unfold
342 @cindex unfold repeat
343 @cindex unfold repeat with alternate endings
344 @cindex unfold music with alternate endings
345 @cindex alternate ending in written-out repeats
348 By using the @code{unfold} command, repeats can be used to simplify
349 the writing out of repetitious music. The syntax is
352 \repeat unfold @var{repeatcount} @var{musicexpr}
355 where @var{musicexpr} is a music expression and @var{repeatcount} is
356 the number of times @var{musicexpr} is repeated.
358 @lilypond[verbatim,quote,relative=2]
360 \repeat unfold 2 { c4 d e f }
364 Unfold repeats can be made with alternate endings. If there are
365 more repeats than there are alternate endings, the first
366 alternative ending is applied to the earliest endings.
368 @lilypond[verbatim,quote,relative=2]
370 \repeat unfold 2 { g4 f e d }
380 Snippets: @rlsr{Repeats}.
382 Internals Reference: @rinternals{RepeatedMusic},
383 @rinternals{UnfoldedRepeatedMusic}.
387 @subsection Short repeats
389 This section discusses how to input short repeats. Short repeats can
390 take two basic forms: repeats of a single note to two measures,
391 represented by slashes or percent signs; and tremolos.
398 @node Percent repeats
399 @unnumberedsubsubsec Percent repeats
401 @cindex percent repeats
402 @cindex measure repeats
403 @cindex repeat, percent
404 @cindex repeat, measure
405 @cindex repeat, short
406 @funindex \repeat percent
409 Repeated short patterns of notes are supported. The music is printed
410 once, and the pattern is replaced with a special sign. Patterns that
411 are shorter than one measure are replaced by slashes, and patterns of
412 one or two measures are replaced by percent-like signs. The syntax is
415 @code{\repeat percent @var{number} @var{musicexpr}}
418 where @var{musicexpr} is a music expression.
420 @lilypond[verbatim,quote,relative=2]
421 \repeat percent 4 { c4 }
422 \repeat percent 2 { b4 a g f }
423 \repeat percent 2 { c2 es | f4 fis g c | }
428 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
429 {percent-repeat-counter.ly}
431 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
432 {percent-repeat-count-visibility.ly}
434 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
435 {isolated-percent-repeats.ly}
439 Music Glossary: @rglos{percent repeat}, @rglos{simile}.
441 Snippets: @rlsr{Repeats}.
443 Internals Reference: @rinternals{RepeatSlash},
444 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
445 @rinternals{DoublePercentRepeatCounter},
446 @rinternals{PercentRepeatCounter}, @rinternals{PercentRepeatedMusic}.
451 Only three kinds of percent repeats are supported: a single slash
452 representing a single beat (regardless of the duration of the repeated
453 notes); a single slash with dots representing one full measure; and
454 two slashes with dots crossing a bar line representing two full
455 measures. Neither multiple slashes representing single beat repeats
456 consisting of sixteenth or shorter notes, nor two slashes with dots
457 representing single beat repeats consisting of notes of varying
458 durations, are supported.
461 @node Tremolo repeats
462 @unnumberedsubsubsec Tremolo repeats
464 @cindex tremolo beams
466 @cindex repeat, tremolo
467 @funindex \repeat tremolo
470 Tremolos can take two forms: alternation between two chords or two
471 notes, and rapid repetition of a single note or chord. Tremolos
472 consisting of an alternation are indicated by adding beams between the
473 notes or chords being alternated, while tremolos consisting of the
474 rapid repetition of a single note are indicated by adding beams or
475 slashes to a single note.
477 To place tremolo marks between notes, use @code{\repeat} with
480 @lilypond[quote,verbatim,relative=2]
481 \repeat tremolo 8 { c16 d }
482 \repeat tremolo 6 { c16 d }
483 \repeat tremolo 2 { c16 d }
486 The @code{\repeat tremolo} syntax expects exactly two notes within
487 the braces, and the number of repetitions must correspond to a
488 note value that can be expressed with plain or dotted notes. Thus,
489 @code{\repeat tremolo 7} is valid and produces a double dotted
490 note, but @code{\repeat tremolo 9} is not.
492 The duration of the tremolo equals the duration of the
493 braced expression multiplied by the number of repeats:
494 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
495 notated as two whole notes joined by tremolo beams.
497 There are two ways to put tremolo marks on a single note. The
498 @code{\repeat tremolo} syntax is also used here, in which case
499 the note should not be surrounded by braces:
501 @lilypond[quote,verbatim,ragged-right]
502 \repeat tremolo 4 c'16
505 @cindex tremolo marks
506 @funindex tremoloFlags
509 The same output can be obtained by adding
510 @q{@code{:}[@var{number}]} after the note. The number indicates
511 the duration of the subdivision, and it must be at least 8. A
512 @var{number} value of 8 gives one line across the note stem. If
513 the length is omitted, the last value (stored in
514 @code{tremoloFlags}) is used:
516 @lilypond[quote,verbatim,relative=2]
523 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
524 {cross-staff-tremolos.ly}
528 Snippets: @rlsr{Repeats}.
530 @cindex tremolo, cross-staff
531 @cindex cross-staff tremolo
535 Cross-staff tremolos do not work well.