1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @c This file is part of lilypond.tely
4 @c A menu is needed before every deeper *section nesting of @node's; run
5 @c M-x texinfo-all-menus-update
6 @c to automatically fill in these menus before saving changes
9 @chapter Basic notation
11 This chapter explains how to use basic notation features.
15 * Alternate music entry::
29 This section is about basic notation elements like notes, rests, and
30 related constructs, such as stems, tuplets and ties.
35 * Cautionary accidentals::
51 @cindex Note specification
52 @cindex entering notes
54 A note is printed by specifying its pitch and duration,
56 @lilypond[quote,verbatim,ragged-right,fragment]
62 This manual: @ref{Pitches}, @ref{Durations}
71 A pitch name is specified using lowercase letters @code{a} through @code{g}.
72 An ascending C-major scale is engraved with
74 @lilypond[quote,fragment,verbatim,ragged-right]
79 The note name @code{c} is engraved one octave below middle C.
81 @c this should be scored with a treble clef and
82 @c four leger lines below the staff.
83 @lilypond[quote,fragment,verbatim,ragged-right]
90 The optional octave specification takes the form of a series of
91 single quote (`@code{'}') characters or a series of comma
92 (`@code{,}') characters. Each @code{'} raises the pitch by one
93 octave; each @code{,} lowers the pitch by an octave.
95 @lilypond[quote,ragged-right,fragment,verbatim]
97 c' c'' e' g d'' d' d c
99 c, c,, e, g d,, d, d c
102 An alternate method may be used to declare which octave to
103 engrave a pitch; this method does not require as many
104 octave specifications (`@code{'}' and `@code{,}'). See
105 @ref{Relative octaves}.
107 @cindex note names, Dutch
109 A sharp is formed by adding @code{-is} to the end of a pitch name and
110 a flat is formed by adding @code{-es}
112 @c avoid engraving naturals by crossing bar lines; we're not ready for them
113 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
117 Double sharps and double flats
118 are obtained by adding @code{-isis} or @code{-eses} to a note name. These
119 are the Dutch note names. In Dutch, @code{aes} is contracted to
120 @code{as}, but both forms are accepted. Similarly, both
121 @code{es} and @code{ees} are accepted
123 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
127 A natural will cancel the effect of an accidental or key signature.
128 However, naturals are not encoded into the note name syntax with a
129 suffix; a natural pitch is shown as a simple note name
131 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
137 There are predefined sets of note names for various other languages.
138 To use them, include the language specific init file. For
139 example, add @code{\include "english.ly"} to the top of the input
140 file. The available language files
141 and the note names they define are
146 Note Names sharp flat
147 nederlands.ly c d e f g a bes b -is -es
148 english.ly c d e f g a bf b -s/-sharp -f/-flat
150 deutsch.ly c d e f g a b h -is -es
151 norsk.ly c d e f g a b h -iss/-is -ess/-es
152 svenska.ly c d e f g a b h -iss -ess
153 italiano.ly do re mi fa sol la sib si -d -b
154 catalan.ly do re mi fa sol la sib si -d/-s -b
155 espanol.ly do re mi fa sol la sib si -s -b
161 In accordance with standard typesetting rules, a natural sign is printed
162 before a sharp or flat if a previous accidental needs to be
163 cancelled. To change this behavior, use
164 @code{\set Staff.extraNatural = ##f}
166 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
168 \set Staff.extraNatural = ##f
174 Suggested accidentals (used in notating musica ficta) may
175 be written with @code{suggestAccidentals}
177 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
178 \set suggestAccidentals = ##t
185 Program reference: @internalsref{LedgerLineSpanner},
186 @internalsref{NoteHead}.
189 @node Cautionary accidentals
190 @subsection Cautionary accidentals
192 @cindex accidental, reminder
193 @cindex accidental, cautionary
194 @cindex accidental, parenthesized
195 @cindex reminder accidental
197 @cindex cautionary accidental
198 @cindex parenthesized accidental
201 Normally accidentals are printed automatically, but you may also
202 print them manually. A reminder accidental
203 can be forced by adding an exclamation mark @code{!}
204 after the pitch. A cautionary accidental
205 (i.e., an accidental within parentheses) can be obtained by adding the
206 question mark `@code{?}' after the pitch. These extra accidentals
207 can be used to produce natural signs, too.
209 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
210 cis cis cis! cis? c c? c! c
216 The automatic production of accidentals can be tuned in many
217 ways. For more information, see @ref{Automatic accidentals}.
220 @subsection Micro tones
222 @cindex quarter tones
223 @cindex semi-flats, semi-sharps
225 Half-flats and half-sharps are formed by adding @code{-eh} and
226 @code{-ih}; the following is a series of Cs with increasing pitches
228 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
229 \set Staff.extraNatural = ##f
233 Micro tones are also exported to the MIDI file.
238 There are no generally accepted standards for denoting
239 three-quarter flats, so LilyPond's symbol does not conform to any
248 A chord is formed by a enclosing a set of pitches in @code{<} and
249 @code{>}. A chord may be followed by a duration, and a set of
250 articulations, just like simple notes
252 @lilypond[verbatim,ragged-right,fragment,quote,relative=1]
256 For more information about chords, see @ref{Chord names}.
267 Rests are entered like notes with the note name @code{r}
269 @lilypond[fragment,quote,ragged-right,verbatim]
273 Whole bar rests, centered in middle of the bar,
274 must be done with multi-measure rests. They can be used for a
275 single bar as well as many bars, and are discussed in
276 @ref{Multi measure rests}.
278 To explicitly specify a rest's vertical position, write a note
279 followed by @code{\rest}. A rest will be placed in the position
280 where the note would appear,
282 @lilypond[fragment,quote,ragged-right,verbatim]
287 This makes manual formatting of
288 polyphonic music much easier, since the automatic rest collision
289 formatter will leave these rests alone.
293 Program reference: @internalsref{Rest}.
300 @cindex Invisible rest
305 An invisible rest (also called a `skip') can be entered like a note
306 with note name `@code{s}' or with @code{\skip @var{duration}}
308 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
309 a4 a4 s4 a4 \skip 1 a4
312 The @code{s} syntax is only available in note mode and chord mode. In
313 other situations, for example, when entering lyrics, you should use
314 the @code{\skip} command
316 @lilypond[quote,ragged-right,verbatim]
319 \new Lyrics \lyricmode { \skip 2 bla2 }
323 The skip command is merely an empty musical placeholder. It does not
324 produce any output, not even transparent output.
326 The @code{s} skip command does create @internalsref{Staff} and
327 @internalsref{Voice} when necessary, similar to note and rest
328 commands. For example, the following results in an empty staff.
330 @lilypond[quote,ragged-right,verbatim]
334 The fragment @code{@{ \skip 4 @} } would produce an empty page.
338 Program reference: @internalsref{SkipMusic}.
342 @subsection Durations
349 In Note, Chord, and Lyrics mode, durations are designated by numbers and
350 dots: durations are entered as their reciprocal values. For example, a
351 quarter note is entered using a @code{4} (since it is a 1/4 note), while
352 a half note is entered using a @code{2} (since it is a 1/2 note). For
353 notes longer than a whole you must use the variables @code{\longa} and
358 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
360 r1 r2 r4 r8 r16 r32 r64 r64
366 a\breve*1/2 \autoBeamOff
367 a1 a2 a4 a8 a16 a32 a64 a64
370 r\longa*1/4 r\breve *1/2
371 r1 r2 r4 r8 r16 r32 r64 r64
377 \remove "Clef_engraver"
378 \override StaffSymbol #'transparent = ##t
379 \override TimeSignature #'transparent = ##t
380 \override BarLine #'transparent = ##t
381 \consists "Pitch_squash_engraver"
387 If the duration is omitted then it is set to the previously entered
388 duration. The default for the first note is a quarter note.
390 @lilypond[quote,ragged-right,verbatim,fragment]
391 { a a a2 a a4 a a1 a }
395 @node Augmentation dots
396 @subsection Augmentation dots
400 To obtain dotted note lengths, simply add a dot (`@code{.}') to
401 the number. Double-dotted notes are produced in a similar way.
403 @lilypond[quote,ragged-right,fragment,verbatim]
404 a'4 b' c''4. b'8 a'4. b'4.. c''8.
409 Dots are normally moved up to avoid staff lines, except in polyphonic
410 situations. The following commands may be used to force a particular
417 @funindex \dotsNeutral
422 Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
432 Tuplets are made out of a music expression by multiplying all durations
436 \times @var{fraction} @var{musicexpr}
440 The duration of @var{musicexpr} will be multiplied by the fraction.
441 The fraction's denominator will be printed over the notes, optionally
442 with a bracket. The most common tuplet is the triplet in which 3
443 notes have the length of 2, so the notes are 2/3 of their written
446 @lilypond[quote,ragged-right,fragment,verbatim]
447 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
450 Tuplets may be nested, for example,
452 @lilypond[fragment,ragged-right,verbatim,relative=2]
453 \set tupletNumberFormatFunction = #fraction-tuplet-formatter
456 \times 3/5 { a a a a a }
464 @funindex \tupletDown
466 @funindex \tupletNeutral
467 @code{\tupletNeutral}.
472 @funindex tupletNumberFormatFunction
473 @cindex tuplet formatting
475 The property @code{tupletSpannerDuration} specifies how long each
476 bracket should last. With this, you can make lots of tuplets while
477 typing @code{\times} only once, thus saving lots of typing. In the next
478 example, there are two triplets shown, while @code{\times} was only
481 @lilypond[quote,fragment,relative=2,ragged-right,verbatim]
482 \set tupletSpannerDuration = #(ly:make-moment 1 4)
483 \times 2/3 { c8 c c c c c }
487 For more information about @code{make-moment}, see
488 @ref{Time administration}.
490 The format of the number is determined by the property
491 @code{tupletNumberFormatFunction}. The default prints only the
492 denominator, but if it is set to the Scheme function
493 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
496 To avoid printing tuplet numbers, use
498 @lilypond[quote,fragment,relative=2,ragged-right,verbatim]
499 \times 2/3 { c8 c c } \times 2/3 { c8 c c }
500 \override TupletNumber #'transparent = ##t
501 \times 2/3 { c8 c c } \times 2/3 { c8 c c }
507 Program reference: @internalsref{TupletBracket},
508 @internalsref{TupletNumber}, and @internalsref{TimeScaledMusic}.
510 Examples: @inputfileref{input/@/regression,tuplet@/-nest@/.ly}.
514 @node Scaling durations
515 @subsection Scaling durations
517 You can alter the length of duration by a fraction @var{N/M}
518 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
519 will not affect the appearance of the notes or rests produced.
521 In the following example, the first three notes take up exactly two
522 beats, but no triplet bracket is printed.
523 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
525 a4*2/3 gis4*2/3 a4*2/3
533 This manual: @ref{Tuplets}
539 Whenever a note is found, a @internalsref{Stem} object is created
540 automatically. For whole notes and rests, they are also created but
549 @funindex \stemNeutral
555 To change the direction of stems in the middle of the staff, use
557 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
559 \override Stem #'neutral-direction = #up
561 \override Stem #'neutral-direction = #down
566 @node Alternate music entry
567 @section Alternate music entry
570 This section deals with tricks and features of the input language that
571 were added solely to help entering music and finding and correcting
572 mistakes. There are also external tools that make debugging easier.
573 See @ref{Point and click} for more information.
575 It is also possible to enter and edit music using other programs, such as
576 GUI interfaces or MIDI sequencers. Refer to the LilyPond
577 website for more information.
585 * Skipping corrected music::
586 * Automatic note splitting::
587 * Writing music in parallel::
591 @node Relative octaves
592 @subsection Relative octaves
595 @cindex Relative octave specification
598 Octaves are specified by adding @code{'} and @code{,} to pitch names.
599 When you copy existing music, it is easy to accidentally put a pitch
600 in the wrong octave and hard to find such an error. The relative
601 octave mode prevents these errors by making the mistakes much
602 larger: a single error puts the rest of the piece off by one octave
605 \relative @var{startpitch} @var{musicexpr}
612 \relative @var{musicexpr}
616 @code{c'} is used as the default if no starting pitch is defined.
618 The octave of notes that appear in @var{musicexpr} are calculated as
619 follows: if no octave changing marks are used, the basic interval
620 between this and the last note is always taken to be a fourth or
621 less. This distance is determined without regarding alterations; a
622 @code{fisis} following a @code{ceses} will be put above the
623 @code{ceses}. In other words, a doubly-augmented fourth is considered
624 a smaller interval than a diminished fifth, even though the
625 doubly-augmented fourth spans seven semitones while the diminished
626 fifth only spans six semitones.
628 The octave changing marks @code{'} and @code{,} can be added to raise
629 or lower the pitch by an extra octave. Upon entering relative mode,
630 an absolute starting pitch can be specified that will act as the
631 predecessor of the first note of @var{musicexpr}. If no starting pitch
632 is specified, then middle C is used as a start.
634 Here is the relative mode shown in action
635 @lilypond[quote,fragment,ragged-right,verbatim]
641 Octave changing marks are used for intervals greater than a fourth
642 @lilypond[quote,ragged-right,fragment,verbatim]
648 If the preceding item is a chord, the first note of the chord is used
649 to determine the first note of the next chord
651 @lilypond[quote,ragged-right,fragment,verbatim]
659 The pitch after the @code{\relative} contains a note name.
661 The relative conversion will not affect @code{\transpose},
662 @code{\chordmode} or @code{\relative} sections in its argument. To use
663 relative within transposed music, an additional @code{\relative} must
664 be placed inside @code{\transpose}.
668 @subsection Octave check
672 Octave checks make octave errors easier to correct: a note may be
673 followed by @code{=}@var{quotes} which indicates what its absolute
674 octave should be. In the following example,
677 \relative c'' @{ c='' b=' d,='' @}
681 the @code{d} will generate a warning, because a @code{d''} is expected
682 (because @code{b'} to @code{d''} is only a third), but a @code{d'} is
683 found. In the output, the octave is corrected to be a @code{d''} and
684 the next note is calculated relative to @code{d''} instead of @code{d'}.
686 There is also an octave check that produces no visible output. The syntax
692 This checks that @var{pitch} (without quotes) yields @var{pitch} (with
693 quotes) in \relative mode. If not, a warning is printed, and the
694 octave is corrected. The @var{pitch} is not printed as a note.
696 In the example below, the first check passes without incident, since
697 the @code{e} (in relative mode) is within a fifth of @code{a'}. However,
698 the second check produces a warning, since the @code{e} is not within
699 a fifth of @code{b'}. The warning message is printed, and the octave
700 is adjusted so that the following notes are in the correct octave
712 The octave of a note following an octave check is determined with
713 respect to the note preceding it. In the next fragment, the last note
714 is an @code{a'}, above middle C. That means that the @code{\octave}
715 check passes successfully, so the check could be deleted without changing
716 the output of the piece.
718 @lilypond[quote,ragged-right,verbatim,fragment]
728 @subsection Transpose
731 @cindex transposition of pitches
734 A music expression can be transposed with @code{\transpose}. The
737 \transpose @var{from} @var{to} @var{musicexpr}
740 This means that @var{musicexpr} is transposed by the interval between
741 the pitches @var{from} and @var{to}: any note with pitch @code{from}
742 is changed to @code{to}.
744 For example, consider a piece written in the key of D-major. If
745 this piece is a little too low for its performer, it can be
746 transposed up to E-major with
748 \transpose d e @dots{}
751 Consider a part written for violin (a C instrument). If
752 this part is to be played on the A clarinet (for which an
753 A is notated as a C, and which sounds a minor third lower
754 than notated), the following
755 transposition will produce the appropriate part
758 \transpose a c @dots{}
761 @code{\transpose} distinguishes between enharmonic pitches: both
762 @code{\transpose c cis} or @code{\transpose c des} will transpose up
763 half a tone. The first version will print sharps and the second
764 version will print flats
766 @lilypond[quote,ragged-right,verbatim]
767 mus = { \key d \major cis d fis g }
776 @code{\transpose} may also be used to input written notes for a
777 transposing instrument. Pitches are normally entered into LilyPond
778 in C (or ``concert pitch''), but they may be entered in another
779 key. For example, when entering music for a B-flat trumpet which
780 begins on concert D, one would write
783 \transpose c bes @{ e4 @dots{} @}
786 To print this music in B-flat again (i.e. producing a trumpet part,
787 instead of a concert pitch conductor's score) you would wrap the
788 existing music with another @code{transpose}
791 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
797 Program reference: @internalsref{TransposedMusic}.
802 If you want to use both @code{\transpose} and @code{\relative},
803 you must put @code{\transpose} outside of @code{\relative}, since
804 @code{\relative} will have no effect music that appears inside a
809 @subsection Bar check
812 @funindex barCheckSynchronize
815 Bar checks help detect errors in the durations. A bar check is
816 entered using the bar symbol, `@code{|}'. Whenever it is encountered
817 during interpretation, it should fall on a measure boundary. If it
818 does not, a warning is printed. In the next example, the second bar
819 check will signal an error
821 \time 3/4 c2 e4 | g2 |
824 Bar checks can also be used in lyrics, for example
829 Twin -- kle | Twin -- kle
833 Failed bar checks are caused by entering incorrect
834 durations. Incorrect durations often completely garble up the score,
835 especially if the score is polyphonic, so a good place to start correcting
836 input is by scanning for failed bar checks and incorrect durations.
841 It is also possible to redefine the meaning of @code{|}. This is done
842 by assigning a music expression to @code{pipeSymbol},
844 @lilypond[quote,ragged-right,verbatim]
845 pipeSymbol = \bar "||"
851 @node Barnumber check
852 @subsection Barnumber check
854 When copying large pieces of music, it can be helpful to check that
855 the LilyPond bar number corresponds to the original that you are
856 entering from. This can be checked with @code{\barNumberCheck}, for
864 will print a warning if the @code{currentBarNumber} is not 123 when it
868 @node Skipping corrected music
869 @subsection Skipping corrected music
872 @funindex skipTypesetting
873 @funindex showLastLength
875 When entering or copying music, usually only the music near the end (where
877 are adding notes) is interesting to view and correct. To speed up
878 this correction process, it is possible to skip typesetting of all but
879 the last few measures. This is achieved by putting
882 showLastLength = R1*5
887 in your source file. This will render only the last 5 measures
888 (assuming 4/4 time signature) of every @code{\score} in the input
889 file. For longer pieces, rendering only a small part is often an order
890 of magnitude quicker than rendering it completely
892 Skipping parts of a score can be controlled in a more fine-grained
893 fashion with the property @code{Score.skipTypesetting}. When it is
894 set, no typesetting is performed at all.
896 This property is also used to control output to the MIDI file. Note that
897 it skips all events, including tempo and instrument changes. You have
900 @lilypond[quote,fragment,ragged-right,verbatim]
903 \set Score.skipTypesetting = ##t
905 \set Score.skipTypesetting = ##f
909 In polyphonic music, @code{Score.skipTypesetting} will affect all
910 voices and staves, saving even more time.
913 @node Automatic note splitting
914 @subsection Automatic note splitting
916 Long notes can be converted automatically to tied notes. This is done
917 by replacing the @internalsref{Note_heads_engraver} by the
918 @internalsref{Completion_heads_engraver}.
919 In the following examples, notes crossing the bar line are split and tied.
921 @lilypond[quote,fragment,verbatim,relative=1,line-width=12\cm]
923 \remove "Note_heads_engraver"
924 \consists "Completion_heads_engraver"
926 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
930 This engraver splits all running notes at the bar line, and inserts
931 ties. One of its uses is to debug complex scores: if the measures are
932 not entirely filled, then the ties exactly show how much each measure
938 Not all durations (especially those containing tuplets) can be
939 represented exactly with normal notes and dots, but the engraver will
942 @code{Completion_heads_engraver} only affects notes; it does not split
948 Examples: @inputfileref{input/@/regression,completion@/-heads@/.ly}.
952 Program reference: @internalsref{Completion_heads_engraver}.
955 @node Writing music in parallel
956 @subsection Writing music in parallel
957 @cindex Writing music in parallel
958 @cindex Interleaved music
960 Music for multiple parts can be interleaved
962 @lilypond[quote,fragment,verbatim]
963 \parallelMusic #'(voiceA voiceB) {
964 r8 g'16[ c''] e''[ g' c'' e''] r8 g'16[ c''] e''[ g' c'' e''] |
966 r8 a'16[ d''] f''[ a' d'' f''] r8 a'16[ d''] f''[ a' d'' f''] |
970 \new Staff \new Voice \voiceA
971 \new Staff \new Voice \voiceB
977 @section Staff notation
979 @cindex Staff notation
981 This section describes music notation that occurs on staff level,
982 such as key signatures, clefs and time signatures.
991 * System start delimiters::
1001 The clef indicates which lines of the staff correspond to which
1002 pitches. The clef is set with the @code{\clef} command
1004 @lilypond[quote,ragged-right,fragment,verbatim]
1005 { c''2 \clef alto g'2 }
1014 @cindex soprano clef
1015 @cindex mezzosoprano clef
1016 @cindex baritone clef
1017 @cindex varbaritone clef
1018 @cindex subbass clef
1020 Supported clefs include
1022 @multitable @columnfractions .33 .66
1023 @headitem Clef @tab Position
1024 @item @code{treble}, violin, G, G2 @tab
1026 @item @code{alto, C} @tab
1028 @item @code{tenor} @tab
1030 @item @code{bass, F} @tab
1032 @item @code{french} @tab
1033 G clef on 1st line, so-called French violin clef
1034 @item @code{soprano} @tab
1036 @item @code{mezzosoprano} @tab
1038 @item @code{baritone} @tab
1040 @item @code{varbaritone} @tab
1042 @item @code{subbass} @tab
1044 @item @code{percussion} @tab
1046 @item @code{tab} @tab
1050 By adding @code{_8} or @code{^8} to the clef name, the clef is
1051 transposed one octave down or up, respectively, and @code{_15} and
1052 @code{^15} transposes by two octaves. The argument @var{clefname}
1053 must be enclosed in quotes when it contains underscores or digits. For
1056 @cindex choral tenor clef
1057 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
1064 The command @code{\clef "treble_8"} is equivalent to setting
1066 @code{clefPosition} (which controls the Y position of the clef),
1067 @code{middleCPosition} and @code{clefOctavation}. A clef is printed
1068 when any of these properties are changed. The following example shows
1069 possibilities when setting properties manually.
1071 @lilypond[quote,ragged-right,verbatim]
1073 \set Staff.clefGlyph = #"clefs.F"
1074 \set Staff.clefPosition = #2
1076 \set Staff.clefGlyph = #"clefs.G"
1078 \set Staff.clefGlyph = #"clefs.C"
1080 \set Staff.clefOctavation = #7
1082 \set Staff.clefOctavation = #0
1083 \set Staff.clefPosition = #0
1087 \set Staff.middleCPosition = #4
1095 Program reference: @internalsref{Clef}.
1099 @subsection Key signature
1101 @cindex Key signature
1104 The key signature indicates the tonality in which a piece is played. It
1105 is denoted by a set of alterations (flats or sharps) at the start of the
1108 Setting or changing the key signature is done with the @code{\key}
1112 @code{\key} @var{pitch} @var{type}
1121 @funindex \mixolydian
1125 @cindex church modes
1127 Here, @var{type} should be @code{\major} or @code{\minor} to get
1128 @var{pitch}-major or @var{pitch}-minor, respectively. You may also
1129 use the standard mode names (also called ``church modes''): @code{\ionian},
1130 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
1131 @code{\phrygian}, and @code{\dorian}.
1133 This command sets the context property
1134 @code{Staff.keySignature}. Non-standard key signatures
1135 can be specified by setting this property directly.
1137 Accidentals and key signatures often confuse new users, because
1138 unaltered notes get natural signs depending on the key signature. For
1139 more information, see @ref{More about pitches}.
1144 A natural sign is printed to cancel any previous accidentals. This
1145 can be suppressed by setting the @code{Staff.printKeyCancellation}
1148 @lilypond[quote,fragment,ragged-right,fragment,verbatim,relative=2]
1153 \set Staff.printKeyCancellation = ##f
1163 Program reference: @internalsref{KeyCancellation},
1164 @internalsref{KeySignature}.
1167 @node Time signature
1168 @subsection Time signature
1170 @cindex Time signature
1174 Time signature indicates the metrum of a piece: a regular pattern of
1175 strong and weak beats. It is denoted by a fraction at the start of the
1178 The time signature is set with the @code{\time} command
1180 @lilypond[quote,ragged-right,fragment,verbatim]
1181 \time 2/4 c'2 \time 3/4 c'2.
1186 The symbol that is printed can be customized with the @code{style}
1187 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1190 @lilypond[fragment,quote,ragged-right,verbatim]
1193 \override Staff.TimeSignature #'style = #'()
1198 There are many more options for its layout. See @ref{Ancient time
1199 signatures} for more examples.
1201 @code{\time} sets the property @code{timeSignatureFraction},
1202 @code{beatLength} and @code{measureLength} in the @code{Timing}
1203 context, which is normally aliased to @internalsref{Score}. The
1204 property @code{measureLength} determines where bar lines should be
1205 inserted, and how automatic beams should be generated. Changing the
1206 value of @code{timeSignatureFraction} also causes the symbol to be
1209 More options are available through the Scheme function
1210 @code{set-time-signature}. In combination with the
1211 @internalsref{Measure_grouping_engraver}, it will create
1212 @internalsref{MeasureGrouping} signs. Such signs ease reading
1213 rhythmically complex modern music. In the following example, the 9/8
1214 measure is subdivided in 2, 2, 2 and 3. This is passed to
1215 @code{set-time-signature} as the third argument @code{(2 2 2 3)}
1217 @lilypond[quote,ragged-right,verbatim]
1220 #(set-time-signature 9 8 '(2 2 2 3))
1221 g8[ g] d[ d] g[ g] a8[( bes g]) |
1222 #(set-time-signature 5 8 '(3 2))
1228 \consists "Measure_grouping_engraver"
1237 Program reference: @internalsref{TimeSignature}, and
1238 @internalsref{Timing_translator}.
1240 Examples: @inputfileref{input/@/test,compound@/-time@/.ly}.
1245 Automatic beaming does not use the measure grouping specified with
1246 @code{set-time-signature}.
1249 @node Partial measures
1250 @subsection Partial measures
1254 @cindex partial measure
1255 @cindex measure, partial
1256 @cindex shorten measures
1259 Partial measures, such as an anacrusis or upbeat, are entered using the
1261 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1262 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1265 The syntax for this command is
1268 \partial @var{duration}
1271 This is internally translated into
1274 \set Timing.measurePosition = -@var{length of duration}
1277 The property @code{measurePosition} contains a rational number
1278 indicating how much of the measure has passed at this point.
1283 This command does not take into account grace notes at the start of
1284 the music. When a piece starts with graces notes in the pickup, then
1285 the @code{\partial} should follow the grace notes
1287 @lilypond[verbatim,quote,ragged-right,relative,fragment]
1296 @subsection Bar lines
1300 @cindex measure lines
1303 Bar lines delimit measures, but are also used to indicate
1304 repeats. Normally they are inserted automatically. Line
1305 breaks may only happen on bar lines.
1307 Special types of bar lines can be forced with the @code{\bar} command
1309 @lilypond[quote,ragged-right,relative=2,fragment,verbatim]
1313 The following bar types are available
1315 @lilypondfile[ragged-right,quote]{bar-lines.ly}
1317 To allow a line break where there is no visible bar line, use
1324 This will insert an invisible bar line and allow line breaks at this
1327 In scores with many staves, a @code{\bar} command in one staff is
1328 automatically applied to all staves. The resulting bar lines are
1329 connected between different staves of a StaffGroup
1331 @lilypond[quote,ragged-right,fragment,verbatim]
1339 \new Staff { \clef bass c4 g e g }
1341 \new Staff { \clef bass c2 c2 }
1349 @funindex repeatCommands
1350 @funindex defaultBarType
1352 The command @code{\bar }@var{bartype} is a short cut for doing
1353 @code{\set Timing.whichBar = }@var{bartype}. Whenever @code{whichBar}
1354 is set to a string, a bar line of that type is created.
1356 A bar line is created whenever the @code{whichBar} property is set.
1357 At the start of a measure it is set to the contents of
1358 @code{Timing.defaultBarType}. The contents of @code{repeatCommands} are
1360 to override default measure bars.
1362 You are encouraged to use @code{\repeat} for repetitions. See
1368 In this manual: @ref{Repeats}, @ref{System start delimiters}.
1370 Program reference: @internalsref{BarLine} (created at
1371 @internalsref{Staff} level), @internalsref{SpanBar} (across staves).
1373 Examples: @inputfileref{input/@/test,bar@/-lines@/.ly},
1376 @node Unmetered music
1377 @subsection Unmetered music
1380 @funindex \cadenzaOn
1381 @funindex \cadenzaOff
1383 Bar lines and bar numbers are calculated automatically. For unmetered
1384 music (cadenzas, for example), this is not desirable. To turn off
1385 automatic bar lines and bar numbers, use the commands @code{\cadenzaOn}
1386 and @code{\cadenzaOff}.
1388 @lilypond[verbatim,quote,ragged-right,relative=2,fragment]
1400 LilyPond will only insert page breaks at a barline. Unless the unmetered
1401 music ends before the end of the staff line, you will need to insert
1409 to indicate where line breaks can occur.
1412 @node System start delimiters
1413 @subsection System start delimiters
1415 @cindex start of system
1416 @cindex Staff, multiple
1417 @cindex bracket, vertical
1418 @cindex brace, vertical
1421 @cindex staff, choir
1423 Many scores consist of more than one staff. These staves can be
1424 joined in four different ways
1427 @item The group is started with a brace at the left, and bar lines are
1428 connected. This is done with the @internalsref{GrandStaff} context.
1430 @lilypond[verbatim,ragged-right,quote]
1438 @item The group is started with a bracket, and bar lines are connected.
1439 This is done with the
1440 @internalsref{StaffGroup} context
1442 @lilypond[verbatim,ragged-right,quote]
1450 @item The group is started with a bracket, but bar lines are not
1451 connected. This is done with the @internalsref{ChoirStaff} context.
1453 @lilypond[verbatim,ragged-right,quote]
1461 @item The group is started with a vertical line. Bar lines are not
1462 connected. This is the default for the score.
1464 @lilypond[verbatim,ragged-right,quote]
1475 The bar lines at the start of each system are
1476 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1477 @internalsref{SystemStartBracket}. Only one of these types is created
1478 in every context, and that type is determined by the property
1479 @code{systemStartDelimiter}.
1483 @subsection Staff symbol
1485 @cindex adjusting staff symbol
1487 Notes, dynamic signs, etc., are grouped
1488 with a set of horizontal lines, called a staff (plural `staves'). In
1489 LilyPond, these lines are drawn using a separate layout object called
1492 The staff symbol may be tuned in the number, thickness and distance
1493 of lines, using properties. This is demonstrated in the example files
1494 @inputfileref{input/@/test,staff@/-lines@/.ly},
1495 @inputfileref{input/@/test,staff@/-size@/.ly}.
1497 In addition, staves may be started and stopped at will. This is done
1498 with @code{\startStaff} and @code{\stopStaff}.
1500 @lilypond[verbatim,relative=2,fragment]
1502 \override Staff.StaffSymbol #'line-count = 2
1503 \stopStaff \startStaff
1505 \revert Staff.StaffSymbol #'line-count
1506 \stopStaff \startStaff
1510 In combination with Frenched staves, this may be used to typeset ossia
1511 sections. An example is in @inputfileref{input/@/test@/,ossia.ly},
1516 @lilypondfile{ossia.ly}
1518 @cindex staff lines, setting number of
1519 @cindex staff lines, setting thickness of
1520 @cindex thickness of staff lines, setting
1521 @cindex number of staff lines, setting
1525 Program reference: @internalsref{StaffSymbol}.
1527 Examples: @inputfileref{input/@/test,staff@/-lines@/.ly},
1528 @inputfileref{input/@/test@/,ossia.ly},
1529 @inputfileref{input/@/test,staff@/-size@/.ly},
1530 @inputfileref{input/@/regression,staff@/-line@/-positions@/.ly}.
1534 @node Connecting notes
1535 @section Connecting notes
1537 This section deals with notation that affects groups of notes.
1543 * Laissez vibrer ties::
1556 A tie connects two adjacent note heads of the same pitch. The tie in
1557 effect extends the length of a note. Ties should not be confused with
1558 slurs, which indicate articulation, or phrasing slurs, which indicate
1559 musical phrasing. A tie is entered using the tilde symbol `@code{~}'
1561 @lilypond[quote,ragged-right,fragment,verbatim]
1562 e' ~ e' <c' e' g'> ~ <c' e' g'>
1565 When a tie is applied to a chord, all note heads whose pitches match
1566 are connected. When no note heads match, no ties will be created.
1568 A tie is just a way of extending a note duration, similar to the
1569 augmentation dot. The following example shows two ways of notating
1570 exactly the same concept
1572 @lilypond[quote,fragment,ragged-right]
1573 \time 3/4 c'2. c'2 ~ c'4
1577 Ties are used either when the note crosses a bar line, or when dots
1578 cannot be used to denote the rhythm. When using ties, larger note
1579 values should be aligned to subdivisions of the measure, such as
1581 @lilypond[fragment,quote,ragged-right]
1583 r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
1587 If you need to tie a lot of notes over bars, it may be easier to use
1588 automatic note splitting (see @ref{Automatic note splitting}). This
1589 mechanism automatically splits long notes, and ties them across bar
1592 When a second alternative of a repeat starts with a tied note, you
1593 have to repeat the tie. This can be achieved with @code{\repeatTie},
1595 @lilypond[fragment,quote,ragged-right,relative=2]
1599 @cindex repeating ties
1600 @cindex volta brackets and ties
1604 Ties are sometimes used to write out arpeggios. In this case, two tied
1605 notes need not be consecutive. This can be achieved by setting the
1606 @code{tieWaitForNote} property to true. The same feature is also useful,
1607 for example, to tie a tremolo to a chord. For example,
1609 @lilypond[fragment,verbatim,relative=1,ragged-right]
1610 \set tieWaitForNote = ##t
1611 \grace { c16[~ e~ g]~ } <c, e g>2
1612 \repeat "tremolo" 8 { c32~ c'~ } <c c,>1
1623 @funindex \tieNeutral
1625 @funindex \tieDotted
1627 @funindex \tieDashed
1635 In this manual: @ref{Automatic note splitting}.
1637 Program reference: @internalsref{Tie}.
1640 @inputfileref{input/@/regression,tie-arpeggio.ly}
1641 @inputfileref{input/@/regression,tie-manual.ly}
1648 Switching staves when a tie is active will not produce a slanted tie.
1656 A slur indicates that notes are to be played bound or
1657 @emph{legato}. They are entered using parentheses
1659 @lilypond[quote,ragged-right,relative=2,fragment,verbatim]
1660 f( g a) a8 b( a4 g2 f4)
1664 The direction of a slur can be specified with
1665 @code{\slur@emph{DIR}}, where @code{@emph{DIR}} is
1666 either @code{Up}, @code{Down}, or @code{Neutral} (automatically
1669 However, there is a convenient shorthand for forcing slur
1670 directions. By adding @code{_} or @code{^} before the opening
1671 parentheses, the direction is also set. For example,
1673 @lilypond[relative=2,ragged-right,quote,verbatim,fragment]
1677 Only one slur can be printed at once. If you need to print a long
1678 slur over a few small slurs, please see @ref{Phrasing slurs}.
1683 Some composers write two slurs when they want legato chords. This can
1684 be achieved in LilyPond by setting @code{doubleSlurs},
1686 @lilypond[verbatim,ragged-right,relative,fragment,quote]
1687 \set doubleSlurs = ##t
1688 <c e>4 ( <d f> <c e> <d f> )
1698 @funindex \slurNeutral
1699 @code{\slurNeutral},
1700 @funindex \slurDashed
1702 @funindex \slurDotted
1704 @funindex \slurSolid
1709 Program reference: @seeinternals{Slur}.
1712 @node Phrasing slurs
1713 @subsection Phrasing slurs
1715 @cindex phrasing slurs
1716 @cindex phrasing marks
1718 A phrasing slur (or phrasing mark) connects notes and is used to
1719 indicate a musical sentence. It is written using @code{\(} and @code{\)}
1722 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
1723 \time 6/4 c'\( d( e) f( e) d\)
1726 Typographically, the phrasing slur behaves almost exactly like a
1727 normal slur. However, they are treated as different objects. A
1728 @code{\slurUp} will have no effect on a phrasing slur; instead, use
1729 @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1730 @code{\phrasingSlurNeutral}.
1732 You cannot have simultaneous phrasing slurs.
1737 @funindex \phrasingSlurUp
1738 @code{\phrasingSlurUp},
1739 @funindex \phrasingSlurDown
1740 @code{\phrasingSlurDown},
1741 @funindex \phrasingSlurNeutral
1742 @code{\phrasingSlurNeutral}.
1747 Program reference: @internalsref{PhrasingSlur}.
1750 @node Laissez vibrer ties
1751 @subsection Laissez vibrer ties
1752 @cindex Laissez vibrer
1753 @cindex Ties, laissez vibrer
1755 L.v. ties (laissez vibrer) indicate that notes must not be damped at the
1756 end. It is used in notation for piano, harp and other string and
1757 percussion instruments. They can be entered using @code{\laissezVibrer},
1759 @lilypond[fragment,ragged-right,verbatim,relative=1]
1760 <c f g>\laissezVibrer
1766 @internalsref{LaissezVibrerTie}
1767 @internalsref{LaissezVibrerTieColumn}
1770 @inputfileref{input/regression,laissez-vibrer-tie.ly}
1773 @node Automatic beams
1774 @subsection Automatic beams
1776 LilyPond inserts beams automatically
1778 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1779 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1782 When these automatic decisions are not good enough, beaming can be
1783 entered explicitly. It is also possible to define beaming patterns
1784 that differ from the defaults. See @ref{Setting automatic beam behavior}
1787 Individual notes may be marked with @code{\noBeam} to prevent them
1790 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1791 \time 2/4 c8 c\noBeam c c
1797 Program reference: @internalsref{Beam}.
1801 @subsection Manual beams
1803 @cindex beams, manual
1807 In some cases it may be necessary to override the automatic beaming
1808 algorithm. For example, the autobeamer will not put beams over rests
1809 or bar lines. Such beams are specified manually by marking the begin
1810 and end point with @code{[} and @code{]}
1812 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
1814 r4 r8[ g' a r8] r8 g[ | a] r8
1821 @funindex stemLeftBeamCount
1822 @funindex stemRightBeamCount
1824 Normally, beaming patterns within a beam are determined automatically.
1825 If necessary, the properties @code{stemLeftBeamCount} and
1826 @code{stemRightBeamCount} can be used to override the defaults. If
1827 either property is set, its value will be used only once, and then it
1830 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
1835 \set stemLeftBeamCount = #1
1840 The property @code{subdivideBeams} can be set in order to subdivide
1841 all 16th or shorter beams at beat positions, as defined by the
1842 @code{beatLength} property.
1844 @lilypond[fragment,quote,relative=2,verbatim]
1846 \set subdivideBeams = ##t
1848 \set Score.beatLength = #(ly:make-moment 1 8)
1851 @funindex subdivideBeams
1854 For more information about @code{make-moment}, see
1855 @ref{Time administration}.
1857 Line breaks are normally forbidden when beams cross bar lines. This
1858 behavior can be changed by setting @code{allowBeamBreak}.
1860 @funindex allowBeamBreak
1861 @cindex beams and line breaks
1862 @cindex beams, kneed
1864 @cindex auto-knee-gap
1869 Kneed beams are inserted automatically when a large gap is detected
1870 between the note heads. This behavior can be tuned through the object.
1872 Automatically kneed cross-staff beams cannot be used together with
1873 hidden staves. See @ref{Hiding staves}.
1875 Beams do not avoid collisions with symbols around the notes, such as
1876 texts and accidentals.
1880 @subsection Grace notes
1885 @cindex appoggiatura
1886 @cindex acciaccatura
1888 Grace notes are ornaments that are written out. The most common ones
1889 are acciaccatura, which should be played as very short. It is denoted
1890 by a slurred small note with a slashed stem. The appoggiatura is a
1891 grace note that takes a fixed fraction of the main note, and is
1892 denoted as a slurred note in small print without a slash. They
1893 are entered with the commands @code{\acciaccatura} and
1894 @code{\appoggiatura}, as demonstrated in the following example
1896 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
1897 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
1898 \acciaccatura { g16[ f] } e4
1901 Both are special forms of the @code{\grace} command. By prefixing this
1902 keyword to a music expression, a new one is formed, which will be
1903 printed in a smaller font and takes up no logical time in a measure.
1905 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
1907 \grace { c16[ d16] } c2 c4
1911 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
1912 @code{\grace} command does not start a slur.
1914 Internally, timing for grace notes is done using a second, `grace'
1915 timing. Every point in time consists of two rational numbers: one
1916 denotes the logical time, one denotes the grace timing. The above
1917 example is shown here with timing tuples
1919 @lilypond[quote,ragged-right]
1922 c4 \grace c16 c4 \grace {
1925 \new Lyrics \lyricmode {
1926 \override LyricText #'font-family = #'typewriter
1930 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
1931 \markup { (\fraction 1 4 , 0 ) } 4
1933 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
1934 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
1936 \markup { ( \fraction 2 4 , 0 ) }
1941 The placement of grace notes is synchronized between different staves.
1942 In the following example, there are two sixteenth grace notes for
1943 every eighth grace note
1945 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
1946 << \new Staff { e4 \grace { c16[ d e f] } e4 }
1947 \new Staff { c4 \grace { g8[ b] } c4 } >>
1950 @funindex \afterGrace
1952 If you want to end a note with a grace, use the @code{\afterGrace}
1953 command. It takes two arguments: the main note, and the grace notes
1954 following the main note.
1956 @lilypond[ragged-right, verbatim,relative=2,fragment]
1957 c1 \afterGrace d1 { c16[ d] } c4
1960 This will put the grace notes after a ``space'' lasting 3/4 of the
1961 length of the main note. The fraction 3/4 can be changed by setting
1962 @code{afterGraceFraction}, ie.
1965 afterGraceFraction = #(cons 7 8)
1969 will put the grace note at 7/8 of the main note.
1971 The same effect can be achieved manually by doing
1973 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
1976 { s2 \grace { c16[ d] } } >>
1982 By adjusting the duration of the skip note (here it is a half-note),
1983 the space between the main-note and the grace is adjusted.
1985 A @code{\grace} section will introduce special typesetting settings,
1986 for example, to produce smaller type, and set directions. Hence, when
1987 introducing layout tweaks, they should be inside the grace section,
1989 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2001 The overrides should also be reverted inside the grace section.
2003 The layout of grace sections can be changed throughout the music using
2004 the function @code{add-grace-property}. The following example
2005 undefines the Stem direction for this grace, so stems do not always
2010 #(add-grace-property 'Voice 'Stem 'direction '())
2016 Another option is to change the variables @code{startGraceMusic},
2017 @code{stopGraceMusic}, @code{startAcciaccaturaMusic},
2018 @code{stopAcciaccaturaMusic}, @code{startAppoggiaturaMusic},
2019 @code{stopAppoggiaturaMusic}. More information is in the file
2020 @file{ly/@/grace@/-init@/.ly}.
2023 The slash through the stem in acciaccaturas can be obtained
2024 in other situations by @code{\override Stem #'stroke-style = #"grace"}.
2028 Program reference: @internalsref{GraceMusic}.
2033 A score that starts with a @code{\grace} section needs an explicit
2034 @code{\new Voice} declaration, otherwise the main note and the grace
2035 note end up on different staves.
2037 Grace note synchronization can also lead to surprises. Staff notation,
2038 such as key signatures, bar lines, etc., are also synchronized. Take
2039 care when you mix staves with grace notes and staves without, for example,
2041 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
2042 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2043 \new Staff { c4 \bar "|:" d4 } >>
2047 This can be remedied by inserting grace skips of the corresponding
2048 durations in the other staves. For the above example
2051 \new Staff @{ c4 \bar "|:" \grace s16 d4 @}
2054 Grace sections should only be used within sequential music
2055 expressions. Nesting or juxtaposing grace sections is not supported,
2056 and might produce crashes or other errors.
2060 @node Expressive marks
2061 @section Expressive marks
2063 Expressive marks help musicians to bring more to the music than simple
2068 * Fingering instructions::
2078 @subsection Articulations
2080 @cindex Articulations
2084 A variety of symbols can appear above and below notes to indicate
2085 different characteristics of the performance. They are added to a note
2086 by adding a dash and the character signifying the
2087 articulation. They are demonstrated here
2089 @lilypondfile[quote,ragged-right]{script-abbreviations.ly}
2091 The meanings of these shorthands can be changed. See
2092 @file{ly/@/script@/-init@/.ly} for examples.
2094 The script is automatically placed, but the direction can be forced as
2095 well. Like other pieces of LilyPond code, @code{_} will place them
2096 below the staff, and @code{^} will place them above.
2098 @lilypond[quote,ragged-right,fragment,verbatim]
2102 Other symbols can be added using the syntax
2103 @var{note}@code{\}@var{name}. Again, they
2104 can be forced up or down using @code{^} and @code{_},
2107 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
2108 c\fermata c^\fermata c_\fermata
2113 @cindex staccatissimo
2123 @cindex organ pedal marks
2132 @cindex prallmordent
2136 @cindex thumb marking
2141 Here is a chart showing all scripts available,
2143 @lilypondfile[ragged-right,quote]{script-chart.ly}
2148 The vertical ordering of scripts is controlled with the
2149 @code{script-priority} property. The lower this number, the closer it
2150 will be put to the note. In this example, the
2151 @internalsref{TextScript} (the sharp symbol) first has the lowest
2152 priority, so it is put lowest in the first example. In the second, the
2153 prall trill (the @internalsref{Script}) has the lowest, so it is on the
2154 inside. When two objects have the same priority, the order in which
2155 they are entered decides which one comes first.
2157 @lilypond[verbatim,relative=3,ragged-right,fragment,quote]
2158 \once \override TextScript #'script-priority = #-100
2159 a4^\prall^\markup { \sharp }
2161 \once \override Script #'script-priority = #-100
2162 a4^\prall^\markup { \sharp }
2168 Program reference: @internalsref{Script}.
2173 These signs appear in the printed output but have no effect on the
2174 MIDI rendering of the music.
2177 @node Fingering instructions
2178 @subsection Fingering instructions
2181 @cindex finger change
2183 Fingering instructions can be entered using
2185 @var{note}-@var{digit}
2187 For finger changes, use markup texts
2189 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
2191 c^\markup { \finger "2 - 3" }
2194 You can use the thumb-script to indicate that a note should be
2195 played with the thumb (e.g., in cello music)
2196 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2197 <a_\thumb a'-3>8 <b_\thumb b'-3>
2200 Fingerings for chords can also be added to individual notes
2201 of the chord by adding them after the pitches
2202 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2203 < c-1 e-2 g-3 b-5 >4
2209 You may exercise greater control over fingering chords by
2210 setting @code{fingeringOrientations}
2212 @lilypond[quote,verbatim,ragged-right,fragment,relative=1]
2213 \set fingeringOrientations = #'(left down)
2214 <c-1 es-2 g-4 bes-5 > 4
2215 \set fingeringOrientations = #'(up right down)
2216 <c-1 es-2 g-4 bes-5 > 4
2219 Using this feature, it is also possible to put fingering instructions
2220 very close to note heads in monophonic music,
2222 @lilypond[verbatim,ragged-right,quote,fragment]
2223 \set fingeringOrientations = #'(right)
2230 Program reference: @internalsref{Fingering}.
2232 Examples: @inputfileref{input/@/regression,finger@/-chords@/.ly}.
2236 @subsection Dynamics
2257 Absolute dynamic marks are specified using a command after a note
2258 @code{c4\ff}. The available dynamic marks are @code{\ppppp},
2259 @code{\pppp}, @code{\ppp},
2260 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2261 @code{\fff}, @code{\ffff}, @code{\fp}, @code{\sf}, @code{\sff},
2262 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}.
2264 @lilypond[quote,verbatim,ragged-right,fragment,relative=2]
2265 c\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2266 c2\fp c\sf c\sff c\sp c\spp c\sfz c\rfz
2273 A crescendo mark is started with @code{\<} and terminated with
2274 @code{\!} or an absolute dynamic. A decrescendo is started with
2275 @code{\>} and is also terminated with @code{\!} or an absolute
2276 dynamic. @code{\cr} and @code{\decr} may be used instead of
2277 @code{\<} and @code{\>}. Because these marks are bound to notes, you must
2278 use spacer notes if multiple marks are needed during one note
2280 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2282 << f1 { s4 s4\< s4\! \> s4\! } >>
2286 A hairpin starts at the left edge of the beginning note and ends on the
2287 right edge of the ending note.
2289 In some situations the @code{\espressivo} articulation mark may
2290 be suitable to indicate a crescendo and decrescendo on the one note,
2292 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2293 c2 b4 a g1\espressivo
2296 This may give rise to very short hairpins. Use @code{minimum-length}
2297 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2301 \override Staff.Hairpin #'minimum-length = #5
2308 You can also use a text saying @emph{cresc.} instead of hairpins
2310 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2321 You can also supply your own texts
2322 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2323 \set crescendoText = \markup { \italic "cresc. poco" }
2324 \set crescendoSpanner = #'dashed-line
2328 To create new dynamic marks or text that should be aligned
2329 with dynamics, see @ref{New dynamic marks}.
2334 Dynamics that occur at, begin on, or end on, the same note
2335 will be vertically aligned. If you want to ensure that dynamics
2336 are aligned when they do not occur on the same note, you can
2337 increase the @code{staff-padding} property.
2340 \override DynamicLineSpanner #'staff-padding = #4
2343 You may also use this property if the dynamics are colliding
2344 with other notation.
2346 Crescendi and decrescendi that end on the first note of a
2347 new line are not printed. To change this behavior, use
2350 \override Score.Hairpin #'after-line-breaking = ##t
2353 Text style dynamic changes (such as cresc. and dim.) are printed with a
2354 dashed line showing their extent. To surpress printing this line, use
2357 \override DynamicTextSpanner #'dash-period = #-1.0
2363 @funindex \dynamicUp
2365 @funindex \dynamicDown
2366 @code{\dynamicDown},
2367 @funindex \dynamicNeutral
2368 @code{\dynamicNeutral}.
2373 Program reference: @internalsref{DynamicText}, @internalsref{Hairpin}.
2374 Vertical positioning of these symbols is handled by
2375 @internalsref{DynamicLineSpanner}.
2379 @subsection Breath marks
2381 Breath marks are entered using @code{\breathe}
2383 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2390 The glyph of the breath mark can be tuned by overriding the
2391 @code{text} property of the @code{BreathingSign} layout object with
2392 any markup text. For example,
2393 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
2395 \override BreathingSign #'text
2396 = #(make-musicglyph-markup "scripts.rvarcomma")
2403 Program reference: @internalsref{BreathingSign}.
2405 Examples: @inputfileref{input/@/regression,breathing@/-sign@/.ly}.
2411 Short trills are printed like normal articulation; see @ref{Articulations}.
2413 Long running trills are made with @code{\startTrillSpan} and
2414 @code{\stopTrillSpan},
2416 @lilypond[verbatim,ragged-right,relative=2,quote,fragment]
2418 << { c1 \startTrillSpan }
2419 { s2. \grace { d16[\stopTrillSpan e] } } >>
2423 @cindex Pitched trills
2425 Trills that should be executed on an explicitly specified pitch can be
2426 typeset with the command @code{pitchedTrill},
2428 @lilypond[ragged-right,verbatim,fragment,relative=1]
2429 \pitchedTrill c4\startTrillSpan fis
2433 The first argument is the main note. The pitch of the second
2434 is printed as a stemless note head in parentheses.
2439 @code{\startTrillSpan},
2440 @funindex \startTrillSpan
2441 @code{\stopTrillSpan}.
2442 @funindex \stopTrillSpan
2447 Program reference: @internalsref{TrillSpanner}.
2451 @subsection Glissando
2454 @funindex \glissando
2456 A glissando is a smooth change in pitch. It is denoted by a line or a
2457 wavy line between two notes. It is requested by attaching
2458 @code{\glissando} to a note
2460 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2462 \override Glissando #'style = #'zigzag
2469 Program reference: @internalsref{Glissando}.
2471 Example files: @file{input/@/regression/@/glissando@/.ly}.
2476 Printing text over the line (such as @emph{gliss.}) is not supported.
2480 @subsection Arpeggio
2483 @cindex broken chord
2486 You can specify an arpeggio sign (also known as broken chord) on a
2487 chord by attaching an @code{\arpeggio} to a chord
2489 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2493 A square bracket on the left indicates that the player should not
2494 arpeggiate the chord
2496 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2501 The direction of the arpeggio is sometimes denoted by adding an
2502 arrowhead to the wiggly line
2504 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2516 When an arpeggio crosses staves, you may attach an arpeggio to the chords
2517 in both staves and set
2518 @internalsref{PianoStaff}.@code{connectArpeggios}
2520 @lilypond[quote,ragged-right,fragment,relative=1,verbatim]
2522 \set PianoStaff.connectArpeggios = ##t
2523 \new Staff { <c' e g c>\arpeggio }
2524 \new Staff { \clef bass <c,, e g>\arpeggio }
2532 @funindex \arpeggioUp
2534 @funindex \arpeggioDown
2535 @code{\arpeggioDown},
2536 @funindex \arpeggioNeutral
2537 @code{\arpeggioNeutral},
2538 @funindex \arpeggioBracket
2539 @code{\arpeggioBracket}.
2544 Notation manual: @ref{Ties}, for writing out arpeggios.
2546 Program reference: @internalsref{Arpeggio}.
2551 It is not possible to mix connected arpeggios and unconnected
2552 arpeggios in one @internalsref{PianoStaff} at the same point in time.
2559 Polyphony in music refers to having more than one voice occurring in
2560 a piece of music. Polyphony in LilyPond refers to having more than
2561 one voice on the same staff.
2565 * Explicitly instantiating voices::
2566 * Collision Resolution::
2570 @node Basic polyphony
2571 @subsection Basic polyphony
2575 The easiest way to enter fragments with more than one voice on a staff
2576 is to enter each voice as a sequence (with @code{@{...@}}), and combine
2577 them simultaneously, separating the voices with @code{\\}
2581 @lilypond[quote,verbatim,fragment]
2582 \new Staff \relative c' {
2585 { g4 f e | d2 e2 } \\
2586 { r8 e4 d c8 ~ | c b16 a b8 g ~ g2 } \\
2592 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
2593 voices are sometimes called ``layers'' in other notation packages}
2595 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
2596 each of these contexts, vertical direction of slurs, stems, etc., is set
2599 These voices are all separate from the voice that contains the notes just
2600 outside the @code{<< \\ >>} construct. This should be noted when making
2601 changes at the voice level. This also means that slurs and ties cannot go
2602 into or out of a @code{<< \\ >>} construct. Conversely, parallel voices
2603 from separate @code{<< \\ >>} constructs on the same staff are the the
2604 same voice. Here is the same example, with different noteheads for each
2605 voice. Note that the change to the note-head style in the main voice does
2607 the inside of the @code{<< \\ >>} constructs. Also, the change to the
2609 voice in the first @code{<< \\ >>} construct is effective in the second
2610 @code{<< \\ >>}, and the voice is tied across the two constructs.
2612 @lilypond[quote,verbatim,fragment]
2613 \new Staff \relative c' {
2614 \override NoteHead #'style = #'cross
2618 { \override NoteHead #'style = #'triangle
2623 { c8 b16 a b8 g ~ g2 } \\
2624 { \override NoteHead #'style = #'slash s4 b4 c2 }
2629 Polyphony does not change the relationship of notes within a
2630 @code{\relative @{ @}} block. Each note is calculated relative
2631 to the note immediately preceding it.
2634 \relative @{ noteA << noteB \\ noteC >> noteD @}
2637 @code{noteC} is relative to @code{noteB}, not @code{noteA};
2638 @code{noteD} is relative to @code{noteC}, not @code{noteB} or
2641 @node Explicitly instantiating voices
2642 @subsection Explicitly instantiating voices
2644 @internalsref{Voice} contexts can also be instantiated manually
2645 inside a @code{<< >>} block to create polyphonic music, using
2646 @code{\voiceOne}, up to @code{\voiceFour} to assign stem directions
2647 and a horizontal shift for each part.
2651 << \upper \\ \lower >>
2659 \new Voice = "1" @{ \voiceOne \upper @}
2660 \new Voice = "2" @{ \voiceTwo \lower @}
2664 The @code{\voiceXXX} commands set the direction of stems, slurs, ties,
2665 articulations, text annotations, augmentation dots of dotted
2666 notes, and fingerings. @code{\voiceOne} and @code{\voiceThree} make
2667 these objects point upwards, while @code{\voiceTwo} and @code{\voiceFour}
2668 make them point downwards.
2669 The command @code{\oneVoice} will revert back to the normal setting.
2671 An expression that appears directly inside a @code{<< >>} belongs to
2672 the main voice. This is useful when extra voices appear while the main
2673 voice is playing. Here is a more correct rendition of the example from
2674 the previous section. The crossed noteheads demonstrate that the main
2675 melody is now in a single voice context.
2677 @lilypond[quote,ragged-right,verbatim]
2678 \new Staff \relative c' {
2679 \override NoteHead #'style = #'cross
2684 \new Voice="1" { \voiceTwo
2685 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
2688 \new Voice { \voiceThree
2697 The correct definition of the voices allows the melody to be slurred.
2698 @lilypond[quote,ragged-right,verbatim]
2699 \new Staff \relative c' {
2704 \context Voice="1" { \voiceTwo
2705 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2
2708 \new Voice { \voiceThree
2717 Avoiding the @code{\\} separator also allows nesting polyphony
2718 constructs, which in some case might be a more natural way to typeset
2721 @lilypond[quote,ragged-right,verbatim]
2722 \new Staff \relative c' {
2727 \context Voice="1" { \voiceTwo
2730 {c8 b16 a b8 g ~ g2}
2731 \new Voice { \voiceThree
2744 @node Collision Resolution
2745 @subsection Collision Resolution
2747 Normally, note heads with a different number of dots are not merged, but
2748 when the object property @code{merge-differently-dotted} is set in
2749 the @internalsref{NoteCollision} object, they are merged
2750 @lilypond[quote,verbatim,fragment,ragged-right,relative=2]
2753 \override Staff.NoteCollision
2754 #'merge-differently-dotted = ##t
2756 } \\ { g8.[ f16] g8.[ f16] } >>
2759 Similarly, you can merge half note heads with eighth notes, by setting
2760 @code{merge-differently-headed}
2761 @lilypond[quote,ragged-right,fragment,relative=2,verbatim]
2764 \override Staff.NoteCollision
2765 #'merge-differently-headed = ##t
2766 c8 c4. } \\ { c2 c2 } >>
2769 LilyPond also vertically shifts rests that are opposite of a stem,
2772 @lilypond[quote,ragged-right,fragment,verbatim]
2773 \new Voice << c''4 \\ r4 >>
2785 @funindex \voiceThree
2787 @funindex \voiceFour
2794 @funindex \shiftOnnn
2797 @code{\shiftOff}: these commands specify in what chords of the current
2798 voice should be shifted. The outer voices (normally: voice one and
2799 two) have @code{\shiftOff}, while the inner voices (three and four)
2800 have @code{\shiftOn}. @code{\shiftOnn} and @code{\shiftOnnn} define
2801 further shift levels.
2803 When LilyPond cannot cope, the @code{force-hshift}
2804 property of the @internalsref{NoteColumn} object and pitched rests can
2805 be used to override typesetting decisions.
2807 @lilypond[quote,verbatim,ragged-right]
2814 \once \override NoteColumn #'force-hshift = #1.7
2822 Program reference: the objects responsible for resolving collisions are
2823 @internalsref{NoteCollision} and @internalsref{RestCollision}.
2826 @inputfileref{input/@/regression,collision@/-dots@/.ly},
2827 @inputfileref{input/@/regression,collision@/-head-chords@/.ly},
2828 @inputfileref{input/@/regression,collision@/-heads@/.ly},
2829 @inputfileref{input/@/regression,collision@/-mesh@/.ly}, and
2830 @inputfileref{input/@/regression,collisions@/.ly}.
2835 When using @code{merge-differently-headed} with an upstem eighth or a
2836 shorter note, and a downstem half note, the eighth note gets the wrong
2839 There is no support for clusters where the same note occurs with
2840 different accidentals in the same chord. In this case, it is
2841 recommended to use enharmonic transcription, or to use special cluster
2842 notation (see @ref{Clusters}).
2849 Repetition is a central concept in music, and multiple notations exist
2855 * Repeats and MIDI::
2856 * Manual repeat commands::
2858 * Tremolo subdivisions::
2864 @subsection Repeat types
2869 The following types of repetition are supported
2873 Repeated music is fully written (played) out. This is useful when
2874 entering repetitious music. This is the only kind of repeat that
2875 is included in MIDI output.
2878 Repeats are not written out, but alternative endings (volte) are
2879 printed, left to right with brackets. This is the standard notation
2880 for repeats with alternatives. These are not played in MIDI output by
2885 Alternative endings are written stacked. This has limited use but may be
2886 used to typeset two lines of lyrics in songs with repeats, see
2887 @inputfileref{input,star-spangled-banner@/.ly}.
2891 Make tremolo beams. These are not played in MIDI output by default.
2894 Make beat or measure repeats. These look like percent signs. These
2895 are not played in MIDI output by default. Percent repeats must be
2896 declared within a Voice context.
2902 @subsection Repeat syntax
2904 LilyPond has one syntactic construct for specifying different types of
2905 repeats. The syntax is
2908 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2911 If you have alternative endings, you may add
2912 @funindex \alternative
2923 where each @var{alternative} is a music expression. If you do not
2924 give enough alternatives for all of the repeats, the first alternative
2925 is assumed to be played more than once.
2927 Standard repeats are used like this
2928 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2930 \repeat volta 2 { c4 d e f }
2931 \repeat volta 2 { f e d c }
2934 With alternative endings
2935 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2937 \repeat volta 2 {c4 d e f}
2938 \alternative { {d2 d} {f f,} }
2941 In this example, the first ending is not a complete bar (it
2942 only had 3 beats). The beginning of the second ending
2943 contains the 4th beat from the first ending. This ``extra''
2944 beat in the second ending is due to the first time ending,
2945 and has nothing to do with the @code{\partial} at the
2946 beginning of the example.
2948 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
2951 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2952 \alternative { { g4 g g } { a | a a a a | b2. } }
2956 It is possible to shorten volta brackets
2957 by setting @code{voltaSpannerDuration}. In the next example, the
2958 bracket only lasts one measure, which is a duration of 3/4.
2960 @lilypond[verbatim,ragged-right,quote]
2964 \set Staff.voltaSpannerDuration = #(ly:make-moment 3 4)
2965 \repeat "volta" 5 { d d d }
2966 \alternative { { e e e f f f }
2976 Brackets for the repeat are normally only printed over the topmost
2977 staff. This can be adjusted by setting the @code{voltaOnThisStaff}
2978 property; see @inputfileref{input/@/regression,volta@/-multi@/-staff@/.ly}.
2983 @cindex repeat, ambiguous
2985 A nested repeat like
2994 is ambiguous, since it is is not clear to which @code{\repeat} the
2995 @code{\alternative} belongs. This ambiguity is resolved by always
2996 having the @code{\alternative} belong to the inner @code{\repeat}.
2997 For clarity, it is advisable to use braces in such situations.
2999 Timing information is not remembered at the start of an alternative,
3000 so after a repeat timing information must be reset by hand, for
3001 example by setting @code{Score.measurePosition} or entering
3002 @code{\partial}. Similarly, slurs or ties are also not repeated.
3005 @node Repeats and MIDI
3006 @subsection Repeats and MIDI
3008 @cindex expanding repeats
3009 @funindex \unfoldRepeats
3011 With a little bit of tweaking, all types of repeats can be present
3012 in the MIDI output. This is achieved by applying the
3013 @code{\unfoldRepeats} music function. This functions changes all
3014 repeats to unfold repeats.
3016 @lilypond[quote,verbatim,fragment,line-width=8.0\cm]
3018 \repeat tremolo 8 {c'32 e' }
3019 \repeat percent 2 { c''8 d'' }
3020 \repeat volta 2 {c'4 d' e' f'}
3029 When creating a score file using @code{\unfoldRepeats} for midi, then
3030 it is necessary to make two @code{\score} blocks. One for MIDI (with
3031 unfolded repeats) and one for notation (with volta, tremolo, and
3032 percent repeats). For example,
3040 \unfoldRepeats @var{..music..}
3046 @node Manual repeat commands
3047 @subsection Manual repeat commands
3049 @funindex repeatCommands
3051 The property @code{repeatCommands} can be used to control the layout of
3052 repeats. Its value is a Scheme list of repeat commands.
3055 @item @code{start-repeat}
3056 Print a @code{|:} bar line.
3058 @item @code{end-repeat}
3059 Print a @code{:|} bar line.
3061 @item @code{(volta @var{text})}
3062 Print a volta bracket saying @var{text}: The text can be specified as
3063 a text string or as a markup text, see @ref{Text markup}. Do not
3064 forget to change the font, as the default number font does not contain
3065 alphabetic characters;
3067 @item @code{(volta #f)}
3068 Stop a running volta bracket.
3071 @lilypond[quote,ragged-right,verbatim,fragment,relative=2]
3073 \set Score.repeatCommands = #'((volta "93") end-repeat)
3075 \set Score.repeatCommands = #'((volta #f))
3082 Program reference: @internalsref{VoltaBracket},
3083 @internalsref{RepeatedMusic},
3084 @internalsref{VoltaRepeatedMusic},
3085 @internalsref{UnfoldedRepeatedMusic}, and
3086 @internalsref{FoldedRepeatedMusic}.
3089 @node Tremolo repeats
3090 @subsection Tremolo repeats
3092 @cindex tremolo beams
3094 To place tremolo marks between notes, use @code{\repeat} with tremolo
3096 @lilypond[quote,verbatim,ragged-right]
3097 \new Voice \relative c' {
3098 \repeat "tremolo" 8 { c16 d16 }
3099 \repeat "tremolo" 4 { c16 d16 }
3100 \repeat "tremolo" 2 { c16 d16 }
3104 Tremolo marks can also be put on a single note. In this case, the
3105 note should not be surrounded by braces.
3106 @lilypond[quote,verbatim,ragged-right]
3107 \repeat "tremolo" 4 c'16
3110 Similar output is obtained using the tremolo subdivision, described in
3111 @ref{Tremolo subdivisions}.
3116 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
3118 Program reference: @internalsref{Beam}, @internalsref{StemTremolo}.
3120 Example files: @inputfileref{input/@/regression,chord@/-tremolo@/.ly},
3121 @inputfileref{input/@/regression,stem@/-tremolo@/.ly}.
3124 @node Tremolo subdivisions
3125 @subsection Tremolo subdivisions
3127 @cindex tremolo marks
3128 @funindex tremoloFlags
3130 Tremolo marks can be printed on a single note by adding
3131 `@code{:}[@var{number}]' after the note. The number indicates the
3132 duration of the subdivision, and it must be at least 8. A
3133 @var{length} value of 8 gives one line across the note stem. If the
3134 length is omitted, the last value (stored in @code{tremoloFlags}) is
3137 @lilypond[quote,ragged-right,verbatim,fragment]
3138 c'2:8 c':32 | c': c': |
3144 Tremolos entered in this way do not carry over into the MIDI output.
3149 In this manual: @ref{Tremolo repeats}.
3151 Elsewhere: @internalsref{StemTremolo}.
3154 @node Measure repeats
3155 @subsection Measure repeats
3157 @cindex percent repeats
3158 @cindex measure repeats
3160 In the @code{percent} style, a note pattern can be repeated. It is
3161 printed once, and then the pattern is replaced with a special sign.
3162 Patterns of one and two measures are replaced by percent-like signs,
3163 patterns that divide the measure length are replaced by slashes.
3164 Percent repeats must be declared within a @code{Voice} context.
3166 @lilypond[quote,verbatim,ragged-right]
3167 \new Voice \relative c' {
3168 \repeat "percent" 4 { c4 }
3169 \repeat "percent" 2 { c2 es2 f4 fis4 g4 c4 }
3173 Measure repeats of more than 2 measures get a counter, if you switch
3174 on the @code{countPercentRepeats} property,
3176 @lilypond[relative=2,fragment,quote,verbatim,ragged-right]
3178 \set countPercentRepeats = ##t
3179 \repeat "percent" 4 { c1 }
3185 Isolated percents can also be printed. This is done by putting a multi
3186 measure rest with a different print function,
3188 @lilypond[fragment,verbatim]
3189 \override MultiMeasureRest #'stencil
3190 = #ly:multi-measure-rest::percent
3199 Program reference: @internalsref{RepeatSlash},
3200 @internalsref{PercentRepeat}, @internalsref{DoublePercentRepeat},
3201 @internalsref{DoublePercentRepeatCounter},
3202 @internalsref{PercentRepeatCounter},
3203 @internalsref{PercentRepeatedMusic}, and