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. For details, see the Contributors'
7 Guide, node Updating translation committishes..
15 @lilypondfile[quote]{repeats-headword.ly}
17 Repetition is a central concept in music, and multiple notations
18 exist for repetitions. LilyPond supports the following kinds of
24 The repeated music is not written out but enclosed between repeat bar
25 lines. If the repeat is at the beginning of a piece, a repeat bar
26 line is only printed at the end of the repeat. Alternative endings
27 (volte) are printed left to right with brackets. This is the standard
28 notation for repeats with alternatives.
31 The repeated music is fully written out, as many times as
32 specified by @var{repeatcount}. This is useful when
33 entering repetitious music.
36 These are beat or measure repeats. They look like single slashes or
40 This is used to write tremolo beams.
51 @subsection Long repeats
53 This section discusses how to input long (usually multi-measure)
54 repeats. The repeats can take two forms: repeats enclosed between
55 repeat signs; or written out repeats, used to input repetitious music.
56 Repeat signs can also be controlled manually.
60 * Manual repeat marks::
61 * Written-out repeats::
68 @cindex volta, seconda
69 @cindex repeat, normal
71 @cindex repeat with alternate endings
72 @cindex alternate endings
74 @funindex \alternative
78 @unnumberedsubsubsec Normal repeats
80 The syntax for a normal repeat is
83 \repeat volta @var{repeatcount} @var{musicexpr}
87 where @var{musicexpr} is a music expression. Alternate endings can be
88 produced using @code{\alternative}. In order to delimit the alternate
89 endings, the group of alternatives must be enclosed in a set of
90 braces. If there are more repeats than there are alternate endings,
91 the earliest repeats are given the first alternative.
93 Normal repeats without alternate endings:
95 @lilypond[verbatim,quote,relative=2]
96 \repeat volta 2 { c4 d e f }
98 \repeat volta 2 { d4 e f g }
101 Normal repeats with alternate endings:
103 @lilypond[verbatim,quote,relative=2]
104 \repeat volta 4 { c4 d e f }
112 @warning{Do not include @code{@bs{}relative} inside a
113 @code{@bs{}repeat}. It will cause unwanted staves to appear.
114 See @rprogram{An extra staff appears}.}
116 @cindex repeat with upbeat
117 @cindex upbeat in a repeat
118 @cindex anacrucis in a repeat
119 @cindex repeat with anacrucis
120 @cindex repeat with pickup
121 @cindex pickup in a repeat
124 Repeats with upbeats can be entered in two ways:
126 @lilypond[verbatim,quote,relative=2]
129 \repeat volta 4 { c2 d | e2 f | }
139 @lilypond[verbatim,quote,relative=2]
141 \repeat volta 4 { e4 | c2 d | e2 f | }
143 { \partial 4*3 g4 g g }
149 @cindex repeats with ties
150 @cindex alternative endings with ties
151 @cindex ties in repeats
152 @cindex ties in alternative endings
155 Ties may be added to a second ending:
157 @lilypond[verbatim,quote,relative=2]
159 \repeat volta 2 { c4 d e f ~ }
168 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
169 {shortening-volta-brackets.ly}
171 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
172 {adding-volta-brackets-to-additional-staves.ly}
182 @ref{Modifying context plug-ins}.
188 @rinternals{VoltaBracket},
189 @rinternals{RepeatedMusic},
190 @rinternals{VoltaRepeatedMusic},
191 @rinternals{UnfoldedRepeatedMusic}.
196 @cindex repeat, ambiguous
197 @cindex nested repeat
198 @cindex repeat, nested
199 @cindex repeat timing information
200 @cindex repeat and measure number
201 @cindex timing information and repeats
202 @cindex measure number and repeats
203 @cindex repeat and slur
204 @cindex slur and repeat
215 is ambiguous, since it is not clear to which @code{\repeat} the
216 @code{\alternative} belongs. This ambiguity is resolved by always
217 having the @code{\alternative} belong to the inner @code{\repeat}.
218 For clarity, it is advisable to use braces in such situations.
220 Timing information is not remembered at the start of an alternative,
221 so after a repeat timing information must be reset by hand; for
222 example, by setting @code{Score.measurePosition} or entering
223 @code{\partial}. Similarly, slurs are also not repeated.
227 @node Manual repeat marks
228 @unnumberedsubsubsec Manual repeat marks
230 @cindex manual repeat mark
231 @cindex repeat, manual
233 @cindex repeat, start
236 @cindex repeat number, changing
237 @cindex repeat volta, changing
238 @cindex volta bracket
239 @cindex bracket, volta
240 @funindex repeatCommands
241 @funindex start-repeat
243 @warning{These methods are only used for displaying unusual repeat
244 constructs, and may produce unexpected behavior. In most cases,
245 repeats should be created using the standard @code{\\repeat} command
246 or by printing the relevant bar lines. For more information, see
249 The property @code{repeatCommands} can be used to control the
250 layout of repeats. Its value is a Scheme list of repeat commands.
254 Print a @code{|:} bar line.
256 @lilypond[verbatim,quote,relative=2]
258 \set Score.repeatCommands = #'(start-repeat)
263 As per standard engraving practice, repeat signs are not printed
264 at the beginning of a piece.
267 Print a @code{:|} bar line:
269 @lilypond[verbatim,quote,relative=2]
272 \set Score.repeatCommands = #'(end-repeat)
276 @item (volta @var{number}) ... (volta #f)
277 Create a new volta with the specified number. The volta bracket must
278 be explicitly terminated, or it will not be printed.
280 @lilypond[verbatim,quote,relative=2]
282 \set Score.repeatCommands = #'((volta "2"))
284 \set Score.repeatCommands = #'((volta #f))
290 Multiple repeat commands may occur at the same point:
292 @lilypond[verbatim,quote,relative=2]
294 \set Score.repeatCommands = #'((volta "2, 5") end-repeat)
297 \set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat)
299 \set Score.repeatCommands = #'((volta #f))
302 @cindex volta bracket with text
303 @cindex text in volta bracket
305 Text can be included with the volta bracket. The text can be a
306 number or numbers or markup text, see @ref{Formatting text}. The
307 simplest way to use markup text is to define the markup first,
308 then include the markup in a Scheme list.
310 @lilypond[verbatim,quote]
311 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
314 \set Score.repeatCommands = #(list(list 'volta voltaAdLib) 'start-repeat)
316 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
318 \set Score.repeatCommands = #'((volta #f))
325 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
326 {printing-a-repeat-sign-at-the-beginning-of-a-piece.ly}
332 @ref{Formatting text}.
338 @rinternals{VoltaBracket},
339 @rinternals{RepeatedMusic},
340 @rinternals{VoltaRepeatedMusic}.
343 @node Written-out repeats
344 @unnumberedsubsubsec Written-out repeats
346 @cindex written-out repeats
347 @cindex repetitious music
348 @cindex repeats, written-out
349 @cindex repeat, unfold
351 @cindex unfold repeat
352 @cindex unfold repeat with alternate endings
353 @cindex unfold music with alternate endings
354 @cindex alternate ending in written-out repeats
357 By using the @code{unfold} command, repeats can be used to simplify
358 the writing out of repetitious music. The syntax is
361 \repeat unfold @var{repeatcount} @var{musicexpr}
365 where @var{musicexpr} is a music expression and @var{repeatcount} is
366 the number of times @var{musicexpr} is repeated.
368 @lilypond[verbatim,quote,relative=2]
370 \repeat unfold 2 { c4 d e f }
374 Unfold repeats can be made with alternate endings. If there are
375 more repeats than there are alternate endings, the first
376 alternative ending is applied to the earliest endings.
378 @lilypond[verbatim,quote,relative=2]
380 \repeat unfold 2 { g4 f e d }
394 @rinternals{RepeatedMusic},
395 @rinternals{UnfoldedRepeatedMusic}.
399 @subsection Short repeats
401 This section discusses how to input short repeats. Short repeats can
402 take two basic forms: repeats of a single note to two measures,
403 represented by slashes or percent signs; and tremolos.
410 @node Percent repeats
411 @unnumberedsubsubsec Percent repeats
413 @cindex percent repeats
414 @cindex measure repeats
415 @cindex repeat, percent
416 @cindex repeat, measure
417 @cindex repeat, short
418 @funindex \repeat percent
421 Repeated short patterns of notes are supported. The music is printed
422 once, and the pattern is replaced with a special sign. Patterns that
423 are shorter than one measure are replaced by slashes, and patterns of
424 one or two measures are replaced by percent-like signs. The syntax is
427 @code{\repeat percent @var{number} @var{musicexpr}}
431 where @var{musicexpr} is a music expression.
433 @lilypond[verbatim,quote,relative=2]
434 \repeat percent 4 { c4 }
435 \repeat percent 2 { b4 a g f }
436 \repeat percent 2 { c2 es | f4 fis g c | }
441 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
442 {percent-repeat-counter.ly}
444 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
445 {percent-repeat-count-visibility.ly}
447 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
448 {isolated-percent-repeats.ly}
453 @rglos{percent repeat},
460 @rinternals{RepeatSlash},
461 @rinternals{PercentRepeat},
462 @rinternals{DoublePercentRepeat},
463 @rinternals{DoublePercentRepeatCounter},
464 @rinternals{PercentRepeatCounter},
465 @rinternals{PercentRepeatedMusic}.
470 Only three kinds of percent repeats are supported: a single slash
471 representing a single beat (regardless of the duration of the repeated
472 notes); a single slash with dots representing one full measure; and
473 two slashes with dots crossing a bar line representing two full
474 measures. Neither multiple slashes representing single beat repeats
475 consisting of sixteenth or shorter notes, nor two slashes with dots
476 representing single beat repeats consisting of notes of varying
477 durations, are supported.
480 @node Tremolo repeats
481 @unnumberedsubsubsec Tremolo repeats
483 @cindex tremolo beams
485 @cindex repeat, tremolo
486 @funindex \repeat tremolo
489 Tremolos can take two forms: alternation between two chords or two
490 notes, and rapid repetition of a single note or chord. Tremolos
491 consisting of an alternation are indicated by adding beams between the
492 notes or chords being alternated, while tremolos consisting of the
493 rapid repetition of a single note are indicated by adding beams or
494 slashes to a single note.
496 To place tremolo marks between notes, use @code{\repeat} with
499 @lilypond[quote,verbatim,relative=2]
500 \repeat tremolo 8 { c16 d }
501 \repeat tremolo 6 { c16 d }
502 \repeat tremolo 2 { c16 d }
505 The @code{\repeat tremolo} syntax expects exactly two notes within
506 the braces, and the number of repetitions must correspond to a
507 note value that can be expressed with plain or dotted notes. Thus,
508 @code{\repeat tremolo 7} is valid and produces a double dotted
509 note, but @code{\repeat tremolo 9} is not.
511 The duration of the tremolo equals the duration of the
512 braced expression multiplied by the number of repeats:
513 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
514 notated as two whole notes joined by tremolo beams.
516 There are two ways to put tremolo marks on a single note. The
517 @code{\repeat tremolo} syntax is also used here, in which case
518 the note should not be surrounded by braces:
520 @lilypond[quote,verbatim,ragged-right]
521 \repeat tremolo 4 c'16
524 @cindex tremolo marks
525 @funindex tremoloFlags
528 The same output can be obtained by adding
529 @q{@code{:}[@var{number}]} after the note. The number indicates
530 the duration of the subdivision, and it must be at least 8. A
531 @var{number} value of 8 gives one line across the note stem. If
532 the length is omitted, the last value (stored in
533 @code{tremoloFlags}) is used:
535 @lilypond[quote,verbatim,relative=2]
542 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
543 {cross-staff-tremolos.ly}
550 @cindex tremolo, cross-staff
551 @cindex cross-staff tremolo
555 Cross-staff tremolos do not work well.