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
69 @funindex \alternative
73 @unnumberedsubsubsec Normal repeats
75 The syntax for a normal repeat is
78 \repeat volta @var{repeatcount} @var{musicexpr}
81 where @var{musicexpr} is a music expression. Alternate endings can be
82 produced using @code{\alternative}. If there are more repeats than
83 there are alternate endings, the earliest repeats are given the first
86 Normal repeats without alternate endings:
88 @lilypond[verbatim,quote,relative=2]
89 \repeat volta 2 { c4 d e f }
91 \repeat volta 2 { d4 e f g }
94 Normal repeats with alternate endings:
96 @lilypond[verbatim,quote,relative=2]
97 \repeat volta 4 { c4 d e f }
106 Repeats with upbeats can be entered in two ways:
108 @lilypond[verbatim,quote,relative=2]
111 \repeat volta 4 { c2 d | e2 f | }
121 @lilypond[verbatim,quote,relative=2]
123 \repeat volta 4 { e4 | c2 d | e2 f | }
125 { \partial 4*3 g4 g g }
131 @cindex repeats with ties
132 @cindex alternative endings with ties
133 @cindex ties in repeats
134 @cindex ties in alternative endings
137 Ties may be added to a second ending:
139 @lilypond[verbatim,quote,relative=2]
141 \repeat volta 2 { c4 d e f ~ }
150 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
151 {shortening-volta-brackets.ly}
153 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
154 {adding-volta-brackets-to-additional-staves.ly}
159 Music Glossary: @rglos{repeat}, @rglos{volta}.
161 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
163 Snippets: @rlsr{Repeats}.
165 Internals Reference: @rinternals{VoltaBracket},
166 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
167 @rinternals{UnfoldedRepeatedMusic}.
171 @cindex repeat, ambiguous
182 is ambiguous, since it is is not clear to which @code{\repeat} the
183 @code{\alternative} belongs. This ambiguity is resolved by always
184 having the @code{\alternative} belong to the inner @code{\repeat}.
185 For clarity, it is advisable to use braces in such situations.
187 Timing information is not remembered at the start of an alternative,
188 so after a repeat timing information must be reset by hand; for
189 example, by setting @code{Score.measurePosition} or entering
190 @code{\partial}. Similarly, slurs are also not repeated.
194 @node Manual repeat marks
195 @unnumberedsubsubsec Manual repeat marks
197 @funindex repeatCommands
199 @warning{These methods are only used for displaying unusual repeat
200 constructs, and may produce unexpected behavior. In most cases,
201 repeats should be created using the standard @code{\\repeat} command
202 or by printing the relevant bar lines. For more information, see
205 The property @code{repeatCommands} can be used to control the
206 layout of repeats. Its value is a Scheme list of repeat commands.
210 Print a @code{|:} bar line.
212 @lilypond[verbatim,quote,relative=2]
214 \set Score.repeatCommands = #'( start-repeat )
219 As per standard engraving practice, repeat signs are not printed
220 at the beginning of a piece.
223 Print a @code{:|} bar line:
225 @lilypond[verbatim,quote,relative=2]
228 \set Score.repeatCommands = #'( end-repeat )
232 @item (volta @var{number}) ... (volta #f)
233 Create a new volta with the specified number. The volta bracket must
234 be explicitly terminated, or it will not be printed.
236 @lilypond[verbatim,quote,relative=2]
238 \set Score.repeatCommands = #'( ( volta "2" ) )
240 \set Score.repeatCommands = #'( ( volta #f ) )
246 Multiple repeat commands may occur at the same point:
248 @lilypond[verbatim,quote,relative=2]
250 \set Score.repeatCommands = #'( ( volta "2, 5" ) end-repeat )
253 \set Score.repeatCommands = #'( ( volta #f ) ( volta "95" ) end-repeat )
257 Text can be included with the volta bracket. The text can be a
258 number or numbers or markup text, see @ref{Formatting text}. The
259 simplest way to use markup text is to define the markup first,
260 then include the the markup in a Scheme list.
262 @lilypond[verbatim,quote]
263 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
266 \set Score.repeatCommands = #(list (list 'volta voltaAdLib) 'start-repeat)
268 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
270 \set Score.repeatCommands = #'((volta #f))
277 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
278 {printing-a-repeat-sign-at-the-beginning-of-a-piece.ly}
284 @ref{Formatting text}.
290 @rinternals{VoltaBracket},
291 @rinternals{RepeatedMusic},
292 @rinternals{VoltaRepeatedMusic}.
295 @node Written-out repeats
296 @unnumberedsubsubsec Written-out repeats
298 @cindex written-out repeats
299 @cindex repetitious music
300 @cindex repeats, written-out
302 By using the @code{unfold} command, repeats can be used to simplify
303 the writing out of repetitious music. The syntax is
306 \repeat unfold @var{repeatcount} @var{musicexpr}
309 where @var{musicexpr} is a music expression. Unfold repeats can be
310 made with or without alternate endings. If there are more repeats
311 than there are alternate endings, the first alternative ending is
312 applied to the earliest endings. Unfold repeats without alternate
315 @lilypond[verbatim,quote,relative=2]
317 \repeat unfold 2 { c4 d e f }
321 Unfold repeats with alternate endings:
323 @lilypond[verbatim,quote,relative=2]
325 \repeat unfold 2 { g4 f e d }
335 Snippets: @rlsr{Repeats}.
337 Internals Reference: @rinternals{RepeatedMusic},
338 @rinternals{UnfoldedRepeatedMusic}.
341 @subsection Short repeats
343 This section discusses how to input short repeats. Short repeats can
344 take two basic forms: repeats of a single note to two measures,
345 represented by slashes or percent signs; and tremolos.
352 @node Percent repeats
353 @unnumberedsubsubsec Percent repeats
355 @cindex percent repeats
356 @cindex measure repeats
358 Repeated short patterns of notes are supported. The music is printed
359 once, and the pattern is replaced with a special sign. Patterns that
360 are shorter than one measure are replaced by slashes, and patterns of
361 one or two measures are replaced by percent-like signs. The syntax is
364 @code{\repeat percent @var{number} @var{musicexpr}}
367 where @var{musicexpr} is a music expression.
369 @lilypond[verbatim,quote,relative=2]
370 \repeat percent 4 { c4 }
371 \repeat percent 2 { b4 a g f }
372 \repeat percent 2 { c2 es | f4 fis g c | }
377 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
378 {percent-repeat-counter.ly}
380 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
381 {isolated-percent-repeats.ly}
385 Music Glossary: @rglos{percent repeat}, @rglos{simile}.
387 Snippets: @rlsr{Repeats}.
389 Internals Reference: @rinternals{RepeatSlash},
390 @rinternals{PercentRepeat}, @rinternals{DoublePercentRepeat},
391 @rinternals{DoublePercentRepeatCounter},
392 @rinternals{PercentRepeatCounter}, @rinternals{PercentRepeatedMusic}.
396 Only three kinds of percent repeats are supported: a single slash
397 representing a single beat (regardless of the duration of the repeated
398 notes); a single slash with dots representing one full measure; and
399 two slashes with dots crossing a bar line representing two full
400 measures. Neither multiple slashes representing single beat repeats
401 consisting of sixteenth or shorter notes, nor two slashes with dots
402 representing single beat repeats consisting of notes of varying
403 durations, are supported.
406 @node Tremolo repeats
407 @unnumberedsubsubsec Tremolo repeats
409 Tremolos can take two forms: alternation between two chords or two
410 notes, and rapid repetition of a single
411 note or chord. Tremolos consisting of an alternation are indicated by
412 adding beams between the notes or chords being alternated, while
413 tremolos consisting of the rapid repetition of a single note are
414 indicated by adding beams or slashes to a single note.
416 @cindex tremolo beams
418 To place tremolo marks between notes, use @code{\repeat} with
421 @lilypond[quote,verbatim,relative=2]
422 \repeat tremolo 8 { c16 d }
423 \repeat tremolo 6 { c16 d }
424 \repeat tremolo 2 { c16 d }
427 The @code{\repeat tremolo} syntax expects exactly two notes within
428 the braces, and the number of repetitions must correspond to a
429 note value that can be expressed with plain or dotted notes. Thus,
430 @code{\repeat tremolo 7} is valid and produces a double dotted
431 note, but @code{\repeat tremolo 9} is not.
433 The duration of the tremolo equals the duration of the
434 braced expression multiplied by the number of repeats:
435 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
436 notated as two whole notes joined by tremolo beams.
438 There are two ways to put tremolo marks on a single note. The
439 @code{\repeat tremolo} syntax is also used here, in which case
440 the note should not be surrounded by braces:
442 @lilypond[quote,verbatim,ragged-right]
443 \repeat tremolo 4 c'16
446 @cindex tremolo marks
447 @funindex tremoloFlags
449 The same output can be obtained by adding
450 @q{@code{:}[@var{number}]} after the note. The number indicates
451 the duration of the subdivision, and it must be at least 8. A
452 @var{number} value of 8 gives one line across the note stem. If
453 the length is omitted, the last value (stored in
454 @code{tremoloFlags}) is used
456 @lilypond[quote,verbatim,relative=2]
463 Snippets: @rlsr{Repeats}.