]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/repeats.itely
77defacb7879ad6885d605883da6beedde68574c
[lilypond.git] / Documentation / notation / repeats.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
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..
8 @end ignore
9
10 @c \version "2.17.11"
11
12 @node Repeats
13 @section Repeats
14
15 @lilypondfile[quote]{repeats-headword.ly}
16
17 Repetition is a central concept in music, and multiple notations
18 exist for repetitions.  LilyPond supports the following kinds of
19 repeats:
20
21
22 @table @code
23 @item volta
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.
29
30 @item unfold
31 The repeated music is fully written out, as many times as
32 specified by @code{@var{repeatcount}}.  This is useful when
33 entering repetitious music.
34
35 @item percent
36 These are beat or measure repeats.  They look like single slashes or
37 percent signs.
38
39 @item tremolo
40 This is used to write tremolo beams.
41
42 @end table
43
44
45 @menu
46 * Long repeats::
47 * Short repeats::
48 @end menu
49
50 @node Long repeats
51 @subsection Long repeats
52
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.
57
58 @menu
59 * Normal repeats::
60 * Manual repeat marks::
61 * Written-out repeats::
62 @end menu
63
64 @cindex volta
65 @cindex prima volta
66 @cindex seconda volta
67 @cindex volta, prima
68 @cindex volta, seconda
69 @cindex repeat, normal
70 @cindex normal repeat
71 @cindex repeat with alternate endings
72 @cindex alternate endings
73 @funindex \repeat
74 @funindex \alternative
75 @funindex \partial
76
77 @node Normal repeats
78 @unnumberedsubsubsec Normal repeats
79
80 The syntax for a normal repeat is
81
82 @example
83 \repeat volta @var{repeatcount} @var{musicexpr}
84 @end example
85
86 @noindent
87 where @code{@var{musicexpr}} is a music expression.
88
89 A single repeat without an alternate ending:
90
91 @lilypond[verbatim,quote,relative=2]
92 \repeat volta 2 { c4 d e f }
93 c2 d
94 \repeat volta 2 { d4 e f g }
95 @end lilypond
96
97 An @q{opening} repeat mark is not, by default, printed in the first full
98 measure.  However it is possible to add one by using @code{\bar ".|:"}
99 before the first note.
100
101 @lilypond[verbatim,fragment,quote,relative=2]
102 \repeat volta 2 { \bar ".|:" c4 d e f }
103 c2 d
104 \repeat volta 2 { d4 e f g }
105 @end lilypond
106
107 Alternative endings can be produced using @code{\alternative}.  Each
108 group of alternatives must be themselves, enclosed in a set of braces.
109
110 @example
111 \repeat volta @var{repeatcount} @var{musicexpr}
112 \alternative @{
113   @{ @var{musicexpr} @}
114 @}
115 @end example
116
117 @noindent
118 where @code{@var{musicexpr}} is a music expression.
119
120 If there are more repeats than there are alternate endings, the earliest
121 repeats are given the first alternative.
122
123 A single repeat with one alternate ending:
124
125 @lilypond[verbatim,quote,relative=2]
126 \repeat volta 2 { c4 d e f | }
127 \alternative {
128   { c2 e | }
129   { f2 g | }
130 }
131 c1
132 @end lilypond
133
134 Multiple repeats with one alternate ending:
135
136 @lilypond[verbatim,quote,relative=2]
137 \repeat volta 4 { c4 d e f | }
138 \alternative {
139   { c2 e | }
140   { f2 g | }
141 }
142 c1
143 @end lilypond
144
145 Multiple repeats with more than one alternate ending:
146
147 @lilypond[verbatim,quote,relative=2]
148 \repeat volta 3 { c4 d e f | }
149 \alternative {
150   { c2 e | }
151   { f2 g | }
152   { a2 g | }
153 }
154 c1
155 @end lilypond
156
157 @warning{If there are two or more alternatives, nothing should appear
158 between the closing brace of one and the opening brace of the next
159 in an @code{@bs{}alternative} block, otherwise you will not get the
160 expected number of endings.}
161
162 @warning{If you include @code{@bs{}relative} inside a
163 @code{@bs{}repeat} without explicitly instantiating the
164 @code{Voice} context, extra (unwanted) staves will appear.  See
165 @rprogram{An extra staff appears}.}
166
167 @cindex repeat with upbeat
168 @cindex upbeat in a repeat
169 @cindex anacrusis in a repeat
170 @cindex repeat with anacrusis
171 @cindex repeat with pickup
172 @cindex pickup in a repeat
173 @funindex \partial
174
175 If a repeat starts in the middle of a measure and has no alternate
176 endings, normally the end of the repeat will also fall in the
177 middle of a measure, so that the two ends add up to one complete
178 measure.  In such cases, the repeat signs do not constitute true
179 bar lines.  Do not use @code{\partial} commands or bar checks
180 where these repeat signs are printed:
181
182 @lilypond[verbatim,quote,relative=1]
183 % no \partial here
184 c4 e g  % no bar check here
185 % no \partial here
186 \repeat volta 4 {
187   e4 |
188   c2 e |
189   % no \partial here
190   g4 g g  % no bar check here
191 }
192 % no \partial here
193 g4 |
194 a2 a |
195 g1 |
196 @end lilypond
197
198 Similarly, if a repeat begins with the initial partial measure of
199 a score and has no alternate endings, the same conditions apply as
200 in the above example, except that in this case the @code{\partial}
201 command is required at the beginning of the score:
202
203 @lilypond[verbatim,quote,relative=1]
204 \partial 4  % required
205 \repeat volta 4 {
206   e4 |
207   c2 e |
208   % no \partial here
209   g4 g g  % no bar check here
210 }
211 % no \partial here
212 g4 |
213 a2 a |
214 g1 |
215 @end lilypond
216
217 When alternate endings are added to a repeat that begins with an
218 incomplete measure, it becomes necessary to set the
219 @code{Timing.measureLength} context property manually, in the
220 following specific places:
221
222 @itemize
223 @item
224 at the start of any incomplete measures in the @code{\alternative}
225 block, which normally occur at the end of each alternative, except
226 (in most cases) the last.
227
228 @item
229 at the start of each alternative, except the first.
230 @end itemize
231
232 @lilypond[verbatim,quote,relative=1]
233 \partial 4
234 \repeat volta 2 { e4 | c2 e | }
235 \alternative {
236   {
237     f2 d |
238     \set Timing.measureLength = #(ly:make-moment 3/4)
239     g4 g g  % optional bar check is allowed here
240   }
241   {
242     \set Timing.measureLength = #(ly:make-moment 4/4)
243     a2 a |
244   }
245 }
246 g1 |
247 @end lilypond
248
249 The @code{measureLength} property is described in @ref{Time
250 administration}.
251
252 @cindex repeats, with ties
253 @cindex alternative endings, with ties
254 @cindex ties, in repeats
255 @cindex ties, alternative endings
256 @funindex \repeatTie
257
258 Ties may be added to a second ending:
259
260 @lilypond[verbatim,quote,relative=2]
261 c1
262 \repeat volta 2 { c4 d e f~ }
263 \alternative {
264   { f2 d }
265   { f2\repeatTie f, }
266 }
267 @end lilypond
268
269 @funindex \inStaffSegno
270 @cindex repeats, with segno
271 @cindex segno, with repeats
272
273 The @code{\inStaffSegno} command can be used to generate a composite
274 bar line incorporating the segno symbol with the appropriate repeat
275 bar line when used with the @code{\repeat volta} command.  The
276 correct type of repeat bar line, viz. start repeat, end repeat or
277 double repeat, is selected automatically.  Note that the
278 corresponding @qq{D.S.} mark must be added manually.
279
280 Away from a repeat:
281
282 @lilypond[verbatim,quote,relative=1]
283 e1
284 \inStaffSegno
285 f2 g a b
286 c1_"D.S." \bar "|."
287 @end lilypond
288
289 At the start of a repeat:
290
291 @lilypond[verbatim,quote,relative=1]
292 e1
293 \repeat volta 2 {
294   \inStaffSegno  % start repeat
295   f2 g a b
296 }
297 c1_"D.S." \bar "|."
298 @end lilypond
299
300 At the end of a repeat:
301
302 @lilypond[verbatim,quote,relative=1]
303 e1
304 \repeat volta 2 {
305   f2 g a b
306   \inStaffSegno  % end repeat
307 }
308 f2 g a b
309 c1_"D.S." \bar "|."
310 @end lilypond
311
312 Between two repeats:
313
314 @lilypond[verbatim,quote,relative=1]
315 e1
316 \repeat volta 2 {
317   f2 g a b
318 }
319 \inStaffSegno  % double repeat
320 \repeat volta 2 {
321   f2 g a b
322 }
323 c1_"D.S." \bar "|."
324 @end lilypond
325
326 Alternative bar line symbols can be obtained by setting (in the Score
327 context) the properties @code{segnoType}, @code{startRepeatSegnoType},
328 @code{endRepeatSegnoType} or @code{doubleRepeatSegnoType} to the
329 required bar line type.  The alternative bar line types must be
330 selected from the pre-defined types or types previously defined
331 with the @code{\defineBarLine} command (see @ref{Bar lines}).
332
333 @lilypond[verbatim,quote,relative=1]
334 \defineBarLine ":|.S[" #'(":|." "S[" "")
335 \defineBarLine "]" #'("]" "" "")
336 e1
337 \repeat volta 2 {
338   f2 g a b
339   \once \set Score.endRepeatSegnoType = ":|.S["
340   \inStaffSegno
341 }
342 f2 g \bar "]" a b
343 c1_"D.S." \bar "|."
344 @end lilypond
345
346 @snippets
347 @lilypondfile[verbatim,quote,texidoc,doctitle]
348 {shortening-volta-brackets.ly}
349
350 @lilypondfile[verbatim,quote,texidoc,doctitle]
351 {adding-volta-brackets-to-additional-staves.ly}
352
353 @lilypondfile[verbatim,quote,texidoc,doctitle]
354 {setting-the-double-repeat-default-for-volte.ly}
355
356 @cindex repeats, bar numbers letters
357 @cindex repeats, alternative bar numbers
358
359 @lilypondfile[verbatim,quote,texidoc,doctitle]
360 {alternative-bar-numbering.ly}
361
362 @seealso
363 Music Glossary:
364 @rglos{repeat},
365 @rglos{volta}.
366
367 Notation Reference:
368 @ref{Bar lines},
369 @ref{Modifying context plug-ins},
370 @ref{Modifying ties and slurs},
371 @ref{Time administration}.
372
373 Snippets:
374 @rlsr{Repeats}.
375
376 Internals Reference:
377 @rinternals{VoltaBracket},
378 @rinternals{RepeatedMusic},
379 @rinternals{VoltaRepeatedMusic},
380 @rinternals{UnfoldedRepeatedMusic}.
381
382 @knownissues
383 @cindex repeat, ambiguous
384 @cindex nested repeat
385 @cindex repeat, nested
386 @cindex repeat timing information
387 @cindex repeat and measure number
388 @cindex timing information and repeats
389 @cindex measure number and repeats
390 @cindex repeats and slur
391 @cindex slur and repeats
392 @cindex glissandi and repeats
393 @cindex repeats and glissandi
394
395 Slurs that span from a @code{\repeat} block into an
396 @code{\alternative} block will only work for the first alternative
397 ending.  The visual appearance of a continuing slur in other
398 alternative blocks may be simulated with @code{\repeatTie} if the
399 slur extends into only one note in the alternative block, although
400 this method does not work in @code{TabStaff}.  Other methods which
401 may be tailored to indicate continuing slurs over several notes in
402 alternative blocks, and which also work in @code{TabStaff} contexts,
403 are shown in @ref{Modifying ties and slurs}.
404
405 Also, slurs cannot wrap around from the end of one
406 alternative back to the beginning of the repeat.
407
408 Glissandi that span from a @code{\repeat} block into an
409 @code{\alternative} block will only work for the first alternative
410 ending.  The visual appearance of a continuing glissando in other
411 alternative blocks may be indicated by coding a glissando starting
412 on a hidden grace note.  For an example, see
413 @qq{Extending glissandi across repeats} under Selected Snippets
414 in @ref{Glissando}.
415
416 If a repeat that begins with an incomplete measure has an
417 @code{\alternative} block that contains modifications to the
418 @code{measureLength} property, using @code{\unfoldRepeats} will
419 result in wrongly-placed bar lines and bar check warnings.
420
421 A nested repeat like
422
423 @example
424 \repeat @dots{}
425 \repeat @dots{}
426 \alternative
427 @end example
428
429 @noindent
430 is ambiguous, since it is not clear to which @code{\repeat} the
431 @code{\alternative} belongs.  This ambiguity is resolved by always
432 having the @code{\alternative} belong to the inner @code{\repeat}.
433 For clarity, it is advisable to use braces in such situations.
434
435
436 @node Manual repeat marks
437 @unnumberedsubsubsec Manual repeat marks
438
439 @cindex manual repeat mark
440 @cindex repeat, manual
441 @cindex start repeat
442 @cindex repeat, start
443 @cindex end repeat
444 @cindex repeat, end
445 @cindex repeat number, changing
446 @cindex repeat volta, changing
447 @cindex volta bracket
448 @cindex bracket, volta
449 @funindex repeatCommands
450 @funindex start-repeat
451
452 @warning{These methods are only used for displaying unusual repeat
453 constructs, and may produce unexpected behavior.  In most cases,
454 repeats should be created using the standard @code{@bs{}repeat} command
455 or by printing the relevant bar lines.  For more information, see
456 @ref{Bar lines}.}
457
458 The property @code{repeatCommands} can be used to control the
459 layout of repeats.  Its value is a Scheme list of repeat commands.
460
461 @table @code
462 @item start-repeat
463 Print a @code{.|:} bar line.
464
465 @lilypond[verbatim,quote,relative=2]
466 c1
467 \set Score.repeatCommands = #'(start-repeat)
468 d4 e f g
469 c1
470 @end lilypond
471
472 As per standard engraving practice, repeat signs are not printed
473 at the beginning of a piece.
474
475 @item end-repeat
476 Print a @code{:|.} bar line:
477
478 @lilypond[verbatim,quote,relative=2]
479 c1
480 d4 e f g
481 \set Score.repeatCommands = #'(end-repeat)
482 c1
483 @end lilypond
484
485 @item (volta @var{number}) @dots{} (volta #f)
486 Create a new volta with the specified number.  The volta bracket must
487 be explicitly terminated, or it will not be printed.
488
489 @lilypond[verbatim,quote,relative=2]
490 f4 g a b
491 \set Score.repeatCommands = #'((volta "2"))
492 g4 a g a
493 \set Score.repeatCommands = #'((volta #f))
494 c1
495 @end lilypond
496
497 @end table
498
499 Multiple repeat commands may occur at the same point:
500
501 @lilypond[verbatim,quote,relative=2]
502 f4 g a b
503 \set Score.repeatCommands = #'((volta "2, 5") end-repeat)
504 g4 a g a
505 c1
506 \set Score.repeatCommands = #'((volta #f) (volta "95") end-repeat)
507 b1
508 \set Score.repeatCommands = #'((volta #f))
509 @end lilypond
510
511 @cindex volta bracket with text
512 @cindex text in volta bracket
513
514 Text can be included with the volta bracket.  The text can be a
515 number or numbers or markup text, see @ref{Formatting text}.  The
516 simplest way to use markup text is to define the markup first,
517 then include the markup in a Scheme list.
518
519 @lilypond[verbatim,quote]
520 voltaAdLib = \markup { 1. 2. 3... \text \italic { ad lib. } }
521 \relative c'' {
522   c1
523   \set Score.repeatCommands =
524     #(list(list 'volta voltaAdLib) 'start-repeat)
525   c4 b d e
526   \set Score.repeatCommands = #'((volta #f) (volta "4.") end-repeat)
527   f1
528   \set Score.repeatCommands = #'((volta #f))
529 }
530 @end lilypond
531
532 @seealso
533 Notation Reference:
534 @ref{Bar lines},
535 @ref{Formatting text}.
536
537 Snippets:
538 @rlsr{Repeats}.
539
540 Internals Reference:
541 @rinternals{VoltaBracket},
542 @rinternals{RepeatedMusic},
543 @rinternals{VoltaRepeatedMusic}.
544
545
546 @node Written-out repeats
547 @unnumberedsubsubsec Written-out repeats
548
549 @cindex written-out repeats
550 @cindex repeats, written-out
551 @cindex repeats, unfold
552 @cindex repeats, alternative
553 @cindex unfold repeat
554 @cindex unfold repeat, alternate endings
555 @cindex alternate repeats
556 @cindex alternate endings, repeats
557 @funindex unfold
558
559 By using the @code{unfold} command, repeats can be used to simplify the
560 writing out of repetitious music.  The syntax is
561
562 @example
563 \repeat unfold @var{repeatcount} @var{musicexpr}
564 @end example
565
566 @noindent
567 where @code{@var{musicexpr}} is a music expression and
568 @code{@var{repeatcount}} is the number of times
569 @code{@var{musicexpr}} is repeated.
570
571 @lilypond[verbatim,quote,relative=2]
572 \repeat unfold 2 { c4 d e f }
573 c1
574 @end lilypond
575
576 In some cases, especially in a @code{\relative} context, the
577 @code{\repeat unfold} function is not the same as writing out the
578 music expression multiple times. E.g,
579
580 @example
581 \repeat unfold 2 @{ a'4 b c @}
582 @end example
583
584 is not equivalent to
585
586 @example
587 a'4 b c | a'4 b c
588 @end example
589
590 Unfold repeats can be made with alternate endings.
591
592 @lilypond[verbatim,quote,relative=2]
593 \repeat unfold 2 { c4 d e f }
594 \alternative {
595   { c2 g' }
596   { c,2 b }
597 }
598 c1
599 @end lilypond
600
601 If there are more repeats than there are alternate endings, the first
602 alternative is applied multiple times until the remaining alternatives
603 make up the total number of repeats.
604
605 @lilypond[verbatim,quote,relative=2]
606 \repeat unfold 4 { c4 d e f }
607 \alternative {
608   { c2 g' }
609   { c,2 b }
610   { e2 d }
611  }
612 c1
613 @end lilypond
614
615 If there are more alternate endings than repeats then only the first
616 alternatives are applied.  The remaining alternatives will be ignored
617 and not printed.
618
619 @lilypond[verbatim,quote,relative=2]
620 \repeat unfold 2 { c4 d e f }
621 \alternative {
622   { c2 g' }
623   { c,2 b }
624   { e2 d }
625 }
626 c1
627 @end lilypond
628
629 It is also possible to nest multiple @code{unfold} functions (with or
630 without alternate endings).
631
632 @lilypond[verbatim,quote,relative=2]
633 \repeat unfold 2 {
634   \repeat unfold 2 { c4 d e f }
635   \alternative {
636     { c2 g' }
637     { c,2 b }
638   }
639 }
640 c1
641 @end lilypond
642
643 Chord constructs can be repeated by the chord repetition symbol
644 @code{q}.  See @ref{Chord repetition}.
645
646 @warning{If you include @code{@bs{}relative} inside a @code{@bs{}repeat}
647 without explicitly instantiating the @code{Voice} context, extra
648 (unwanted) staves will appear.  See @rprogram{An extra staff appears}.}
649
650 @seealso
651 Notation Reference:
652 @ref{Chord repetition}.
653
654 Snippets:
655 @rlsr{Repeats}.
656
657 Internals Reference:
658 @rinternals{RepeatedMusic},
659 @rinternals{UnfoldedRepeatedMusic}.
660
661
662 @node Short repeats
663 @subsection Short repeats
664
665 This section discusses how to input short repeats.  Short repeats can
666 take two forms: slashes or percent signs to represent repeats of a
667 single note, a single measure or two measures, and tremolos otherwise.
668
669 @menu
670 * Percent repeats::
671 * Tremolo repeats::
672 @end menu
673
674 @node Percent repeats
675 @unnumberedsubsubsec Percent repeats
676
677 @cindex percent repeats
678 @cindex measure repeats
679 @cindex repeat, percent
680 @cindex repeat, measure
681 @cindex repeat, short
682 @funindex \repeat percent
683 @funindex percent
684
685 Repeated short patterns are printed once, and the repeated pattern
686 is replaced with a special sign.
687
688 The syntax is
689
690 @example
691 \repeat percent @var{number} @var{musicexpr}
692 @end example
693
694 @noindent
695 where @code{@var{musicexpr}} is a music expression.
696
697 Patterns that are shorter than one measure are replaced by slashes.
698
699 @lilypond[verbatim,quote,relative=2]
700 \repeat percent 4 { c128 d e f }
701 \repeat percent 4 { c64 d e f }
702 \repeat percent 5 { c32 d e f }
703 \repeat percent 4 { c16 d e f }
704 \repeat percent 4 { c8 d }
705 \repeat percent 4 { c4 }
706 \repeat percent 2 { c2 }
707 @end lilypond
708
709 Patterns of one or two measures are replaced by percent-like symbols.
710
711 @lilypond[verbatim,quote,relative=2]
712 \repeat percent 2 { c4 d e f }
713 \repeat percent 2 { c2 d }
714 \repeat percent 2 { c1 }
715 @end lilypond
716
717 @lilypond[verbatim,quote,relative=2]
718 \repeat percent 3 { c4 d e f | c2 g' }
719 @end lilypond
720
721 Patterns that are shorter than one measure but contain mixed durations
722 use a double-percent symbol.
723
724 @lilypond[verbatim,quote,relative=2]
725 \repeat percent 4 { c8. <d f>16 }
726 \repeat percent 2 { \tuplet 3/2 { r8 c d } e4 }
727 @end lilypond
728
729 @snippets
730
731 @lilypondfile[verbatim,quote,texidoc,doctitle]
732 {percent-repeat-counter.ly}
733
734 @lilypondfile[verbatim,quote,texidoc,doctitle]
735 {percent-repeat-count-visibility.ly}
736
737 @lilypondfile[verbatim,quote,texidoc,doctitle]
738 {isolated-percent-repeats.ly}
739
740 @seealso
741 Music Glossary:
742 @rglos{percent repeat},
743 @rglos{simile}.
744
745 Snippets:
746 @rlsr{Repeats}.
747
748 Internals Reference:
749 @rinternals{RepeatSlash},
750 @rinternals{RepeatSlashEvent},
751 @rinternals{DoubleRepeatSlash},
752 @rinternals{PercentRepeat},
753 @rinternals{PercentRepeatCounter},
754 @rinternals{PercentRepeatedMusic},
755 @rinternals{Percent_repeat_engraver},
756 @rinternals{DoublePercentEvent},
757 @rinternals{DoublePercentRepeat},
758 @rinternals{DoublePercentRepeatCounter},
759 @rinternals{Double_percent_repeat_engraver},
760 @rinternals{Slash_repeat_engraver}.
761
762
763 @node Tremolo repeats
764 @unnumberedsubsubsec Tremolo repeats
765
766 @cindex tremolo beams
767 @cindex tremolo
768 @cindex repeat, tremolo
769 @funindex \repeat tremolo
770 @funindex tremolo
771
772 Tremolos can take two forms: alternation between two chords or two
773 notes, and rapid repetition of a single note or chord.  Tremolos
774 consisting of an alternation are indicated by adding beams between the
775 notes or chords being alternated, while tremolos consisting of the
776 rapid repetition of a single note are indicated by adding beams or
777 slashes to a single note.
778
779 To place tremolo marks between notes, use @code{\repeat} with
780 tremolo style:
781
782 @lilypond[quote,verbatim,relative=2]
783 \repeat tremolo 8 { c16 d }
784 \repeat tremolo 6 { c16 d }
785 \repeat tremolo 2 { c16 d }
786 @end lilypond
787
788 The @code{\repeat tremolo} syntax expects exactly two notes within
789 the braces, and the number of repetitions must correspond to a
790 note value that can be expressed with plain or dotted notes.  Thus,
791 @code{\repeat tremolo 7} is valid and produces a double dotted
792 note, but @code{\repeat tremolo 9} is not.
793
794 The duration of the tremolo equals the duration of the
795 braced expression multiplied by the number of repeats:
796 @code{\repeat tremolo 8 @{ c16 d16 @}} gives a whole note tremolo,
797 notated as two whole notes joined by tremolo beams.
798
799 There are two ways to put tremolo marks on a single note.  The
800 @code{\repeat tremolo} syntax is also used here, in which case
801 the note should not be surrounded by braces:
802
803 @lilypond[quote,verbatim,ragged-right]
804 \repeat tremolo 4 c'16
805 @end lilypond
806
807 @cindex tremolo marks
808 @funindex :
809
810 The same output can be obtained by adding @code{:@var{N}} after
811 the note, where @code{@var{N}} indicates the duration of the
812 subdivision (it must be at least 8).  If @code{@var{N}} is 8, one
813 beam is added to the note's stem.  If @code{@var{N}} is omitted,
814 the last value is used:
815
816 @lilypond[quote,verbatim,relative=2]
817 c2:8 c:32
818 c: c:
819 @end lilypond
820
821 @snippets
822
823 @lilypondfile[verbatim,quote,texidoc,doctitle]
824 {cross-staff-tremolos.ly}
825
826 @seealso
827 Snippets:
828 @rlsr{Repeats}.
829
830 @cindex tremolo, cross-staff
831 @cindex cross-staff tremolo