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 2 { g4 f e d }
100 \repeat volta 3 { c4 d e f }
109 Repeats with upbeats can be entered in two ways:
111 @lilypond[verbatim,quote,relative=2]
114 \repeat volta 4 { c2 d | e2 f | }
124 @lilypond[verbatim,quote,relative=2]
126 \repeat volta 4 { e4 | c2 d | e2 f | }
128 { \partial 4*3 g4 g g }
136 Ties may be added to a second ending:
138 @lilypond[verbatim,quote,relative=2]
140 \repeat volta 2 { c4 d e f ~ }
149 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
150 {shortening-volta-brackets.ly}
152 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
153 {adding-volta-brackets-to-additional-staves.ly}
156 @c Is there a way to have a final bar ("|.") at the end of the
157 @c previous line? Doesn't seem to be.
158 @c It could be done by overriding
159 @c the BreakAlignment property. Want a separate example?
160 If you want to start a repeat at the beginning of a line and have a
161 double bar at the end of the previous line, use @code{\bar}. For more
162 information, see @ref{Bar lines}.
164 @lilypond[verbatim,quote,relative=2]
167 \repeat volta 2 { c4 d e f }
173 Music Glossary: @rglos{repeat}, @rglos{volta}.
175 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
177 Snippets: @rlsr{Repeats}.
179 Internals Reference: @rinternals{VoltaBracket},
180 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
181 @rinternals{UnfoldedRepeatedMusic}.
185 @cindex repeat, ambiguous
196 is ambiguous, since it is is not clear to which @code{\repeat} the
197 @code{\alternative} belongs. This ambiguity is resolved by always
198 having the @code{\alternative} belong to the inner @code{\repeat}.
199 For clarity, it is advisable to use braces in such situations.
201 Timing information is not remembered at the start of an alternative,
202 so after a repeat timing information must be reset by hand; for
203 example, by setting @code{Score.measurePosition} or entering
204 @code{\partial}. Similarly, slurs are also not repeated.
208 @node Manual repeat marks
209 @unnumberedsubsubsec Manual repeat marks
211 @funindex repeatCommands
213 @warning{These methods are only used for displaying unusual repeat
214 constructs, and may produce unexpected behavior. In most cases,
215 repeats should be created using the standard @code{\\repeat} command
216 or by printing the relevant bar lines. For more information, see
219 The property @code{repeatCommands} can be used to control the
220 layout of repeats. Its value is a Scheme list of repeat commands.
224 Print a @code{|:} bar line.
226 @lilypond[verbatim,quote,relative=2]
228 \set Score.repeatCommands = #'( start-repeat )
233 As per standard engraving practice, repeat signs are not printed
234 at the beginning of a piece.
237 Print a @code{:|} bar line:
239 @lilypond[verbatim,quote,relative=2]
242 \set Score.repeatCommands = #'( end-repeat )
246 @item (volta @var{number}) ... (volta #f)
247 Create a new volta with the specified number. The volta bracket must
248 be explicitly terminated, or it will not be printed.
250 @lilypond[verbatim,quote,relative=2]
252 \set Score.repeatCommands = #'( ( volta "2" ) )
254 \set Score.repeatCommands = #'( ( volta #f ) )
260 Multiple repeat commands may occur at the same point:
262 @lilypond[verbatim,quote,relative=2]
264 \set Score.repeatCommands = #'( ( volta "2, 5" ) end-repeat )
267 \set Score.repeatCommands = #'( ( volta #f ) ( volta "95" ) end-repeat )
271 Text can be included with the volta bracket. The text can be a
272 number or numbers or markup text, see @ref{Formatting text}. The
273 simplest way to use markup text is to define the markup first,
274 then include the the markup in a Scheme list.
276 @lilypond[verbatim,quote]
277 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
280 \set Score.repeatCommands = #(list (list 'volta voltaAdLib) 'start-repeat)
282 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
284 \set Score.repeatCommands = #'((volta #f))
292 @c FIXME: send these to Neil or Valentin to be added as snippets,
294 @c FIXME: will do, rp.
295 Manual control of the volte, including a @code{|:} bar line at the
296 beginning and explicit volta numbers:
298 @c FIXME: I can't believe this is right.
299 @c TODO: I think it is. I plan
300 @c to delete this example, since it's
301 @c already been given at L238. rp
302 @lilypond[verbatim,quote,relative=2]
304 \set Score.repeatCommands = #'( start-repeat )
307 \set Score.repeatCommands = #'( ( volta "1, 2, 5" ) )
309 \set Score.repeatCommands = #'( ( volta #f ) ( volta "95" ) end-repeat )
311 \set Score.repeatCommands = #'( ( volta #f ) )
315 In order to print a @code{|:} bar line at the beginning of a piece,
316 the @code{BreakAlignment} property must be overridden:
318 @lilypond[verbatim,quote,relative=2]
319 \once \override Score.BreakAlignment #'break-align-orders =
345 @ref{Formatting text}.
351 @rinternals{VoltaBracket},
352 @rinternals{RepeatedMusic},
353 @rinternals{VoltaRepeatedMusic}.
356 @node Written-out repeats
357 @unnumberedsubsubsec Written-out repeats
359 @cindex written-out repeats
360 @cindex repetitious music
361 @cindex repeats, written-out
363 By using the @code{unfold} command, repeats can be used to simplify
364 the writing out of repetitious music. The syntax is
367 \repeat unfold @var{repeatcount} @var{musicexpr}
370 where @var{musicexpr} is a music expression. Unfold repeats can be
371 made with or without alternate endings. If there are more repeats
372 than there are alternate endings, the first alternative ending is
373 applied to the earliest endings. Unfold repeats without alternate
376 @lilypond[verbatim,quote,relative=2]
378 \repeat unfold 2 { c4 d e f }
382 Unfold repeats with alternate endings:
384 @lilypond[verbatim,quote,relative=2]
386 \repeat unfold 2 { g4 f e d }
392 \repeat unfold 3 { d4 c b2 }
402 Snippets: @rlsr{Repeats}.
404 Internals Reference: @rinternals{RepeatedMusic},
405 @rinternals{UnfoldedRepeatedMusic}.
408 @subsection Short repeats
410 This section discusses how to input short repeats. Short repeats can
411 take two basic forms: repeats of a single note to two measures,
412 represented by slashes or percent signs; and tremolos.
419 @node Percent repeats
420 @unnumberedsubsubsec Percent repeats
422 @cindex percent repeats
423 @cindex measure repeats
425 Repeated short patterns of notes are supported. The music is printed
426 once, and the pattern is replaced with a special sign. Patterns that
427 are shorter than one measure are replaced by slashes, and patterns of
428 one or two measures are replaced by percent-like signs. The syntax is
431 @code{\repeat percent @var{number} @var{musicexpr}}
434 where @var{musicexpr} is a music expression.
436 @lilypond[verbatim,quote,relative=2]
437 \repeat percent 4 { c4 }
438 \repeat percent 2 { b4 a g f }
439 \repeat percent 2 { c2 es | f4 fis g c | }
444 @c FIXME: email these to Valentin or Neil to be made into snippets
445 Measure repeats of more than two repeats get a counter if you switch
446 on the @code{countPercentRepeats} property:
448 @lilypond[verbatim,quote,relative=2]
449 \set countPercentRepeats = ##t
450 \repeat percent 4 { c1 }
453 Isolated percents can also be printed. This is done by entering a
454 multi-measure rest with a different print function:
456 @lilypond[verbatim,quote,relative=2]
457 \override MultiMeasureRest #'stencil
458 = #ly:multi-measure-rest::percent
464 Music Glossary: @rglos{percent repeat}, @rglos{simile}.
466 Snippets: @rlsr{Repeats}.
468 Internals Reference: @rinternals{RepeatSlash},
469 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
470 @rinternals{DoublePercentRepeatCounter},
471 @rinternals{PercentRepeatCounter}, @rinternals{PercentRepeatedMusic}.
475 Only three kinds of percent repeats are supported: a single slash
476 representing a single beat (regardless of the duration of the repeated
477 notes); a single slash with dots representing one full measure; and
478 two slashes with dots crossing a bar line representing two full
479 measures. Neither multiple slashes representing single beat repeats
480 consisting of sixteenth or shorter notes, nor two slashes with dots
481 representing single beat repeats consisting of notes of varying
482 durations, are supported.
485 @node Tremolo repeats
486 @unnumberedsubsubsec Tremolo repeats
488 Tremolos can take two forms: alternation between two chords or two
489 notes, and rapid repetition of a single
490 note or chord. Tremolos consisting of an alternation are indicated by
491 adding beams between the notes or chords being alternated, while
492 tremolos consisting of the rapid repetition of a single note are
493 indicated by adding beams or slashes to a single note.
495 @cindex tremolo beams
497 To place tremolo marks between notes, use @code{\repeat} with
500 @lilypond[quote,verbatim,relative=2]
501 \repeat tremolo 8 { c16 d }
502 \repeat tremolo 4 { c16 d }
503 \repeat tremolo 2 { c16 d }
506 The @code{\repeat tremolo} syntax expects exactly two notes within
507 the braces, and the number of repetitions must correspond to a
508 note value that can be expressed with plain or dotted notes. Thus,
509 @code{\repeat tremolo 7} is valid and produces a double dotted
510 note, but @code{\repeat tremolo 9} is not.
512 The duration of the tremolo equals the duration of the
513 braced expression multiplied by the number of repeats:
514 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
515 notated as two whole notes joined by tremolo beams.
517 There are two ways to put tremolo marks on a single note. The
518 @code{\repeat tremolo} syntax is also used here, in which case
519 the note should not be surrounded by braces:
521 @lilypond[quote,verbatim,ragged-right]
522 \repeat tremolo 4 c'16
525 @cindex tremolo marks
526 @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 Snippets: @rlsr{Repeats}.