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
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}. In order to delimit the alternate
83 endings, the group of alternatives must be enclosed in a set of
84 braces. If there are more repeats than there are alternate endings,
85 the earliest repeats are given the first alternative.
87 Normal repeats without alternate endings:
89 @lilypond[verbatim,quote,relative=2]
90 \repeat volta 2 { c4 d e f }
92 \repeat volta 2 { d4 e f g }
95 Normal repeats with alternate endings:
97 @lilypond[verbatim,quote,relative=2]
98 \repeat volta 4 { c4 d e f }
107 Repeats with upbeats can be entered in two ways:
109 @lilypond[verbatim,quote,relative=2]
112 \repeat volta 4 { c2 d | e2 f | }
122 @lilypond[verbatim,quote,relative=2]
124 \repeat volta 4 { e4 | c2 d | e2 f | }
126 { \partial 4*3 g4 g g }
132 @cindex repeats with ties
133 @cindex alternative endings with ties
134 @cindex ties in repeats
135 @cindex ties in alternative endings
138 Ties may be added to a second ending:
140 @lilypond[verbatim,quote,relative=2]
142 \repeat volta 2 { c4 d e f ~ }
151 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
152 {shortening-volta-brackets.ly}
154 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
155 {adding-volta-brackets-to-additional-staves.ly}
160 Music Glossary: @rglos{repeat}, @rglos{volta}.
162 Notation Reference: @ref{Bar lines}, @ref{Modifying context plug-ins}.
164 Snippets: @rlsr{Repeats}.
166 Internals Reference: @rinternals{VoltaBracket},
167 @rinternals{RepeatedMusic}, @rinternals{VoltaRepeatedMusic},
168 @rinternals{UnfoldedRepeatedMusic}.
172 @cindex repeat, ambiguous
183 is ambiguous, since it is is not clear to which @code{\repeat} the
184 @code{\alternative} belongs. This ambiguity is resolved by always
185 having the @code{\alternative} belong to the inner @code{\repeat}.
186 For clarity, it is advisable to use braces in such situations.
188 Timing information is not remembered at the start of an alternative,
189 so after a repeat timing information must be reset by hand; for
190 example, by setting @code{Score.measurePosition} or entering
191 @code{\partial}. Similarly, slurs are also not repeated.
195 @node Manual repeat marks
196 @unnumberedsubsubsec Manual repeat marks
198 @funindex repeatCommands
200 @warning{These methods are only used for displaying unusual repeat
201 constructs, and may produce unexpected behavior. In most cases,
202 repeats should be created using the standard @code{\\repeat} command
203 or by printing the relevant bar lines. For more information, see
206 The property @code{repeatCommands} can be used to control the
207 layout of repeats. Its value is a Scheme list of repeat commands.
211 Print a @code{|:} bar line.
213 @lilypond[verbatim,quote,relative=2]
215 \set Score.repeatCommands = #'(start-repeat)
220 As per standard engraving practice, repeat signs are not printed
221 at the beginning of a piece.
224 Print a @code{:|} bar line:
226 @lilypond[verbatim,quote,relative=2]
229 \set Score.repeatCommands = #'(end-repeat)
233 @item (volta @var{number}) ... (volta #f)
234 Create a new volta with the specified number. The volta bracket must
235 be explicitly terminated, or it will not be printed.
237 @lilypond[verbatim,quote,relative=2]
239 \set Score.repeatCommands = #'((volta "2"))
241 \set Score.repeatCommands = #'((volta #f))
247 Multiple repeat commands may occur at the same point:
249 @lilypond[verbatim,quote,relative=2]
251 \set Score.repeatCommands = #'((volta "2, 5") end-repeat)
254 \set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat)
258 Text can be included with the volta bracket. The text can be a
259 number or numbers or markup text, see @ref{Formatting text}. The
260 simplest way to use markup text is to define the markup first,
261 then include the the markup in a Scheme list.
263 @lilypond[verbatim,quote]
264 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
267 \set Score.repeatCommands = #(list(list 'volta voltaAdLib) 'start-repeat)
269 \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
271 \set Score.repeatCommands = #'((volta #f))
278 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
279 {printing-a-repeat-sign-at-the-beginning-of-a-piece.ly}
285 @ref{Formatting text}.
291 @rinternals{VoltaBracket},
292 @rinternals{RepeatedMusic},
293 @rinternals{VoltaRepeatedMusic}.
296 @node Written-out repeats
297 @unnumberedsubsubsec Written-out repeats
299 @cindex written-out repeats
300 @cindex repetitious music
301 @cindex repeats, written-out
303 By using the @code{unfold} command, repeats can be used to simplify
304 the writing out of repetitious music. The syntax is
307 \repeat unfold @var{repeatcount} @var{musicexpr}
310 where @var{musicexpr} is a music expressionand @var{repeatcount}
311 is the number of times @var{musicexpr} is repeated.
313 @lilypond[verbatim,quote,relative=2]
315 \repeat unfold 2 { c4 d e f }
319 Unfold repeats can be made with alternate endings. If there are
320 more repeats than there are alternate endings, the first
321 alternative ending is applied to the earliest 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}.
467 Cross-staff tremolos do not work well.