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 endof 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
71 @unnumberedsubsubsec Normal repeats
73 The syntax for a normal repeat is
76 \repeat volta @var{repeatcount} @var{musicexpr}
79 where @var{musicexpr} is a music expression. Alternate endings can be
80 produced using @code{\alternative}. If there are more repeats than
81 there are alternate endings, the earliest repeats are given the first
84 Normal repeats without alternate endings:
86 @lilypond[verbatim,quote,relative=2]
87 \repeat volta 2 { c4 d e f }
89 \repeat volta 2 { d4 e f g }
92 Normal repeats with alternate endings:
94 @lilypond[verbatim,quote,relative=2]
95 \repeat volta 4 { c4 d e f }
104 Repeats with upbeats can be entered in two ways:
106 @lilypond[verbatim,quote,relative=2]
109 \repeat volta 4 { c2 d | e2 f | }
119 @lilypond[verbatim,quote,relative=2]
121 \repeat volta 4 { e4 | c2 d | e2 f | }
123 { \partial 4*3 g4 g g }
131 Ties may be added to a second ending:
133 @lilypond[verbatim,quote,relative=2]
135 \repeat volta 2 { c4 d e f ~ }
144 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
145 {shortening-volta-brackets.ly}
147 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
148 {adding-volta-brackets-to-additional-staves.ly}
151 @c Is there a way to have a final bar ("|.") at the end of the
152 @c previous line? Doesn't seem to be.
153 @c It could be done by overriding
154 @c the BreakAlignment property. Want a separate example?
155 If you want to start a repeat at the beginning of a line and have a
156 double bar at the end of the previous line, use @code{\bar}. For more
157 information, see @ref{Bar lines}.
159 @lilypond[verbatim,quote,relative=2]
162 \repeat volta 2 { c4 d e f }
168 Music Glossary: @rglos{repeat}, @rglos{volta}.
170 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
172 Snippets: @rlsr{Repeats}.
174 Internals Reference: @rinternals{VoltaBracket},
175 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
176 @rinternals{UnfoldedRepeatedMusic}.
180 @cindex repeat, ambiguous
191 is ambiguous, since it is is not clear to which @code{\repeat} the
192 @code{\alternative} belongs. This ambiguity is resolved by always
193 having the @code{\alternative} belong to the inner @code{\repeat}.
194 For clarity, it is advisable to use braces in such situations.
196 Timing information is not remembered at the start of an alternative,
197 so after a repeat timing information must be reset by hand; for
198 example, by setting @code{Score.measurePosition} or entering
199 @code{\partial}. Similarly, slurs are also not repeated.
203 @node Manual repeat marks
204 @unnumberedsubsubsec Manual repeat marks
206 @funindex repeatCommands
208 @warning{These methods are only used for displaying unusual repeat
209 constructs, and may produce unexpected behavior. In most cases,
210 repeats should be created using the standard @code{\\repeat} command
211 or by printing the relevant bar lines. For more information, see
214 The property @code{repeatCommands} can be used to control the
215 layout of repeats. Its value is a Scheme list of repeat commands.
219 Print a @code{|:} bar line.
221 @lilypond[verbatim,quote,relative=2]
223 \set Score.repeatCommands = #'( start-repeat )
228 As per standard engraving practice, repeat signs are not printed
229 at the beginning of a piece.
232 Print a @code{:|} bar line:
234 @lilypond[verbatim,quote,relative=2]
237 \set Score.repeatCommands = #'( end-repeat )
241 @item (volta @var{number}) ... (volta #f)
242 Create a new volta with the specified number. The volta bracket must
243 be explicitly terminated, or it will not be printed.
245 @lilypond[verbatim,quote,relative=2]
247 \set Score.repeatCommands = #'( ( volta "2" ) )
249 \set Score.repeatCommands = #'( ( volta #f ) )
255 Multiple repeat commands may occur at the same point:
257 @lilypond[verbatim,quote,relative=2]
259 \set Score.repeatCommands = #'( ( volta "2, 5" ) end-repeat )
262 \set Score.repeatCommands = #'( ( volta #f ) ( volta "95" ) end-repeat )
266 Text can be included with the volta bracket. The text can be a
267 number or numbers or markup text, see @ref{Formatting text}. The
268 simplest way to use markup text is to define the markup first,
269 then include the the markup in a Scheme list.
271 @lilypond[verbatim,quote]
272 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
275 \set Score.repeatCommands = #(list (list 'volta voltaAdLib) 'start-repeat)
277 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
279 \set Score.repeatCommands = #'((volta #f))
287 @c FIXME: send these to Neil or Valentin to be added as snippets,
289 @c FIXME: will do, rp.
290 Manual control of the volte, including a @code{|:} bar line at the
291 beginning and explicit volta numbers:
293 @c FIXME: I can't believe this is right.
294 @c TODO: I think it is. I plan
295 @c to delete this example, since it's
296 @c already been given at L238. rp
297 @lilypond[verbatim,quote,relative=2]
299 \set Score.repeatCommands = #'( start-repeat )
302 \set Score.repeatCommands = #'( ( volta "1, 2, 5" ) )
304 \set Score.repeatCommands = #'( ( volta #f ) ( volta "95" ) end-repeat )
306 \set Score.repeatCommands = #'( ( volta #f ) )
310 In order to print a @code{|:} bar line at the beginning of a piece,
311 the @code{BreakAlignment} property must be overridden:
313 @lilypond[verbatim,quote,relative=2]
314 \once \override Score.BreakAlignment #'break-align-orders =
340 @ref{Formatting text}.
346 @rinternals{VoltaBracket},
347 @rinternals{RepeatedMusic},
348 @rinternals{VoltaRepeatedMusic}.
351 @node Written-out repeats
352 @unnumberedsubsubsec Written-out repeats
354 @cindex written-out repeats
355 @cindex repetitious music
356 @cindex repeats, written-out
358 By using the @code{unfold} command, repeats can be used to simplify
359 the writing out of repetitious music. The syntax is
362 \repeat unfold @var{repeatcount} @var{musicexpr}
365 where @var{musicexpr} is a music expression. Unfold repeats can be
366 made with or without alternate endings. If there are more repeats
367 than there are alternate endings, the first alternative ending is
368 applied to the earliest endings. Unfold repeats without alternate
371 @lilypond[verbatim,quote,relative=2]
373 \repeat unfold 2 { c4 d e f }
377 Unfold repeats with alternate endings:
379 @lilypond[verbatim,quote,relative=2]
381 \repeat unfold 2 { g4 f e d }
391 Snippets: @rlsr{Repeats}.
393 Internals Reference: @rinternals{RepeatedMusic},
394 @rinternals{UnfoldedRepeatedMusic}.
397 @subsection Short repeats
399 This section discusses how to input short repeats. Short repeats can
400 take two basic forms: repeats of a single note to two measures,
401 represented by slashes or percent signs; and tremolos.
408 @node Percent repeats
409 @unnumberedsubsubsec Percent repeats
411 @cindex percent repeats
412 @cindex measure repeats
414 Repeated short patterns of notes are supported. The music is printed
415 once, and the pattern is replaced with a special sign. Patterns that
416 are shorter than one measure are replaced by slashes, and patterns of
417 one or two measures are replaced by percent-like signs. The syntax is
420 @code{\repeat percent @var{number} @var{musicexpr}}
423 where @var{musicexpr} is a music expression.
425 @lilypond[verbatim,quote,relative=2]
426 \repeat percent 4 { c4 }
427 \repeat percent 2 { b4 a g f }
428 \repeat percent 2 { c2 es | f4 fis g c | }
433 @c FIXME: email these to Valentin or Neil to be made into snippets
434 Measure repeats of more than two repeats get a counter if you switch
435 on the @code{countPercentRepeats} property:
437 @lilypond[verbatim,quote,relative=2]
438 \set countPercentRepeats = ##t
439 \repeat percent 4 { c1 }
442 Isolated percents can also be printed. This is done by entering a
443 multi-measure rest with a different print function:
445 @lilypond[verbatim,quote,relative=2]
446 \override MultiMeasureRest #'stencil
447 = #ly:multi-measure-rest::percent
453 Music Glossary: @rglos{percent repeat}, @rglos{simile}.
455 Snippets: @rlsr{Repeats}.
457 Internals Reference: @rinternals{RepeatSlash},
458 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
459 @rinternals{DoublePercentRepeatCounter},
460 @rinternals{PercentRepeatCounter}, @rinternals{PercentRepeatedMusic}.
464 Only three kinds of percent repeats are supported: a single slash
465 representing a single beat (regardless of the duration of the repeated
466 notes); a single slash with dots representing one full measure; and
467 two slashes with dots crossing a bar line representing two full
468 measures. Neither multiple slashes representing single beat repeats
469 consisting of sixteenth or shorter notes, nor two slashes with dots
470 representing single beat repeats consisting of notes of varying
471 durations, are supported.
474 @node Tremolo repeats
475 @unnumberedsubsubsec Tremolo repeats
477 Tremolos can take two forms: alternation between two chords or two
478 notes, and rapid repetition of a single
479 note or chord. Tremolos consisting of an alternation are indicated by
480 adding beams between the notes or chords being alternated, while
481 tremolos consisting of the rapid repetition of a single note are
482 indicated by adding beams or slashes to a single note.
484 @cindex tremolo beams
486 To place tremolo marks between notes, use @code{\repeat} with
489 @lilypond[quote,verbatim,relative=2]
490 \repeat tremolo 8 { c16 d }
491 \repeat tremolo 6 { c16 d }
492 \repeat tremolo 2 { c16 d }
495 The @code{\repeat tremolo} syntax expects exactly two notes within
496 the braces, and the number of repetitions must correspond to a
497 note value that can be expressed with plain or dotted notes. Thus,
498 @code{\repeat tremolo 7} is valid and produces a double dotted
499 note, but @code{\repeat tremolo 9} is not.
501 The duration of the tremolo equals the duration of the
502 braced expression multiplied by the number of repeats:
503 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
504 notated as two whole notes joined by tremolo beams.
506 There are two ways to put tremolo marks on a single note. The
507 @code{\repeat tremolo} syntax is also used here, in which case
508 the note should not be surrounded by braces:
510 @lilypond[quote,verbatim,ragged-right]
511 \repeat tremolo 4 c'16
514 @cindex tremolo marks
515 @funindex tremoloFlags
517 The same output can be obtained by adding
518 @q{@code{:}[@var{number}]} after the note. The number indicates
519 the duration of the subdivision, and it must be at least 8. A
520 @var{number} value of 8 gives one line across the note stem. If
521 the length is omitted, the last value (stored in
522 @code{tremoloFlags}) is used
524 @lilypond[quote,verbatim,relative=2]
531 Snippets: @rlsr{Repeats}.