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 }
111 @cindex repeat with upbeat
112 @cindex upbeat in a repeat
113 @cindex anacrucis in a repeat
114 @cindex repeat with anacrucis
115 @cindex repeat with pickup
116 @cindex pickup in a repeat
119 Repeats with upbeats can be entered in two ways:
121 @lilypond[verbatim,quote,relative=2]
124 \repeat volta 4 { c2 d | e2 f | }
134 @lilypond[verbatim,quote,relative=2]
136 \repeat volta 4 { e4 | c2 d | e2 f | }
138 { \partial 4*3 g4 g g }
144 @cindex repeats with ties
145 @cindex alternative endings with ties
146 @cindex ties in repeats
147 @cindex ties in alternative endings
150 Ties may be added to a second ending:
152 @lilypond[verbatim,quote,relative=2]
154 \repeat volta 2 { c4 d e f ~ }
163 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
164 {shortening-volta-brackets.ly}
166 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
167 {adding-volta-brackets-to-additional-staves.ly}
171 Music Glossary: @rglos{repeat}, @rglos{volta}.
173 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
175 Snippets: @rlsr{Repeats}.
177 Internals Reference: @rinternals{VoltaBracket},
178 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
179 @rinternals{UnfoldedRepeatedMusic}.
184 @cindex repeat, ambiguous
185 @cindex nested repeat
186 @cindex repeat, nested
187 @cindex repeat timing information
188 @cindex repeat and measure number
189 @cindex timing information and repeats
190 @cindex measure number and repeats
191 @cindex repeat and slur
192 @cindex slur and repeat
203 is ambiguous, since it is is not clear to which @code{\repeat} the
204 @code{\alternative} belongs. This ambiguity is resolved by always
205 having the @code{\alternative} belong to the inner @code{\repeat}.
206 For clarity, it is advisable to use braces in such situations.
208 Timing information is not remembered at the start of an alternative,
209 so after a repeat timing information must be reset by hand; for
210 example, by setting @code{Score.measurePosition} or entering
211 @code{\partial}. Similarly, slurs are also not repeated.
215 @node Manual repeat marks
216 @unnumberedsubsubsec Manual repeat marks
218 @cindex manual repeat mark
219 @cindex repeat, manual
221 @cindex repeat, start
224 @cindex repeat number, changing
225 @cindex repeat volta, changing
226 @cindex volta bracket
227 @cindex bracket, volta
228 @funindex repeatCommands
229 @funindex start-repeat
231 @warning{These methods are only used for displaying unusual repeat
232 constructs, and may produce unexpected behavior. In most cases,
233 repeats should be created using the standard @code{\\repeat} command
234 or by printing the relevant bar lines. For more information, see
237 The property @code{repeatCommands} can be used to control the
238 layout of repeats. Its value is a Scheme list of repeat commands.
242 Print a @code{|:} bar line.
244 @lilypond[verbatim,quote,relative=2]
246 \set Score.repeatCommands = #'(start-repeat)
251 As per standard engraving practice, repeat signs are not printed
252 at the beginning of a piece.
255 Print a @code{:|} bar line:
257 @lilypond[verbatim,quote,relative=2]
260 \set Score.repeatCommands = #'(end-repeat)
264 @item (volta @var{number}) ... (volta #f)
265 Create a new volta with the specified number. The volta bracket must
266 be explicitly terminated, or it will not be printed.
268 @lilypond[verbatim,quote,relative=2]
270 \set Score.repeatCommands = #'((volta "2"))
272 \set Score.repeatCommands = #'((volta #f))
278 Multiple repeat commands may occur at the same point:
280 @lilypond[verbatim,quote,relative=2]
282 \set Score.repeatCommands = #'((volta "2, 5") end-repeat)
285 \set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat)
287 \set Score.repeatCommands = #'((volta #f))
290 @cindex volta bracket with text
291 @cindex text in volta bracket
293 Text can be included with the volta bracket. The text can be a
294 number or numbers or markup text, see @ref{Formatting text}. The
295 simplest way to use markup text is to define the markup first,
296 then include the markup in a Scheme list.
298 @lilypond[verbatim,quote]
299 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
302 \set Score.repeatCommands = #(list(list 'volta voltaAdLib) 'start-repeat)
304 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
306 \set Score.repeatCommands = #'((volta #f))
313 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
314 {printing-a-repeat-sign-at-the-beginning-of-a-piece.ly}
320 @ref{Formatting text}.
326 @rinternals{VoltaBracket},
327 @rinternals{RepeatedMusic},
328 @rinternals{VoltaRepeatedMusic}.
331 @node Written-out repeats
332 @unnumberedsubsubsec Written-out repeats
334 @cindex written-out repeats
335 @cindex repetitious music
336 @cindex repeats, written-out
337 @cindex repeat, unfold
339 @cindex unfold repeat
340 @cindex unfold repeat with alternate endings
341 @cindex unfold music with alternate endings
342 @cindex alternate ending in written-out repeats
345 By using the @code{unfold} command, repeats can be used to simplify
346 the writing out of repetitious music. The syntax is
349 \repeat unfold @var{repeatcount} @var{musicexpr}
352 where @var{musicexpr} is a music expression and @var{repeatcount} is
353 the number of times @var{musicexpr} is repeated.
355 @lilypond[verbatim,quote,relative=2]
357 \repeat unfold 2 { c4 d e f }
361 Unfold repeats can be made with alternate endings. If there are
362 more repeats than there are alternate endings, the first
363 alternative ending is applied to the earliest endings.
365 @lilypond[verbatim,quote,relative=2]
367 \repeat unfold 2 { g4 f e d }
377 Snippets: @rlsr{Repeats}.
379 Internals Reference: @rinternals{RepeatedMusic},
380 @rinternals{UnfoldedRepeatedMusic}.
384 @subsection Short repeats
386 This section discusses how to input short repeats. Short repeats can
387 take two basic forms: repeats of a single note to two measures,
388 represented by slashes or percent signs; and tremolos.
395 @node Percent repeats
396 @unnumberedsubsubsec Percent repeats
398 @cindex percent repeats
399 @cindex measure repeats
400 @cindex repeat, percent
401 @cindex repeat, measure
402 @cindex repeat, short
403 @funindex \repeat percent
406 Repeated short patterns of notes are supported. The music is printed
407 once, and the pattern is replaced with a special sign. Patterns that
408 are shorter than one measure are replaced by slashes, and patterns of
409 one or two measures are replaced by percent-like signs. The syntax is
412 @code{\repeat percent @var{number} @var{musicexpr}}
415 where @var{musicexpr} is a music expression.
417 @lilypond[verbatim,quote,relative=2]
418 \repeat percent 4 { c4 }
419 \repeat percent 2 { b4 a g f }
420 \repeat percent 2 { c2 es | f4 fis g c | }
425 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
426 {percent-repeat-counter.ly}
428 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
429 {percent-repeat-count-visibility.ly}
431 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
432 {isolated-percent-repeats.ly}
436 Music Glossary: @rglos{percent repeat}, @rglos{simile}.
438 Snippets: @rlsr{Repeats}.
440 Internals Reference: @rinternals{RepeatSlash},
441 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
442 @rinternals{DoublePercentRepeatCounter},
443 @rinternals{PercentRepeatCounter}, @rinternals{PercentRepeatedMusic}.
448 Only three kinds of percent repeats are supported: a single slash
449 representing a single beat (regardless of the duration of the repeated
450 notes); a single slash with dots representing one full measure; and
451 two slashes with dots crossing a bar line representing two full
452 measures. Neither multiple slashes representing single beat repeats
453 consisting of sixteenth or shorter notes, nor two slashes with dots
454 representing single beat repeats consisting of notes of varying
455 durations, are supported.
458 @node Tremolo repeats
459 @unnumberedsubsubsec Tremolo repeats
461 @cindex tremolo beams
463 @cindex repeat, tremolo
464 @funindex \repeat tremolo
467 Tremolos can take two forms: alternation between two chords or two
468 notes, and rapid repetition of a single note or chord. Tremolos
469 consisting of an alternation are indicated by adding beams between the
470 notes or chords being alternated, while tremolos consisting of the
471 rapid repetition of a single note are indicated by adding beams or
472 slashes to a single note.
474 To place tremolo marks between notes, use @code{\repeat} with
477 @lilypond[quote,verbatim,relative=2]
478 \repeat tremolo 8 { c16 d }
479 \repeat tremolo 6 { c16 d }
480 \repeat tremolo 2 { c16 d }
483 The @code{\repeat tremolo} syntax expects exactly two notes within
484 the braces, and the number of repetitions must correspond to a
485 note value that can be expressed with plain or dotted notes. Thus,
486 @code{\repeat tremolo 7} is valid and produces a double dotted
487 note, but @code{\repeat tremolo 9} is not.
489 The duration of the tremolo equals the duration of the
490 braced expression multiplied by the number of repeats:
491 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
492 notated as two whole notes joined by tremolo beams.
494 There are two ways to put tremolo marks on a single note. The
495 @code{\repeat tremolo} syntax is also used here, in which case
496 the note should not be surrounded by braces:
498 @lilypond[quote,verbatim,ragged-right]
499 \repeat tremolo 4 c'16
502 @cindex tremolo marks
503 @funindex tremoloFlags
506 The same output can be obtained by adding
507 @q{@code{:}[@var{number}]} after the note. The number indicates
508 the duration of the subdivision, and it must be at least 8. A
509 @var{number} value of 8 gives one line across the note stem. If
510 the length is omitted, the last value (stored in
511 @code{tremoloFlags}) is used
513 @lilypond[quote,verbatim,relative=2]
520 Snippets: @rlsr{Repeats}.
522 @cindex tremolo, cross-staff
523 @cindex cross-staff tremolo
527 Cross-staff tremolos do not work well.