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 @rlearning{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}
175 Music Glossary: @rglos{repeat}, @rglos{volta}.
177 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
179 Snippets: @rlsr{Repeats}.
181 Internals Reference: @rinternals{VoltaBracket},
182 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
183 @rinternals{UnfoldedRepeatedMusic}.
188 @cindex repeat, ambiguous
189 @cindex nested repeat
190 @cindex repeat, nested
191 @cindex repeat timing information
192 @cindex repeat and measure number
193 @cindex timing information and repeats
194 @cindex measure number and repeats
195 @cindex repeat and slur
196 @cindex slur and repeat
207 is ambiguous, since it is is not clear to which @code{\repeat} the
208 @code{\alternative} belongs. This ambiguity is resolved by always
209 having the @code{\alternative} belong to the inner @code{\repeat}.
210 For clarity, it is advisable to use braces in such situations.
212 Timing information is not remembered at the start of an alternative,
213 so after a repeat timing information must be reset by hand; for
214 example, by setting @code{Score.measurePosition} or entering
215 @code{\partial}. Similarly, slurs are also not repeated.
219 @node Manual repeat marks
220 @unnumberedsubsubsec Manual repeat marks
222 @cindex manual repeat mark
223 @cindex repeat, manual
225 @cindex repeat, start
228 @cindex repeat number, changing
229 @cindex repeat volta, changing
230 @cindex volta bracket
231 @cindex bracket, volta
232 @funindex repeatCommands
233 @funindex start-repeat
235 @warning{These methods are only used for displaying unusual repeat
236 constructs, and may produce unexpected behavior. In most cases,
237 repeats should be created using the standard @code{\\repeat} command
238 or by printing the relevant bar lines. For more information, see
241 The property @code{repeatCommands} can be used to control the
242 layout of repeats. Its value is a Scheme list of repeat commands.
246 Print a @code{|:} bar line.
248 @lilypond[verbatim,quote,relative=2]
250 \set Score.repeatCommands = #'(start-repeat)
255 As per standard engraving practice, repeat signs are not printed
256 at the beginning of a piece.
259 Print a @code{:|} bar line:
261 @lilypond[verbatim,quote,relative=2]
264 \set Score.repeatCommands = #'(end-repeat)
268 @item (volta @var{number}) ... (volta #f)
269 Create a new volta with the specified number. The volta bracket must
270 be explicitly terminated, or it will not be printed.
272 @lilypond[verbatim,quote,relative=2]
274 \set Score.repeatCommands = #'((volta "2"))
276 \set Score.repeatCommands = #'((volta #f))
282 Multiple repeat commands may occur at the same point:
284 @lilypond[verbatim,quote,relative=2]
286 \set Score.repeatCommands = #'((volta "2, 5") end-repeat)
289 \set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat)
291 \set Score.repeatCommands = #'((volta #f))
294 @cindex volta bracket with text
295 @cindex text in volta bracket
297 Text can be included with the volta bracket. The text can be a
298 number or numbers or markup text, see @ref{Formatting text}. The
299 simplest way to use markup text is to define the markup first,
300 then include the markup in a Scheme list.
302 @lilypond[verbatim,quote]
303 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
306 \set Score.repeatCommands = #(list(list 'volta voltaAdLib) 'start-repeat)
308 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
310 \set Score.repeatCommands = #'((volta #f))
317 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
318 {printing-a-repeat-sign-at-the-beginning-of-a-piece.ly}
324 @ref{Formatting text}.
330 @rinternals{VoltaBracket},
331 @rinternals{RepeatedMusic},
332 @rinternals{VoltaRepeatedMusic}.
335 @node Written-out repeats
336 @unnumberedsubsubsec Written-out repeats
338 @cindex written-out repeats
339 @cindex repetitious music
340 @cindex repeats, written-out
341 @cindex repeat, unfold
343 @cindex unfold repeat
344 @cindex unfold repeat with alternate endings
345 @cindex unfold music with alternate endings
346 @cindex alternate ending in written-out repeats
349 By using the @code{unfold} command, repeats can be used to simplify
350 the writing out of repetitious music. The syntax is
353 \repeat unfold @var{repeatcount} @var{musicexpr}
357 where @var{musicexpr} is a music expression and @var{repeatcount} is
358 the number of times @var{musicexpr} is repeated.
360 @lilypond[verbatim,quote,relative=2]
362 \repeat unfold 2 { c4 d e f }
366 Unfold repeats can be made with alternate endings. If there are
367 more repeats than there are alternate endings, the first
368 alternative ending is applied to the earliest endings.
370 @lilypond[verbatim,quote,relative=2]
372 \repeat unfold 2 { g4 f e d }
382 Snippets: @rlsr{Repeats}.
384 Internals Reference: @rinternals{RepeatedMusic},
385 @rinternals{UnfoldedRepeatedMusic}.
389 @subsection Short repeats
391 This section discusses how to input short repeats. Short repeats can
392 take two basic forms: repeats of a single note to two measures,
393 represented by slashes or percent signs; and tremolos.
400 @node Percent repeats
401 @unnumberedsubsubsec Percent repeats
403 @cindex percent repeats
404 @cindex measure repeats
405 @cindex repeat, percent
406 @cindex repeat, measure
407 @cindex repeat, short
408 @funindex \repeat percent
411 Repeated short patterns of notes are supported. The music is printed
412 once, and the pattern is replaced with a special sign. Patterns that
413 are shorter than one measure are replaced by slashes, and patterns of
414 one or two measures are replaced by percent-like signs. The syntax is
417 @code{\repeat percent @var{number} @var{musicexpr}}
421 where @var{musicexpr} is a music expression.
423 @lilypond[verbatim,quote,relative=2]
424 \repeat percent 4 { c4 }
425 \repeat percent 2 { b4 a g f }
426 \repeat percent 2 { c2 es | f4 fis g c | }
431 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
432 {percent-repeat-counter.ly}
434 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
435 {percent-repeat-count-visibility.ly}
437 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
438 {isolated-percent-repeats.ly}
442 Music Glossary: @rglos{percent repeat}, @rglos{simile}.
444 Snippets: @rlsr{Repeats}.
446 Internals Reference: @rinternals{RepeatSlash},
447 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
448 @rinternals{DoublePercentRepeatCounter},
449 @rinternals{PercentRepeatCounter}, @rinternals{PercentRepeatedMusic}.
454 Only three kinds of percent repeats are supported: a single slash
455 representing a single beat (regardless of the duration of the repeated
456 notes); a single slash with dots representing one full measure; and
457 two slashes with dots crossing a bar line representing two full
458 measures. Neither multiple slashes representing single beat repeats
459 consisting of sixteenth or shorter notes, nor two slashes with dots
460 representing single beat repeats consisting of notes of varying
461 durations, are supported.
464 @node Tremolo repeats
465 @unnumberedsubsubsec Tremolo repeats
467 @cindex tremolo beams
469 @cindex repeat, tremolo
470 @funindex \repeat tremolo
473 Tremolos can take two forms: alternation between two chords or two
474 notes, and rapid repetition of a single note or chord. Tremolos
475 consisting of an alternation are indicated by adding beams between the
476 notes or chords being alternated, while tremolos consisting of the
477 rapid repetition of a single note are indicated by adding beams or
478 slashes to a single note.
480 To place tremolo marks between notes, use @code{\repeat} with
483 @lilypond[quote,verbatim,relative=2]
484 \repeat tremolo 8 { c16 d }
485 \repeat tremolo 6 { c16 d }
486 \repeat tremolo 2 { c16 d }
489 The @code{\repeat tremolo} syntax expects exactly two notes within
490 the braces, and the number of repetitions must correspond to a
491 note value that can be expressed with plain or dotted notes. Thus,
492 @code{\repeat tremolo 7} is valid and produces a double dotted
493 note, but @code{\repeat tremolo 9} is not.
495 The duration of the tremolo equals the duration of the
496 braced expression multiplied by the number of repeats:
497 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
498 notated as two whole notes joined by tremolo beams.
500 There are two ways to put tremolo marks on a single note. The
501 @code{\repeat tremolo} syntax is also used here, in which case
502 the note should not be surrounded by braces:
504 @lilypond[quote,verbatim,ragged-right]
505 \repeat tremolo 4 c'16
508 @cindex tremolo marks
509 @funindex tremoloFlags
512 The same output can be obtained by adding
513 @q{@code{:}[@var{number}]} after the note. The number indicates
514 the duration of the subdivision, and it must be at least 8. A
515 @var{number} value of 8 gives one line across the note stem. If
516 the length is omitted, the last value (stored in
517 @code{tremoloFlags}) is used:
519 @lilypond[quote,verbatim,relative=2]
526 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
527 {cross-staff-tremolos.ly}
531 Snippets: @rlsr{Repeats}.
533 @cindex tremolo, cross-staff
534 @cindex cross-staff tremolo
538 Cross-staff tremolos do not work well.