3 @c A menu is needed before every deeper *section nesting of @node's; run
4 @c M-x texinfo-all-menus-update
5 @c to automagically fill in these menus before saving changes
7 @c FIXME: singular vs. plural: Beams/Beam
11 @chapter Notation manual
13 This chapter describes all the different types of notation supported
14 by LilyPond. It is intended as a reference for users that are already
15 somewhat familiar with using LilyPond.
19 * Easier music entry::
33 * Contemporary notation::
39 @c FIXME: Note entry vs Music entry at top level menu is confusing.
45 The basic elements of any piece of music are the notes. This section
46 is about basic notation elements notes, rests and related constructs,
47 such as stems, tuplets and ties.
52 * Chromatic alterations::
60 * Easy Notation note heads::
68 A note is printed by specifying its pitch and then its duration:
69 @footnote{Notes constitute the most basic elements of LilyPond input,
70 but they do not form valid input on their own without a @code{\score}
71 block. However, for the sake of brevity and simplicity we will
72 generally omit @code{\score} blocks and @code{\paper} declarations in
75 @lilypond[fragment,verbatim]
84 @cindex Note specification
86 @cindex entering notes
88 The most common syntax for pitch entry is used in @code{\chords} and
89 @code{\notes} mode. In Note and Chord mode, pitches may be designated
90 by names. The notes are specified by the letters @code{a} through
91 @code{g}, while the octave is formed with notes ranging from @code{c}
92 to @code{b}. The pitch @code{c} is an octave below middle C and the
93 letters span the octave above that C:
95 @lilypond[fragment,verbatim]
97 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
100 @cindex note names, Dutch
102 A sharp is formed by adding @code{-is} to the end of a pitch name and
103 a flat is formed by adding @code{-es}. Double sharps and double flats
104 are obtained by adding @code{-isis} or @code{-eses}. These
105 names are the Dutch note names. In Dutch, @code{aes} is contracted to
106 @code{as}, but both forms are accepted. Similarly, both
107 @code{es} and @code{ees} are accepted.
109 Half-flats and half-sharps are formed by adding @code{-eh} and
110 @code{-ih}; the following is a series of Cs with increasing pitches:
112 @cindex quarter tones
113 @cindex semi-flats, semi-sharps
115 @lilypond[verbatim,relative 2]
127 There are predefined sets of note names for various other languages.
128 To use them, include the language specific init file. For
129 example: @code{\include "english.ly"}. The available language files
130 and the note names they define are:
135 Note Names sharp flat
136 nederlands.ly c d e f g a bes b -is -es
137 english.ly c d e f g a bf b -s/-sharp -f/-flat
139 deutsch.ly c d e f g a b h -is -es
140 norsk.ly c d e f g a b h -iss/-is -ess/-es
141 svenska.ly c d e f g a b h -iss -ess
142 italiano.ly do re mi fa sol la sib si -d -b
143 catalan.ly do re mi fa sol la sib si -d/-s -b
144 espanol.ly do re mi fa sol la sib si -s -b
153 The optional octave specification takes the form of a series of
154 single quote (`@code{'}') characters or a series of comma
155 (`@code{,}') characters. Each @code{'} raises the pitch by one
156 octave; each @code{,} lowers the pitch by an octave:
158 @lilypond[fragment,verbatim,center]
159 c' c'' es' g' as' gisis' ais'
165 Notes can be hidden and unhidden with the following commands:
167 @cindex @code{\hideNotes}
169 @cindex @code{\unHideNotes}
179 @internalsref{NoteEvent}, and @internalsref{NoteHead}.
181 @node Chromatic alterations
182 @subsection Chromatic alterations
184 Normally accidentals are printed automatically, but you may also
185 print them manually. A reminder accidental
186 @cindex reminder accidental
188 can be forced by adding an exclamation mark @code{!}
189 after the pitch. A cautionary accidental
190 @cindex cautionary accidental
191 @cindex parenthesized accidental
192 (an accidental within parentheses) can be obtained by adding the
193 question mark `@code{?}' after the pitch:
195 @lilypond[fragment,verbatim]
196 cis' cis' cis'! cis'?
200 The automatic production of accidentals can be tuned in many
201 ways. For more information, refer to @ref{Accidentals}.
206 A chord is formed by a enclosing a set of pitches in @code{<} and
207 @code{>}. A chord may be followed by a duration, and a set of
208 articulations, just like simple notes.
218 Rests are entered like notes, with the note name @code{r}:
220 @lilypond[singleline,verbatim]
224 Whole bar rests, centered in middle of the bar,
225 must be done with multi measure rests. They are discussed in
226 @ref{Multi measure rests}.
229 A rest's vertical position may be explicitly specified by entering a
230 note with the @code{\rest} keyword appended. This makes manual
231 formatting in polyphonic music easier. Rest collision testing will
232 leave these rests alone:
234 @lilypond[singleline,verbatim]
240 @internalsref{RestEvent}, and @internalsref{Rest}.
247 @cindex Invisible rest
250 An invisible rest (also called a `skip') can be entered like a note
251 with note name `@code{s}' or with @code{\skip @var{duration}}:
253 @lilypond[singleline,verbatim]
257 The @code{s} syntax is only available in Note mode and Chord mode. In
258 other situations, you should use the @code{\skip} command:
260 @lilypond[singleline,verbatim]
263 { \time 4/8 \skip 2 \time 4/4 }
264 \notes\relative c'' { a2 a1 }
269 The skip command is merely an empty musical placeholder. It does not
270 produce any output, not even transparent output.
274 @internalsref{SkipEvent}.
279 @subsection Durations
285 In Note, Chord, and Lyrics mode, durations are designated by numbers
286 and dots: durations are entered as their reciprocal values. For example,
287 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
288 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
289 longer than a whole you must use variables:
291 @c FIXME: what is an identifier? I do not think it's been introduced yet.
292 @c and if it has, I obviously skipped that part. - Graham
296 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
298 r1 r2 r4 r8 r16 r32 r64 r64
303 \notes \relative c'' {
305 a1 a2 a4 a8 a16 a32 a64 a64
307 r1 r2 r4 r8 r16 r32 r64 r64
312 \remove "Clef_engraver"
313 \remove "Staff_symbol_engraver"
314 \remove "Time_signature_engraver"
315 \consists "Pitch_squash_engraver"
322 If the duration is omitted then it is set to the previously entered
323 duration. The default for the first note is a quarter note. The duration
324 can be followed by dots (`@code{.}') in order to obtain dotted note
328 @lilypond[fragment,verbatim,center]
329 a' b' c''8 b' a'4 a'4. b'4.. c'8.
334 You can alter the length of duration by a fraction @var{N/M}
335 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
336 will not affect the appearance of the notes or rests produced.
337 In the following example, the first three notes take up exactly two
339 @lilypond[fragment,relative 2,verbatim]
341 a4*2/3 gis4*2/3 a4*2/3
348 Dots are normally moved up to avoid staff lines, except in polyphonic
349 situations. The following commands may be used to force a particular
352 @cindex @code{\dotsUp}
354 @cindex @code{\dotsDown}
356 @cindex @code{\dotsBoth}
361 @internalsref{Dots}, and @internalsref{DotColumn}.
365 In dense chords, dots can overlap.
370 Whenever a note is found, a @internalsref{Stem} object is created
371 automatically. For whole notes and rests, they are also created but
376 @cindex @code{\stemUp}
378 @cindex @code{\stemDown}
380 @cindex @code{\stemBoth}
391 A tie connects two adjacent note heads of the same pitch. The tie in
392 effect extends the length of a note. Ties should not be confused with
393 slurs, which indicate articulation, or phrasing slurs, which indicate
394 musical phrasing. A tie is entered using the tilde symbol `@code{~}':
396 @lilypond[fragment,verbatim,center]
397 e' ~ e' <c' e' g'> ~ <c' e' g'>
400 When a tie is applied to a chord, all note heads whose pitches match
401 are connected. When no note heads match, no ties will be created.
403 In its meaning a tie is just a way of extending a note duration, similar
404 to the augmentation dot; in the following example there are two ways of
405 notating exactly the same concept:
407 @lilypond[fragment, singleline,quote]
408 \time 3/4 c'2. c'2 ~ c'4
410 If you need to tie a lot of notes over bars, it may be easier to use automatic
411 note splitting (See @ref{Automatic note splitting}).
416 @cindex @code{\tieUp}
418 @cindex @code{\tieDown}
420 @cindex @code{\tieBoth}
422 @cindex @code{\tieDotted}
424 @cindex @code{\tieSolid}
429 @internalsref{TieEvent}, @internalsref{NewTieEvent},
430 @internalsref{Tie}, and @ref{Automatic note splitting}.
433 ties created for a chord, see @inputfileref{input/test,tie-sparse.ly}.
436 For tying only a subset of the note heads of a pair of chords, see
437 @inputfileref{input/regression,tie-chord-partial.ly}.
442 Switching staves when a tie is active will not produce a slanted tie.
444 Formatting of ties is a difficult subject. The results are often not
454 @cindex @code{\times}
456 Tuplets are made out of a music expression by multiplying all durations
459 @cindex @code{\times}
461 \times @var{fraction} @var{musicexpr}
465 The duration of @var{musicexpr} will be multiplied by the fraction.
466 The fraction's denominator will be printed over the notes, optionally
467 with a bracket. The most common tuplet is the triplet in which 3
468 notes have the length of 2, so the notes are 2/3 of their written
471 @lilypond[fragment,verbatim,center]
472 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
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, saving lots of typing. In the next
478 example, there are two triplets shown, while @code{\times} was only
481 @lilypond[fragment, relative, singleline, verbatim]
482 \property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
483 \times 2/3 { c'8 c c c c c }
486 The format of the number is determined by the property
487 @code{tupletNumberFormatFunction}. The default prints only the
488 denominator, but if it is set to the Scheme function
489 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
493 @cindex @code{tupletNumberFormatFunction}
494 @cindex tuplet formatting
499 @cindex @code{\tupletUp}
501 @cindex @code{\tupletDown}
503 @cindex @code{\tupletBoth}
508 @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
512 Nested tuplets are not formatted automatically. In this case, outer
513 tuplet brackets should be moved manually.
515 @node Easy Notation note heads
516 @subsection Easy Notation note heads
518 @cindex easy notation
521 The `easy play' note head includes a note name inside the head. It is
522 used in music aimed at beginners:
524 @lilypond[singleline,verbatim,26pt]
526 \notes { c'2 e'4 f' | g'1 }
527 \paper { \translator { \EasyNotation } }
531 The @code{EasyNotation} variable overrides a @internalsref{Score} context.
532 You probably will want to print it with magnification or a
533 large font size to make it more readable. To print with
534 magnification, you must create a DVI file (with @file{lilypond}) and
535 then enlarge it with something like @file{dvips -x 2000 file.dvi}.
536 See the @code{dvips} documentation for more details. To print with a
537 larger font, see @ref{Font Size}.
543 If you view the result with Xdvi, then staff lines will show through
544 the letters. Printing the PostScript file obtained does produce the
548 @node Easier music entry
549 @section Easier music entry
552 When entering music it is easy to introduce errors. This section deals
553 with tricks and features of the input language that were added solely
554 to help entering music, and find and correct mistakes.
556 It is also possible to use external programs, for example GUI
557 interfaces, or MIDI transcription programs, to enter or edit
558 music. Refer to the website for more information. Finally, there are
559 tools make debugging easier, by linking the input file and the output
560 shown on screen. See @ref{Point and click} for more information.
567 * Skipping corrected music::
568 * Automatic note splitting::
574 @node Relative octaves
575 @subsection Relative octaves
577 @cindex relative octave specification
579 Octaves are specified by adding @code{'} and @code{,} to pitch names.
580 When you copy existing music, it is easy to accidentally put a pitch
581 in the wrong octave and hard to find such an error. The relative
582 octave mode prevents these errors: a single error puts the rest of the
583 piece off by one octave:
585 @cindex @code{\relative}
587 \relative @var{startpitch} @var{musicexpr}
590 The octave of notes that appear in @var{musicexpr} are calculated as
591 follows: If no octave changing marks are used, the basic interval
592 between this and the last note is always taken to be a fourth or less
593 (; this distance is determined without regarding alterations: a
594 @code{fisis} following a @code{ceses} will be put above the
597 The octave changing marks @code{'} and @code{,} can be added to raise
598 or lower the pitch by an extra octave. Upon entering relative mode,
599 an absolute starting pitch must be specified that will act as the
600 predecessor of the first note of @var{musicexpr}.
602 Here is the relative mode shown in action:
603 @lilypond[fragment,singleline,verbatim,center]
609 Octave changing marks are used for intervals greater than a fourth:
610 @lilypond[fragment,verbatim,center]
615 If the preceding item is a chord, the first note of the chord is used
616 to determine the first note of the next chord:
618 @lilypond[fragment,verbatim,center]
625 @cindex @code{\notes}
627 The pitch after the @code{\relative} contains a note name. To parse
628 the pitch as a note name, you have to be in note mode, so there must
629 be a surrounding @code{\notes} keyword (which is not
632 The relative conversion will not affect @code{\transpose},
633 @code{\chords} or @code{\relative} sections in its argument. If you
634 want to use relative within transposed music, you must place an
635 additional @code{\relative} inside the @code{\transpose}.
638 @subsection Octave check
641 Octave checks make octave errors easier to correct.
647 This checks that @var{pitch} (without octave) yields @var{pitch} (with
648 octave) in \relative mode. If not, a warning is printed, and the
649 octave is corrected, for example, the first check is passed
650 successfully. The second check fails with an error message. The
651 octave is adjusted so the following notes are in the correct octave
662 The octave of a note following an octave check is determined with
663 respect to the note preceding it. In the next fragment, the last note
664 is a @code{a'}, above central C. Hence, the @code{\octave} check may
665 be deleted without changing the meaning of the piece.
667 @lilypond[verbatim,fragment]
676 @subsection Bar check
680 @cindex @code{barCheckSynchronize}
683 Bar checks help detect errors in the durations. A bar check is
684 entered using the bar symbol, `@code{|}'. Whenever it is encountered
685 during interpretation, it should fall on a measure boundary. If it
686 does not, a warning is printed. Depending on the value of
687 @code{barCheckSynchronize}, the beginning of the measure will be
690 In the next example, the second bar check will signal an error:
692 \time 3/4 c2 e4 | g2 |
695 Bar checks can also be used in lyrics, for example
700 Twin -- kle | Twin -- kle
705 @cindex skipTypesetting
707 Failed bar checks are caused by entering incorrect
708 durations. Incorrect durations often completely garble up the score,
709 especially if it is polyphonic, so you should start correcting the
710 score by scanning for failed bar checks and incorrect durations. To
711 speed up this process, you can use @code{skipTypesetting}, described
714 @node Skipping corrected music
715 @subsection Skipping corrected music
717 The property @code{Score.skipTypesetting} can be used to switch on and
718 off typesetting completely during the interpretation phase. When
719 typesetting is switched off, the music is processed much more quickly.
720 This can be used to skip over the parts of a score that have already
721 been checked for errors:
723 @lilypond[fragment,singleline,verbatim]
725 \property Score.skipTypesetting = ##t
727 \property Score.skipTypesetting = ##f
731 @node Automatic note splitting
732 @subsection Automatic note splitting
734 Long notes can be converted automatically to tied notes. This is done
735 by replacing the @internalsref{Note_heads_engraver} by the
736 @internalsref{Completion_heads_engraver}:
739 \paper @{ \translator @{
741 \remove "Note_heads_engraver"
742 \consists "Completion_heads_engraver"
746 which will make long notes tied in the following example:
749 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
756 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
758 \paper { \translator {
760 \remove "Note_heads_engraver"
761 \consists "Completion_heads_engraver"
766 This engraver splits all running notes at the bar line, and inserts
767 ties. One of its uses is to debug complex scores: if the measures are
768 not entirely filled, then the ties exactly show how much each measure
773 Not all durations (especially those containing tuplets) can be
774 represented exactly; the engraver will not insert tuplets.
780 @section Staff notation
782 This section describes music notation that occurs on staff level,
783 such as keys, clefs and time signatures.
785 @cindex Staff notation
799 @subsection Staff symbol
801 @cindex adjusting staff symbol
802 @cindex StaffSymbol, using \property
804 Notes, dynamic signs, etc. are grouped
805 with a set of horizontal lines, into a staff (plural `staves'). In our
806 system, these lines are drawn using a separate layout object called
810 @cindex staff lines, setting number of
811 @cindex staff lines, setting thickness of
812 @cindex thickness of staff lines, setting
813 @cindex number of staff lines, setting
817 Internals: @internalsref{StaffSymbol},
819 Examples: @inputfileref{input/test,staff-lines.ly},
820 @inputfileref{input/test,staff-size.ly}
824 If a staff is ended halfway a piece, the staff symbol may not end
825 exactly on the barline.
829 @subsection Key signature
830 @cindex Key signature
834 The key signature indicates the scale in which a piece is played. It
835 is denoted by a set of alterations (flats or sharps) at the start of
840 Setting or changing the key signature is done with the @code{\key}
843 @code{\key} @var{pitch} @var{type}
846 @cindex @code{\minor}
847 @cindex @code{\major}
848 @cindex @code{\minor}
849 @cindex @code{\ionian}
850 @cindex @code{\locrian}
851 @cindex @code{\aeolian}
852 @cindex @code{\mixolydian}
853 @cindex @code{\lydian}
854 @cindex @code{\phrygian}
855 @cindex @code{\dorian}
857 Here, @var{type} should be @code{\major} or @code{\minor} to get
858 @var{pitch}-major or @var{pitch}-minor, respectively.
859 The standard mode names @code{\ionian},
860 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
861 @code{\phrygian}, and @code{\dorian} are also defined.
863 This command sets the context property
864 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
865 can be specified by setting this property directly.
867 Accidentals and key signatures often confuse new users, because
868 unaltered notes get natural signs depending on the keysignature. The
869 tutorial explains why this is so in @ref{More about pitches}.
873 The ordering of a key cancellation is wrong when it is combined with
874 repeat bar lines. The cancellation is also printed after a line break.
878 @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
880 @cindex @code{keySignature}
887 The clef indicates which lines of the staff correspond to which
892 The clef can be set or changed with the @code{\clef} command:
893 @lilypond[fragment,verbatim]
894 \key f\major c''2 \clef alto g'2
897 Supported clef-names include:
898 @c Moved standard clefs to the top /MB
902 @item treble, violin, G, G2
915 G clef on 1st line, so-called French violin clef
920 @cindex mezzosoprano clef
923 @cindex baritone clef
926 @cindex varbaritone clef
935 By adding @code{_8} or @code{^8} to the clef name, the clef is
936 transposed one octave down or up, respectively, and @code{_15} and
937 @code{^15} transposes by two octaves. The argument @var{clefname}
938 must be enclosed in quotes when it contains underscores or digits. For
942 @cindex choral tenor clef
943 @lilypond[verbatim,fragment,relative]
947 This command is equivalent to setting @code{clefGlyph},
948 @code{clefPosition} (which controls the Y position of the clef),
949 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
950 when any of these properties are changed.
954 The object for this symbol is @internalsref{Clef}.
958 @node Ottava brackets
959 @subsection Ottava brackets
961 ``Ottava'' brackets introduce an extra transposition of an octave for
962 the staff. They are created by invoking the function
963 @code{set-octavation}:
969 @lilypond[verbatim,fragment]
978 Internally the @code{set-octavation} function sets the properties
979 @code{ottavation} (eg. to @code{"8va"}) and
980 @code{centralCPosition}. The function also takes arguments -1 (for 8va
981 bassa) and 2 (for 15ma).
983 @internalsref{OttavaSpanner}.
987 @code{set-octavation} will get confused when clef changes happen
988 during an octavation bracket.
991 @subsection Time signature
992 @cindex Time signature
996 Time signature indicates the metrum of a piece: a regular pattern of
997 strong and weak beats. It is denoted by a fraction at the start of the
1002 The time signature is set or changed by the @code{\time}
1004 @lilypond[fragment,verbatim]
1005 \time 2/4 c'2 \time 3/4 c'2.
1008 The symbol that is printed can be customized with the @code{style}
1009 property. Setting it to @code{#'()} uses fraction style for 4/4 and
1010 2/2 time. There are many more options for its layout. See
1011 @inputfileref{input/test,time.ly} for more examples.
1014 This command sets the property @code{timeSignatureFraction},
1015 @code{beatLength} and @code{measureLength} in the @code{Timing}
1016 context, which is normally aliased to @internalsref{Score}. The
1017 property @code{measureLength} determines where bar lines should be
1018 inserted, and how automatic beams should be generated. Changing the
1019 value of @code{timeSignatureFraction} also causes the symbol to be
1022 More options are available through the Scheme function
1023 @code{set-time-signature}. In combination with the
1024 @internalsref{Measure_grouping_engraver}, it will create
1025 @internalsref{MeasureGrouping} signs. Such signs ease reading
1026 rhythmically complex modern music. In the following example, the 9/8
1027 measure is subdivided in 2, 2, 2 and 3. This is passed to
1028 @code{set-time-signature} as the third argument @code{(2 2 2 3)}:
1031 \score { \notes \relative c'' {
1032 #(set-time-signature 9 8 '(2 2 2 3))
1033 g8[ g] d[ d] g[ g] a8[( bes g]) |
1034 #(set-time-signature 5 8 '(3 2))
1039 \translator { \StaffContext
1040 \consists "Measure_grouping_engraver"
1046 @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1051 Automatic beaming does not use measure grouping specified with
1052 @code{set-time-signature}.
1054 @node Partial measures
1055 @subsection Partial measures
1058 @cindex partial measure
1059 @cindex measure, partial
1060 @cindex shorten measures
1061 @cindex @code{\partial}
1063 Partial measures, for example in upsteps, are entered using the
1064 @code{\partial} command:
1065 @lilypond[fragment,verbatim,relative 1]
1066 \partial 16*5 c16 cis d dis e | a2. c,4 | b2
1069 The syntax for this command is
1071 \partial @var{duration}
1073 This is internally translated into
1075 \property Timing.measurePosition = -@var{length of duration}
1078 The property @code{measurePosition} contains a rational number
1079 indicating how much of the measure has passed at this point.
1081 @node Unmetered music
1082 @subsection Unmetered music
1084 Bar lines and bar numbers are calculated automatically. For unmetered
1085 music (e.g. cadenzas), this is not desirable. By setting
1086 @code{Score.timing} to false, this automatic timing can be switched
1092 @cindex @code{\cadenzaOn}
1094 @cindex @code{\cadenzaOff}
1098 @subsection Bar lines
1102 @cindex measure lines
1106 Bar lines delimit measures, but are also used to indicate repeats.
1107 Normally, they are inserted automatically. Line breaks may only
1113 of barlines can be forced with the @code{\bar} command:
1115 @lilypond[relative=1,fragment,verbatim]
1119 The following bar types are available:
1120 @lilypond[fragment, relative, singleline, verbatim]
1131 For allowing linebreaks, there is a special command,
1135 This will insert an invisible barline, and allow linebreaks at this
1138 In scores with many staves, a @code{\bar} command in one staff is
1139 automatically applied to all staves. The resulting bar lines are
1140 connected between different staves of a @internalsref{StaffGroup}:
1142 @lilypond[fragment, verbatim]
1143 << \context StaffGroup <<
1147 \new Staff { \clef bass c4 g e g } >>
1148 \new Staff { \clef bass c2 c2 } >>
1152 The command @code{\bar @var{bartype}} is a short cut for doing
1153 @code{\property Score.whichBar = @var{bartype}} Whenever
1154 @code{whichBar} is set to a string, a bar line of that type is
1155 created. At the start of a measure it is set to
1156 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1157 to override default measure bars.
1159 Property @code{whichBar} can also be set directly, using @code{\property}
1160 or @code{\bar}. These settings take precedence over the automatic
1161 @code{whichBar} settings.
1164 @cindex repeatCommands
1165 @cindex defaultBarType
1167 You are encouraged to use @code{\repeat} for repetitions. See
1177 The bar line objects that are created at @internalsref{Staff} level
1178 are called @internalsref{BarLine}, the bar lines that span staves are
1179 @internalsref{SpanBar}s.
1181 @cindex bar lines at start of system
1182 @cindex start of system
1184 The barlines at the start of each system are
1185 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1186 @internalsref{SystemStartBracket}. Only one of these types is created
1187 in every context, and that type is determined by the property
1188 @code{systemStartDelimiter}.
1194 The easiest way to enter fragments with more than one voice on a staff
1195 is to split chords using the separator @code{\\}. You can use it for
1196 small, short-lived voices or for single chords:
1198 @lilypond[verbatim,fragment]
1199 \context Staff \relative c'' {
1200 c4 << { f d e } \\ { b c2 } >>
1201 c4 << g' \\ b, \\ f' \\ d >>
1205 The separator causes @internalsref{Voice} contexts@footnote{Polyphonic
1206 voices are sometimes called "layers" other notation packages}
1208 to be instantiated. They bear the names @code{"1"}, @code{"2"}, etc. In
1209 each of these contexts, vertical direction of slurs, stems, etc. is set
1212 This can also be done by instantiating @internalsref{Voice} contexts
1213 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1214 a stem directions and horizontal shift for each part:
1217 @lilypond[singleline, verbatim]
1219 \context Staff << \new Voice { \voiceOne cis2 b }
1220 \new Voice { \voiceThree b4 ais ~ ais4 gis4 }
1221 \new Voice { \voiceTwo fis4~ fis4 f ~ f } >>
1224 Normally, note heads with a different number of dots are not merged, but
1225 when the object property @code{merge-differently-dotted} is set in
1226 the @internalsref{NoteCollision} object, they are merged:
1227 @lilypond[verbatim,fragment,singleline]
1228 \relative c'' \context Voice << {
1230 \property Staff.NoteCollision \override
1231 #'merge-differently-dotted = ##t
1233 } \\ { g8.[ f16] g8.[ f16] }
1237 Similarly, you can merge half note heads with eighth notes, by setting
1238 @code{merge-differently-headed}:
1239 @lilypond[fragment, relative=2,verbatim]
1242 \property Staff.NoteCollision
1243 \override #'merge-differently-headed = ##t
1244 c8 c4. } \\ { c2 c2 } >>
1247 LilyPond also vertically shifts rests that are opposite of a stem:
1250 @lilypond[singleline,fragment,verbatim]
1251 \context Voice << c''4 \\ r4 >>
1259 @cindex @code{\oneVoice}
1261 @cindex @code{\voiceOne}
1263 @cindex @code{\voiceTwo}
1265 @cindex @code{\voiceThree}
1267 @cindex @code{\voiceFour}
1270 The following commands specify in what chords of the current voice
1271 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1272 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1275 @cindex @code{\shiftOn}
1277 @cindex @code{\shiftOnn}
1279 @cindex @code{\shiftOnnn}
1281 @cindex @code{\shiftOff}
1288 The objects responsible for resolving collisions are
1289 @internalsref{NoteCollision} and @internalsref{RestCollision}. See
1290 also example files @inputfileref{input/regression,collision-dots.ly},
1291 @inputfileref{input/regression,collision-head-chords.ly},
1292 @inputfileref{input/regression,collision-heads.ly},
1293 @inputfileref{input/regression,collision-mesh.ly}, and
1294 @inputfileref{input/regression,collisions.ly}.
1299 Resolving collisions is a intricate subject, and only a few situations
1300 are handled. When LilyPond cannot cope, the @code{force-hshift}
1301 property of the @internalsref{NoteColumn} object and pitched rests can
1302 be used to override typesetting decisions.
1304 When using @code{merge-differently-headed} with an upstem 8th or a shorter
1305 note, and a downstem half note, the 8th note gets the wrong offset.
1310 Beams are used to group short notes into chunks that are aligned with
1311 the metrum. They are inserted automatically in most cases:
1313 @lilypond[fragment,verbatim, relative=2]
1314 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1317 When these automatic decisions are not good enough, beaming can be
1318 entered explicitly. It is also possible to define beaming patterns
1319 that differ from the defaults.
1323 @internalsref{Beam}.
1326 @cindex Automatic beams
1327 @subsection Manual beams
1328 @cindex beams, manual
1332 In some cases it may be necessary to override the automatic beaming
1333 algorithm. For example, the auto beamer will not put beams over rests
1334 or bar lines. Such beams are specified by manually: the begin and end
1335 point are marked with @code{[} and @code{]}:
1337 @lilypond[fragment,relative,verbatim]
1339 r4 r8[ g' a r8] r8 g[ | a] r8
1343 @cindex @code{stemLeftBeamCount}
1345 Normally, beaming patterns within a beam are determined automatically.
1346 When this mechanism fouls up, the properties
1347 @code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount} can
1348 be used to control the beam subdivision on a stem. If either property
1349 is set, its value will be used only once, and then it is erased.
1351 @lilypond[fragment,relative,verbatim]
1354 f8[ r16 \property Voice.stemLeftBeamCount = #1 f g a]
1357 @cindex @code{stemRightBeamCount}
1360 The property @code{subdivideBeams} can be set in order to subdivide
1361 all 16th or shorter beams at beat positions, as defined by the
1362 @code{beatLength} property . This accomplishes the same effect as
1363 twiddling with @code{stemLeftBeamCount} and @code{stemRightBeamCount},
1364 but it take less typing:
1367 @lilypond[relative=1,verbatim,noindent]
1369 \property Voice.subdivideBeams = ##t
1371 \property Score.beatLength = #(ly:make-moment 1 8)
1374 @cindex subdivideBeams
1376 Kneed beams are inserted automatically, when a large gap is detected
1377 between the note heads. This behavior can be tuned through the object
1378 property @code{auto-knee-gap}.
1380 Normally, line breaks are forbidden when beams cross bar lines. This
1381 behavior can be changed by setting @code{allowBeamBreak}.
1383 @cindex @code{allowBeamBreak}
1384 @cindex beams and line breaks
1386 @cindex beams, kneed
1388 @cindex auto-knee-gap
1394 @cindex Frenched staves
1396 Automatically kneed beams cannot be used together with hidden staves.
1401 * Setting automatic beam behavior::
1405 @no de Beam typography
1406 @sub section Beam typography
1408 One of the strong points of LilyPond is how beams are formatted. Beams
1409 are quantized, meaning that the left and right endpoints beams start
1410 exactly on staff lines. Without quantization, small wedges of white
1411 space appear between the beam and staff line, and this looks untidy.
1413 Beams are also slope-damped: melodies that go up or down should also
1414 have beams that go up or down, but the slope of the beams should be
1415 less than the slope of the notes themselves.
1417 Some beams should be horizontal. These are so-called concave beams.
1419 [TODO: some pictures.]
1423 @node Setting automatic beam behavior
1424 @subsection Setting automatic beam behavior
1426 @cindex @code{autoBeamSettings}
1427 @cindex @code{(end * * * *)}
1428 @cindex @code{(begin * * * *)}
1429 @cindex automatic beams, tuning
1430 @cindex tuning automatic beaming
1432 @c [TODO: use \applycontext]
1434 In normal time signatures, automatic beams can start on any note but can
1435 only end in a few positions within the measure: beams can end on a beat,
1436 or at durations specified by the properties in
1437 @code{Voice.autoBeamSettings}. The defaults for @code{autoBeamSettings}
1438 are defined in @file{scm/auto-beam.scm}.
1440 The value of @code{autoBeamSettings} is changed using
1441 @code{\override} and restored with @code{\revert}:
1443 \property Voice.autoBeamSettings \override #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
1444 \property Voice.autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
1446 Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines
1447 whether the rule applies to begin or end-points. The quantity
1448 @var{P}/@var{Q} refers to the length of the beamed notes (and `@code{*
1449 *}' designates notes of any length), @var{N}/@var{M} refers to a time
1450 signature (wildcards, `@code{* *}' may be entered to designate all time
1453 For example, if automatic beams should end on every quarter note, use
1456 \property Voice.autoBeamSettings \override
1457 #'(end * * * *) = #(ly:make-moment 1 4)
1459 Since the duration of a quarter note is 1/4 of a whole note, it is
1460 entered as @code{(ly:make-moment 1 4)}.
1462 The same syntax can be used to specify beam starting points. In this
1463 example, automatic beams can only end on a dotted quarter note:
1465 \property Voice.autoBeamSettings \override
1466 #'(end * * * *) = #(ly:make-moment 3 8)
1468 In 4/4 time signature, this means that automatic beams could end only on
1469 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1470 3/8 has passed within the measure).
1472 Rules can also be restricted to specific time signatures. A rule that
1473 should only be applied in @var{N}/@var{M} time signature is formed by
1474 replacing the second asterisks by @var{N} and @var{M}. For example, a
1475 rule for 6/8 time exclusively looks like
1477 \property Voice.autoBeamSettings \override
1478 #'(begin * * 6 8) = ...
1481 If a rule should be to applied only to certain types of beams, use the
1482 first pair of asterisks. Beams are classified according to the
1483 shortest note they contain. For a beam ending rule that only applies
1484 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1487 If a score ends while an automatic beam has not been ended and is still
1488 accepting notes, this last beam will not be typeset at all.
1490 @cindex automatic beam generation
1492 @cindex @code{Voice.autoBeaming}
1495 For melodies that have lyrics, you may want to switch off
1496 automatic beaming. This is done by setting @code{Voice.autoBeaming} to
1501 @cindex @code{\autoBeamOff}
1502 @code{\autoBeamOff},
1503 @cindex @code{\autoBeamOn}
1509 The rules for ending a beam depend on the shortest note in a beam.
1510 So, while it is possible to have different ending rules for eight
1511 beams and sixteenth beams, a beam that contains both eight and
1512 sixteenth notes will use the rules for the sixteenth beam.
1514 In the example below, the autobeamer makes eight beams and sixteenth
1515 end at 3 eights; the third beam can only be corrected by specifying
1518 @lilypond[singleline,fragment,relative,noverbatim,quote]
1519 \property Voice.autoBeamSettings
1520 \override #'(end * * * *) = #(ly:make-moment 3 8)
1521 % rather show case where it goes wrong
1522 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1523 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1525 It is not possible to specify beaming parameters that act differently in
1526 different parts of a measure. This means that it is not possible to use
1527 automatic beaming in irregular meters such as @code{5/8}.
1530 @section Accidentals
1533 This section describes how to change the way that accidentals are
1534 inserted automatically before the running notes.
1538 * Using the predefined accidental variables::
1539 * Customized accidental rules::
1542 @node Using the predefined accidental variables
1543 @subsection Using the predefined accidental variables
1545 The constructs for describing the accidental typesetting rules are
1546 quite hairy, so non-experts should stick to the variables
1547 defined in @file{ly/property-init.ly}.
1548 @cindex @file{property-init.ly}
1550 The variables set properties in the ``@code{Current}'' context (see
1551 @ref{Context properties}). This means that the variables should
1552 normally be added right after the creation of the context in which the
1553 accidental typesetting described by the variable is to take
1554 effect. For example, if you want to use piano-accidentals in a piano
1555 staff then issue @code{\pianoAccidentals} first thing after the
1556 creation of the piano staff:
1559 \notes \relative c'' <<
1560 \new Staff @{ cis4 d e2 @}
1561 \context GrandStaff <<
1563 \new Staff @{ cis4 d e2 @}
1564 \new Staff @{ es2 c @}
1566 \new Staff @{ es2 c @}
1570 @lilypond[singleline]
1572 \notes \relative c'' <<
1573 \new Staff { cis4 d e2 }
1574 \context GrandStaff <<
1576 \new Staff { cis4 d e2 }
1577 \new Staff { es2 c }
1579 \new Staff { es2 c }
1584 minimumVerticalExtent = #'(-4.0 . 4.0)
1592 @item \defaultAccidentals
1593 @cindex @code{\defaultAccidentals}
1594 This is the default typesetting behaviour. It should correspond
1595 to 18th century common practice: Accidentals are
1596 remembered to the end of the measure in which they occur and
1597 only on their own octave.
1599 @item \voiceAccidentals
1600 @cindex @code{\voiceAccidentals}
1602 The normal behaviour is to
1603 remember the accidentals on Staff-level. This variable, however,
1604 typesets accidentals individually for each voice. Apart from that the
1605 rule is similar to @code{\defaultAccidentals}.
1607 This leads to some weird and often unwanted results
1608 because accidentals from one voice do not get cancelled in other
1610 @lilypond[singleline,relative,fragment,verbatim,quote]
1618 Hence you should only use @code{\voiceAccidentals} if the voices
1619 are to be read solely by individual musicians. If the staff is to be
1620 used by one musician (e.g. a conductor) then you use
1621 @code{\modernVoiceAccidentals} or @code{\modernVoiceCautionaries}
1624 @item \modernAccidentals
1625 @cindex @code{\modernAccidentals}
1626 This rule corresponds to the common practice in the 20th
1628 The rule is more complex than @code{\defaultAccidentals}.
1629 You get all the same accidentals, but temporary
1630 accidentals also get cancelled in other octaves. Furthermore,
1631 in the same octave, they also get cancelled in the following measure:
1632 @lilypond[singleline,fragment,verbatim]
1634 cis' c'' cis'2 | c'' c'
1637 @item \modernCautionaries
1638 @cindex @code{\modernCautionaries}
1639 This rule is similar to @code{\modernAccidentals}, but the
1640 ``extra'' accidentals (the ones not typeset by
1641 @code{\defaultAccidentals}) are typeset as cautionary accidentals.
1642 They are printed in reduced size or with parentheses:
1643 @lilypond[singleline,fragment,verbatim]
1645 cis' c'' cis'2 | c'' c'
1648 @cindex @code{\modernVoiceAccidentals}
1649 @item \modernVoiceAccidentals
1650 is used for multivoice accidentals to be read both by musicians
1651 playing one voice and musicians playing all voices. Accidentals are
1652 typeset for each voice, but they @emph{are} cancelled across voices in
1653 the same @internalsref{Staff}.
1655 @cindex @code{\modernVoiceCautionaries}
1656 @item \modernVoiceCautionaries
1657 is the same as @code{\modernVoiceAccidentals}, but with the extra
1658 accidentals (the ones not typeset by @code{\voiceAccidentals}) typeset
1659 as cautionaries. Even though all accidentals typeset by
1660 @code{\defaultAccidentals} @emph{are} typeset by this variable then
1661 some of them are typeset as cautionaries.
1663 @item \pianoAccidentals
1664 @cindex @code{\pianoAccidentals}
1665 20th century practice for piano notation. Very similar to
1666 @code{\modernAccidentals} but accidentals also get cancelled
1667 across the staves in the same @internalsref{GrandStaff} or
1668 @internalsref{PianoStaff}.
1670 @item \pianoCautionaries
1671 @cindex @code{\pianoCautionaries}
1672 As @code{\pianoAccidentals} but with the extra accidentals
1673 typeset as cautionaries.
1676 @cindex @code{\noResetKey}
1677 Same as @code{\defaultAccidentals} but with accidentals lasting
1678 ``forever'' and not only until the next measure:
1679 @lilypond[singleline,fragment,verbatim,relative]
1684 @item \forgetAccidentals
1685 @cindex @code{\forgetAccidentals}
1686 This is sort of the opposite of @code{\noResetKey}: Accidentals
1687 are not remembered at all---and hence all accidentals are
1688 typeset relative to the key signature, regardless of what was
1689 before in the music:
1690 @lilypond[singleline,fragment,verbatim,relative]
1692 \key d\major c4 c cis cis d d dis dis
1696 @node Customized accidental rules
1697 @subsection Customized accidental rules
1699 For determining when to print an accidental, several different rules
1700 are tried. The rule that gives the highest number of accidentals is
1701 used. Each rule consists of
1704 In which context is the rule applied. For example, if
1705 @var{context} is @internalsref{Score} then all staves share
1706 accidentals, and if @var{context} is @internalsref{Staff} then all
1707 voices in the same staff share accidentals, but staves do not.
1709 Whether the accidental changes all octaves or only the current
1712 Over how many barlines the accidental lasts.
1713 If @var{lazyness} is @code{-1} then the accidental is forget
1714 immediately, and if @var{lazyness} is @code{#t} then the accidental
1717 @c [TODO: should use +infinity for this case?]
1723 @cindex @code{\defaultAccidentals}
1724 @code{\defaultAccidentals},
1725 @cindex @code{\voiceAccidentals}
1726 @code{\voiceAccidentals},
1727 @cindex @code{\modernAccidentals}
1728 @code{\modernAccidentals},
1729 @cindex @code{\modernCautionaries}
1730 @code{\modernCautionaries},
1731 @cindex @code{\modernVoiceAccidentals}
1732 @code{\modernVoiceAccidentals},
1733 @cindex @code{\modernVoiceCautionaries}
1734 @code{\modernVoiceCautionaries},
1735 @cindex @code{\pianoAccidentals}
1736 @code{\pianoAccidentals},
1737 @cindex @code{\pianoCautionaries}
1738 @code{\pianoCautionaries},
1739 @cindex @code{\noResetKey}
1741 @cindex @code{\forgetAccidentals}
1742 @code{\forgetAccidentals}.
1746 @internalsref{Accidental_engraver}, @internalsref{Accidental}, and
1747 @internalsref{AccidentalPlacement}.
1752 Currently the simultaneous notes are considered to be entered in
1753 sequential mode. This means that in a chord the accidentals are
1754 typeset as if the notes in the chord happened once at a time - in the
1755 order in which they appear in the input file.
1757 This is only a problem when there are simultaneous notes whose
1758 accidentals depend on each other. The problem only occurs when using
1759 non-default accidentals. In the default scheme, accidentals only
1760 depend on other accidentals with the same pitch on the same staff, so
1761 no conflicts possible.
1763 This example shows two examples of the same music giving different
1764 accidentals depending on the order in which the notes occur in the
1767 @lilypond[singleline,fragment,verbatim]
1768 \property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1769 cis'4 <c'' c'> r2 | cis'4 <c' c''> r2
1770 | <cis' c''> r | <c'' cis'> r |
1773 This problem can be solved by manually inserting @code{!} and @code{?}
1774 for the problematic notes.
1776 @node Expressive marks
1777 @section Expressive marks
1780 @c todo: should change ordering
1781 @c where to put text spanners, metronome marks,
1790 * Analysis brackets::
1792 * Fingering instructions::
1803 A slur indicates that notes are to be played bound or @emph{legato}.
1807 They are entered using parentheses:
1808 @lilypond[relative 1,fragment,verbatim,center]
1809 f( g)( a) a8 b( a4 g2 f4)
1814 @c TODO: should explain that ^( and _( set directions
1815 @c should set attachments with ^ and _ ?
1817 Slurs avoid crossing stems, and are generally attached to note heads.
1818 However, in some situations with beams, slurs may be attached to stem
1819 ends. If you want to override this layout you can do this through the
1820 object property @code{attachment} of @internalsref{Slur} in
1821 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1822 the attachment type of the left and right end points:
1824 @lilypond[fragment,relative,verbatim]
1826 \property Voice.Stem \set #'length = #5.5
1828 \property Voice.Slur \set #'attachment = #'(stem . stem)
1832 If a slur would strike through a stem or beam, the slur will be moved
1833 away upward or downward. If this happens, attaching the slur to the
1834 stems might look better:
1836 @lilypond[fragment,relative,verbatim]
1839 \property Voice.Slur \set #'attachment = #'(stem . stem)
1846 @cindex @code{\slurUp}
1848 @cindex @code{\slurDown}
1850 @cindex @code{\slurBoth}
1852 @cindex @code{\slurDotted}
1854 @cindex @code{\slurSolid}
1859 @seeinternals{Slur}, and @internalsref{SlurEvent}.
1864 Producing nice slurs is a difficult problem, and LilyPond currently
1865 uses a simple, empiric method to produce slurs. In some cases, its
1869 @cindex Adjusting slurs
1871 @node Phrasing slurs
1872 @subsection Phrasing slurs
1874 @cindex phrasing slurs
1875 @cindex phrasing marks
1877 A phrasing slur (or phrasing mark) connects chords and is used to
1878 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1881 @lilypond[fragment,verbatim,center,relative]
1882 \time 6/4 c'\( d( e) f( e) d\)
1885 Typographically, the phrasing slur behaves almost exactly like a
1886 normal slur. However, they are treated as different objects. A
1887 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1888 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1889 @code{\phrasingSlurBoth}.
1891 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1892 will only affect normal slurs and not phrasing slurs.
1896 @cindex @code{\phrasingSlurUp}
1897 @code{\phrasingSlurUp},
1898 @cindex @code{\phrasingSlurDown}
1899 @code{\phrasingSlurDown},
1900 @cindex @code{\phrasingSlurBoth}
1901 @code{\phrasingSlurBoth},
1905 See also @internalsref{PhrasingSlur}, and
1906 @internalsref{PhrasingSlurEvent}.
1910 Phrasing slurs have the same limitations in their formatting as normal
1911 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1914 @subsection Breath marks
1916 Breath marks are entered using @code{\breathe}:
1919 @lilypond[fragment,relative,verbatim]
1923 The glyph of the breath mark can be tweaked by overriding the
1924 @code{text} property of the @code{BreathingSign} layout object with
1925 any markup text. For example,
1926 @lilypond[fragment,verbatim,relative]
1928 \property Voice.BreathingSign \override #'text
1929 = #(make-musicglyph-markup "scripts-rvarcomma")
1936 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}, and
1937 @inputfileref{input/regression,breathing-sign.ly}.
1940 @node Metronome marks
1941 @subsection Metronome marks
1944 @cindex beats per minute
1945 @cindex metronome marking
1947 Metronome settings can be entered as follows:
1949 \tempo @var{duration} = @var{perminute}
1952 In the MIDI output, they are interpreted as a tempo change, and in the
1953 paper output, a metronome marking is printed:
1954 @cindex @code{\tempo}
1955 @lilypond[fragment,verbatim]
1961 @internalsref{MetronomeChangeEvent}.
1966 @subsection Text spanners
1967 @cindex Text spanners
1969 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1970 are written as texts, and extended over many measures with dotted
1971 lines. You can create such texts using text spanners: attach
1972 @code{\startTextSpan} and @code{\stopTextSpan} to the
1973 start and ending note of the spanner.
1975 The string to be printed, as well as the style, is set through object
1978 @lilypond[fragment,relative,verbatim]
1980 \property Voice.TextSpanner \set #'direction = #-1
1981 \property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
1982 c2\startTextSpan b c\stopTextSpan a }
1988 @internalsref{TextSpanEvent},
1989 @internalsref{TextSpanner}, and
1990 @inputfileref{input/regression,text-spanner.ly}.
1993 @node Analysis brackets
1994 @subsection Analysis brackets
1996 @cindex phrasing brackets
1997 @cindex musicological analysis
1998 @cindex note grouping bracket
2000 Brackets are used in musical analysis to indicate structure in musical
2001 pieces. LilyPond supports a simple form of nested horizontal brackets.
2002 To use this, add the @internalsref{Horizontal_bracket_engraver} to
2003 @internalsref{Staff} context. A bracket is started with
2004 @code{\startGroup} and closed with @code{\stopGroup}:
2006 @lilypond[singleline,verbatim]
2007 \score { \notes \relative c'' {
2008 c4\startGroup\startGroup
2011 c4\stopGroup\stopGroup
2013 \paper { \translator {
2014 \StaffContext \consists "Horizontal_bracket_engraver"
2020 @internalsref{HorizontalBracket}, @internalsref{NoteGroupingEvent}, and
2021 @inputfileref{input/regression,note-group-bracket.ly}.
2025 @subsection Articulations
2026 @cindex Articulations
2028 @cindex articulations
2032 A variety of symbols can appear above and below notes to indicate
2033 different characteristics of the performance. They are added to a note
2034 by adding a dash and the character signifying the
2035 articulation. They are demonstrated here:
2037 @lilypondfile[notexidoc]{script-abbreviations.ly}
2039 The meanings of these shorthands can be changed: see
2040 @file{ly/script-init.ly} for examples.
2043 The script is automatically placed, but if you need to force
2044 directions, you can use @code{_} to force them down, or @code{^} to
2046 @lilypond[fragment, verbatim]
2050 Other symbols can be added using the syntax
2051 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2052 can be forced up or down using @code{^} and @code{_},
2055 @lilypond[verbatim,fragment,relative 2]
2056 c\fermata c^\fermata c_\fermata
2063 @cindex staccatissimo
2072 @cindex organ pedal marks
2081 @cindex prallmordent
2085 @cindex thumb marking
2090 @lilypondfile[notexidoc]{script-chart.ly}
2095 @cindex @code{\scriptUp}
2097 @cindex @code{\scriptDown}
2099 @cindex @code{\scriptBoth}
2104 @internalsref{ScriptEvent}, and @internalsref{Script}.
2108 These note ornaments appear in the printed output but have no
2109 effect on the MIDI rendering of the music.
2112 @node Fingering instructions
2113 @subsection Fingering instructions
2117 Fingering instructions can be entered using
2119 @var{note}-@var{digit}
2121 For finger changes, use markup texts:
2123 @lilypond[verbatim, singleline, fragment]
2124 c'4-1 c'4-2 c'4-3 c'4-4
2125 c'^\markup { \fontsize #-3 \number "2-3" }
2128 @cindex finger change
2133 You can use the thumb-script to indicate that a note should be
2134 played with your thumb (used in cello music):
2136 @lilypond[verbatim, singleline, fragment]
2137 <a' a''-3>8(_\thumb <b' b''-3>)_\thumb
2138 <c'' c'''-3>(_\thumb <d'' d'''-3>)_\thumb
2141 Fingerings for chords can also be added to individual notes
2142 of the chord by adding them after the pitches:
2143 @lilypond[verbatim,singleline,fragment,relative=1]
2144 < c-1 e-2 g-3 b-5 > 4
2147 Setting @code{fingeringOrientations} will put fingerings next
2150 @lilypond[verbatim,singleline,fragment,relative=1]
2151 \property Voice.fingeringOrientations = #'(left down)
2152 <c-1 es-2 g-4 bes-5 > 4
2153 \property Voice.fingeringOrientations = #'(up right down)
2154 <c-1 es-2 g-4 bes-5 > 4
2159 @internalsref{FingerEvent}, and @internalsref{Fingering}.
2163 @subsection Text scripts
2164 @cindex Text scripts
2166 @cindex text items, non-empty
2167 @cindex non-empty texts
2169 It is possible to place arbitrary strings of text or markup text (see
2170 @ref{Text markup}) above or below notes by using a string:
2171 @code{c^"text"}. By default, these indications do not influence the
2172 note spacing, but by using the command @code{\fatText}, the widths
2173 will be taken into account:
2175 @lilypond[fragment,singleline,verbatim] \relative c' {
2176 c4^"longtext" \fatText c4_"longlongtext" c4 }
2179 It is possible to use @TeX{} commands in the strings, but this should
2180 be avoided because the exact dimensions of the string can then no
2185 @refcommand{fatText}, @refcommand{emptyText}.
2190 In this manual: @ref{Text markup}.
2192 Internals: @internalsref{TextScriptEvent}, @internalsref{TextScript}
2198 @subsection Grace notes
2201 @c should have blurb about accaciatura / appogiatura
2203 @cindex @code{\grace}
2207 Grace notes are ornaments that are written out. The most common ones
2208 are acciaccatura, which should be played as very short. It is denoted
2209 by a slurred small note with a slashed stem. The appoggiatura is a
2210 grace note that takes a fixed fraction of the main note, is and
2211 denoted as a slurred note in small print without a slash.
2212 They are entered with the commands @code{\acciaccatura} and
2213 @code{\appoggiatura}, as demonstrated in the following example:
2216 @cindex appoggiatura
2217 @cindex acciaccatura
2219 @lilypond[relative=2,verbatim,fragment]
2220 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2221 \acciaccatura { g16[ f] } e4
2224 Both are special forms of the @code{\grace} command. By prefixing this
2225 keyword to a music expression, a new one is formed, which will be
2226 printed in a smaller font and takes up no logical time in a measure.
2227 @lilypond[relative=2,verbatim,fragment]
2229 \grace { c16[ d16] } c2 c4
2233 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2234 @code{\grace} command does not start a slur.
2236 Internally, timing for grace notes is done using a second, `grace'
2237 time. Every point in time consists of two rational numbers: one
2238 denotes the logical time, one denotes the grace timing. The above
2239 example is shown here with timing tuples:
2241 @lilypond[singleline]
2244 c4 \grace c16 c4 \grace {
2247 \new Lyrics \lyrics {
2250 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2251 \markup { (\fraction 1 4 , 0 ) } 4
2253 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2254 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2256 \markup { ( \fraction 2 4 , 0 ) }
2261 The placement of grace notes is synchronized between different staves.
2262 In the following example, there are two sixteenth graces notes for
2263 every eighth grace note:
2265 @lilypond[relative=2,verbatim,fragment]
2266 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2267 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2272 If you want to end a note with a grace, then the standard trick
2273 is to put the grace notes after a ``space note'', e.g.
2274 @lilypond[fragment,verbatim, relative=2]
2277 { s2 \grace { c16[ d] } } >>
2283 By adjusting the duration of the skip note (here it is a half-note),
2284 the space between the main-note and the grace is adjusted.
2287 A @code{\grace} section will introduce special typesetting settings,
2288 for example, to produce smaller type, and set directions. Hence, when
2289 introducing layout tweaks, they should be inside the grace section,
2291 @lilypond[fragment,verbatim,relative 1]
2294 \property Voice.Stem \override #'direction = #-1
2296 \property Voice.Stem \revert #'direction
2303 The overrides should also be reverted inside the grace section.
2305 If the layout of grace sections must be changed throughout the music,
2306 then this can be accomplished through the function
2307 @code{add-grace-property}. The following example
2308 undefines the Stem direction grace section, so stems do not always
2313 #(add-grace-property "Voice" Stem direction '())
2319 Another option is to change the variables @code{startGraceMusic},
2320 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2321 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2322 @code{stopAppoggiaturaMstuic}. More information is in the file
2323 @file{ly/grace-init.ly}
2328 @internalsref{GraceMusic}.
2332 Grace notes cannot be used in the smallest size (@file{paper11.ly}).
2334 A score that starts with an @code{\grace} section needs an explicit
2335 @code{\context Voice} declaration, otherwise the main note and grace
2336 note end up on different staves.
2338 Grace note synchronization can also lead to surprises. Staff notation,
2339 such as key signatures, barlines, etc. are also synchronized. Take
2340 care when you mix staves with grace notes and staves without, for example,
2342 @lilypond[relative=2,verbatim,fragment]
2343 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2344 \new Staff { c4 \bar "|:" d4 } >>
2347 Grace sections should only be used within sequential music
2348 expressions. Nesting or juxtaposing grace sections is not supported,
2349 and might produce crashes or other errors.
2351 Overriding settings cannot be done in separate styles for appoggiatura
2356 @subsection Glissando
2359 @cindex @code{\glissando}
2361 A glissando is a smooth change in pitch. It is denoted by a line or a
2362 wavy line between two notes.
2366 A glissando line can be requested by attaching a @code{\glissando} to
2369 @lilypond[fragment,relative,verbatim]
2375 @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2380 Adding additional texts (such as @emph{gliss.}) is not supported.
2384 @subsection Dynamics
2397 @cindex @code{\ffff}
2407 Absolute dynamic marks are specified using an variable after a
2408 note: @code{c4\ff}. The available dynamic marks are @code{\ppp},
2409 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2410 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2411 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2413 @lilypond[verbatim,singleline,fragment,relative]
2414 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2420 @cindex @code{\decr}
2421 @cindex @code{\rced}
2428 A crescendo mark is started with @code{\<} and terminated with
2429 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2430 with @code{\!}. Because these marks are bound to notes, if you must
2431 use spacer notes if multiple marks during one note are needed:
2433 @lilypond[fragment,verbatim,center,quote]
2434 c''\< c''\! d''\decr e''\rced
2435 << f''1 { s4 s4\< s4\! \> s4\! } >>
2437 This may give rise to very short hairpins. Use @code{minimum-length}
2438 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2442 \property Staff.Hairpin \override #'minimum-length = #5
2445 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2446 is an example how to do it:
2448 @lilypond[fragment,relative=2,verbatim]
2449 c4 \cresc c4 c c c \endcresc c4
2455 You can also supply your own texts:
2456 @lilypond[fragment,relative,verbatim]
2458 \property Voice.crescendoText = \markup { \italic "cresc. poco" }
2459 \property Voice.crescendoSpanner = #'dashed-line
2469 @cindex @code{\dynamicUp}
2471 @cindex @code{\dynamicDown}
2472 @code{\dynamicDown},
2473 @cindex @code{\dynamicBoth}
2474 @code{\dynamicBoth}.
2476 @cindex direction, of dynamics
2480 @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2481 @internalsref{AbsoluteDynamicEvent}.
2483 Dynamics are objects of @internalsref{DynamicText} and
2484 @internalsref{Hairpin}. Vertical positioning of these symbols is
2485 handled by the @internalsref{DynamicLineSpanner} object.
2487 If you want to adjust padding or vertical direction of the dynamics, you
2488 must set properties for the @internalsref{DynamicLineSpanner} object.
2496 @cindex @code{\repeat}
2499 Repetition is a central concept in music, and multiple notations exist
2500 for repetitions. In LilyPond, most of these notations can be captured
2501 in a uniform syntax. One of the advantages is that they can be
2502 rendered in MIDI accurately.
2504 The following types of repetition are supported:
2508 Repeated music is fully written (played) out. Useful for MIDI
2509 output, and entering repetitive music.
2512 This is the normal notation: Repeats are not written out, but
2513 alternative endings (voltas) are printed, left to right.
2517 Alternative endings are written stacked. This has limited use but may be
2518 used to typeset two lines of lyrics in songs with repeats, see
2519 @inputfileref{input,star-spangled-banner.ly}.
2527 Make beat or measure repeats. These look like percent signs.
2533 * Repeats and MIDI::
2534 * Manual repeat commands::
2536 * Tremolo subdivisions::
2541 @subsection Repeat syntax
2545 LilyPond has one syntactic construct for specifying different types of
2546 repeats. The syntax is
2549 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2552 If you have alternative endings, you may add
2553 @cindex @code{\alternative}
2555 \alternative @code{@{} @var{alternative1}
2557 @var{alternative3} @dots{} @code{@}}
2559 where each @var{alternative} is a music expression. If you do not
2560 give enough alternatives for all of the repeats, then the first
2561 alternative is assumed to be played more than once.
2563 Normal notation repeats are used like this:
2564 @lilypond[fragment,verbatim,relative 1]
2566 \repeat volta 2 { c4 d e f }
2567 \repeat volta 2 { f e d c }
2570 With alternative endings:
2571 @lilypond[fragment,verbatim,relative 1]
2573 \repeat volta 2 {c4 d e f}
2574 \alternative { {d2 d} {f f,} }
2578 @lilypond[fragment,verbatim,relative 1]
2581 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2582 \alternative { { g4 g g } { a | a a a a | b2. } }
2588 If you do a nested repeat like
2597 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2598 belongs. This ambiguity is resolved by always having the
2599 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2600 it is advisable to use braces in such situations.
2603 @node Repeats and MIDI
2604 @subsection Repeats and MIDI
2606 @cindex expanding repeats
2608 For instructions on how to unfold repeats for MIDI output, see the
2609 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2614 Timing information is not remembered at the start of an alternative,
2615 so after a repeat timing information must be reset by hand, for
2616 example by setting @code{Score.measurePosition} or entering
2617 @code{\partial}. Similarly, slurs or ties are also not repeated.
2620 @node Manual repeat commands
2621 @subsection Manual repeat commands
2623 @cindex @code{repeatCommands}
2625 The property @code{repeatCommands} can be used to control the layout of
2626 repeats. Its value is a Scheme list of repeat commands, where each repeat
2630 @item the symbol @code{start-repeat},
2631 which prints a @code{|:} bar line,
2632 @item the symbol @code{end-repeat},
2633 which prints a @code{:|} bar line,
2634 @item the list @code{(volta @var{text})},
2635 which prints a volta bracket saying @var{text}: The text can be specified as
2636 a text string or as a markup text, see @ref{Text markup}. Do not
2637 forget to change the font, as the default number font does not contain
2638 alphabetic characters. Or,
2639 @item the list @code{(volta #f)}, which
2640 stops a running volta bracket:
2643 @lilypond[verbatim, fragment,relative 2]
2645 \property Score.repeatCommands = #'((volta "93") end-repeat)
2647 \property Score.repeatCommands = #'((volta #f))
2654 @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2655 @internalsref{VoltaRepeatedMusic},
2656 @internalsref{UnfoldedRepeatedMusic}, and
2657 @internalsref{FoldedRepeatedMusic}.
2659 @node Tremolo repeats
2660 @subsection Tremolo repeats
2661 @cindex tremolo beams
2663 To place tremolo marks between notes, use @code{\repeat} with tremolo
2665 @lilypond[verbatim,singleline]
2667 \context Voice \notes\relative c' {
2668 \repeat "tremolo" 8 { c16 d16 }
2669 \repeat "tremolo" 4 { c16 d16 }
2670 \repeat "tremolo" 2 { c16 d16 }
2675 Tremolo marks can also be put on a single note. In this case, the
2676 note should not be surrounded by braces.
2677 @lilypond[verbatim,singleline]
2678 \repeat "tremolo" 4 c16
2681 A similar mechanism is the tremolo subdivision, described in
2682 @ref{Tremolo subdivisions}.
2686 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2688 Internals: tremolo beams are @internalsref{Beam} objects. Single stem
2689 tremolos are @internalsref{StemTremolo}s. The music expression is
2690 @internalsref{TremoloEvent},
2692 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2693 @inputfileref{input/regression,stem-tremolo.ly}.
2695 @node Tremolo subdivisions
2696 @subsection Tremolo subdivisions
2697 @cindex tremolo marks
2698 @cindex @code{tremoloFlags}
2700 Tremolo marks can be printed on a single note by adding
2701 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2702 A @var{length} value of 8 gives one line across the note stem. If the
2703 length is omitted, then then the last value (stored in
2704 @code{Voice.tremoloFlags}) is used:
2706 @lilypond[verbatim,fragment,center]
2707 c'2:8 c':32 | c': c': |
2710 @c [TODO : stok is te kort bij 32en]
2714 Tremolos in this style do not carry over into the MIDI output.
2718 In this manual: @ref{Tremolo repeats}.
2720 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2722 @node Measure repeats
2723 @subsection Measure repeats
2725 @cindex percent repeats
2726 @cindex measure repeats
2728 In the @code{percent} style, a note pattern can be repeated. It is
2729 printed once, and then the pattern is replaced with a special sign.
2730 Patterns of a one and two measures are replaced by percent-like signs,
2731 patterns that divide the measure length are replaced by slashes:
2733 @lilypond[verbatim,singleline]
2734 \context Voice { \repeat "percent" 4 { c'4 }
2735 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2741 @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2742 @internalsref{PercentRepeatedMusic}, and
2743 @internalsref{DoublePercentRepeat}.
2747 @node Rhythmic music
2748 @section Rhythmic music
2750 Sometimes you might want to show only the rhythm of a melody. This
2751 can be done with the rhythmic staff. All pitches of notes on such a
2752 staff are squashed, and the staff itself has a single line:
2754 @lilypond[fragment,relative,verbatim]
2755 \context RhythmicStaff {
2757 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2762 * Percussion staves::
2763 * Percussion MIDI output::
2766 @node Percussion staves
2767 @subsection Percussion staves
2771 A percussion part for more than one instrument typically uses a
2772 multiline staff where each position in the staff refers to one piece
2777 Percussion staves are typeset with help of a set of Scheme
2778 functions. The system is based on the general MIDI drum-pitches.
2779 Include @file{drumpitch-init.ly} to use drum pitches. This file
2780 defines the pitches from the Scheme variable @code{drum-pitch-names},
2781 the definition of which can be read in @file{scm/drums.scm}. Each
2782 piece of percussion has a full name and an abbreviated name, and either
2783 the full name or the abbreviation may be used in input files.
2785 To typeset the music on a staff apply the function @code{drums->paper}
2786 to the percussion music. This function takes a list of percussion
2787 instrument names, notehead scripts and staff positions (that is:
2788 pitches relative to the C-clef) and transforms the input
2789 music by moving the pitch, changing the notehead and (optionally)
2792 @lilypond[singleline,verbatim,quote]
2793 \include "drumpitch-init.ly"
2794 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2795 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2797 \apply #(drums->paper 'drums) \context Staff <<
2799 \new Voice { \voiceOne \up }
2800 \new Voice { \voiceTwo \down }
2805 In the above example the music was transformed using the list @code{'drums}.
2806 The following lists are defined in @file{scm/drums.scm}:
2809 to typeset a typical drum kit on a five-line staff:
2812 \include "drumpitch-init.ly"
2813 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2814 bd sn ss tomh tommh tomml toml tomfh tomfl }
2815 mus = \notes { cymc cyms cymr hh hhc hho hhho hhp cb hc
2816 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2819 \apply #(drums->paper 'drums) \context Staff <<
2823 \context Lyrics \nam
2826 linewidth = 100.0\mm
2829 \remove Bar_engraver
2830 \remove Time_signature_engraver
2831 minimumVerticalExtent = #'(-4.0 . 5.0)
2835 \remove Stem_engraver
2841 The drum scheme supports six different toms. When there fewer toms, simply
2842 select the toms that produce the desired result, i.e. to get toms on
2843 the three middle lines you use @code{tommh}, @code{tomml} and
2846 Because general MIDI does not contain rimshots the sidestick is used
2847 for this purpose instead.
2849 to typeset timbales on a two line staff:
2851 @lilypond[singleline]
2852 \include "drumpitch-init.ly"
2853 nam = \lyrics { timh ssh timl ssl cb }
2854 mus = \notes { timh ssh timl ssl cb s16 }
2857 \apply #(drums->paper 'timbales) \context Staff <<
2861 \context Lyrics \nam
2866 \remove Bar_engraver
2867 \remove Time_signature_engraver
2868 StaffSymbol \override #'line-count = #2
2869 StaffSymbol \override #'staff-space = #2
2870 minimumVerticalExtent = #'(-3.0 . 4.0)
2874 \remove Stem_engraver
2881 to typeset congas on a two line staff:
2883 @lilypond[singleline]
2884 \include "drumpitch-init.ly"
2885 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2886 mus = \notes { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2889 \apply #(drums->paper 'congas) \context Staff <<
2893 \context Lyrics \nam
2898 \remove Bar_engraver
2899 \remove Time_signature_engraver
2900 StaffSymbol \override #'line-count = #2
2901 StaffSymbol \override #'staff-space = #2
2902 minimumVerticalExtent = #'(-3.0 . 4.0)
2906 \remove Stem_engraver
2912 to typeset bongos on a two line staff:
2914 @lilypond[singleline]
2915 \include "drumpitch-init.ly"
2916 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2917 mus = \notes { boh boho bohm ssh bol bolo bolm ssl s16 }
2920 \apply #(drums->paper 'bongos) \context Staff <<
2924 \context Lyrics \nam
2929 \remove Bar_engraver
2930 \remove Time_signature_engraver
2931 StaffSymbol \override #'line-count = #2
2932 StaffSymbol \override #'staff-space = #2
2933 minimumVerticalExtent = #'(-3.0 . 4.0)
2937 \remove Stem_engraver
2943 to typeset all kinds of simple percussion on one line staves:
2944 @lilypond[singleline]
2945 \include "drumpitch-init.ly"
2946 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2947 mus = \notes { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2950 \apply #(drums->paper 'percussion) \context Staff <<
2954 \context Lyrics \nam
2959 \remove Bar_engraver
2960 \remove Time_signature_engraver
2961 StaffSymbol \override #'line-count = #1
2962 minimumVerticalExtent = #'(-2.0 . 3.0)
2966 \remove Stem_engraver
2973 If you do not like any of the predefined lists you can define your own
2974 list at the top of your file:
2976 @lilypond[singleline, verbatim]
2977 #(set-drum-kit 'mydrums `(
2978 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2979 (snare default #f ,(ly:make-pitch 0 1 0))
2980 (hihat cross #f ,(ly:make-pitch 0 5 0))
2981 (pedalhihat xcircle "stopped" ,(ly:make-pitch 0 5 0))
2982 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2984 \include "drumpitch-init.ly"
2985 up = \notes { hh8 hh hh hh hhp4 hhp }
2986 down = \notes { bd4 sn bd toml8 toml }
2988 \apply #(drums->paper 'mydrums) \context Staff <<
2990 \new Voice { \voiceOne \up }
2991 \new Voice { \voiceTwo \down }
2996 To use a modified existing list, one can prepend modifications to the
3000 #(set-drum-kit 'mydrums (append `(
3001 (bassdrum default #f ,(ly:make-pitch -1 2 0))
3002 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
3003 ) (get-drum-kit 'drums)))
3006 You can easily combine percussion notation with pitched notation.
3007 Indeed, the file @file{drumpitch-init.ly} replaces the normal pitch
3008 names, so you will have to reinclude @file{nederlands.ly} after the
3009 drum-pattern-definitions to enter normal notes:
3011 @lilypond[singleline,verbatim]
3012 \include "drumpitch-init.ly"
3013 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
3014 down = \notes { bassdrum4 snare8 bd r bd sn4 }
3015 \include "nederlands.ly"
3016 bass = \notes \transpose c c,, { a4. e8 r e g e }
3019 \apply #(drums->paper 'drums) \new Staff <<
3021 \new Voice { \voiceOne \up }
3022 \new Voice { \voiceTwo \down }
3024 \new Staff { \clef "F_8" \bass }
3029 @node Percussion MIDI output
3030 @subsection Percussion MIDI output
3032 In order to produce correct MIDI output you need to produce two score
3033 blocks---one for the paper and one for the MIDI output. To use the
3034 percussion channel you set the property @code{instrument} to
3035 @code{'drums}. Because the drum-pitches themselves are similar to the
3036 general MIDI pitches all you have to do is to insert the voices with
3037 none of the scheme functions to get the correct MIDI output:
3041 \apply #(drums->paper 'mydrums) \context Staff <<
3050 \property Staff.instrument = #'drums
3060 Chords entered with @code{< @dots{} >} do not work. This scheme is a
3061 temporary implementation.
3065 @section Piano music
3067 Piano staves are two normal staves coupled with a brace. The staves
3068 are largely independent, but sometimes voices can cross between the
3069 two staves. The same notation is also used for harps and other key
3070 instruments. The @internalsref{PianoStaff} is especially built to
3071 handle this cross-staffing behavior. In this section we discuss the
3072 @internalsref{PianoStaff} and some other pianistic peculiarities.
3076 * Automatic staff changes::
3077 * Manual staff switches::
3080 * Staff switch lines::
3085 There is no support for putting chords across staves. You can get
3086 this result by increasing the length of the stem in the lower stave so
3087 it reaches the stem in the upper stave, or vice versa. An example is
3088 included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
3090 Dynamics are not centered, but kludges do exist. See
3091 @inputfileref{input/template,piano-dynamics.ly}.
3093 @cindex cross staff stem
3094 @cindex stem, cross staff
3097 @c fixme: should have hyperlinks as well.
3103 @node Automatic staff changes
3104 @subsection Automatic staff changes
3105 @cindex Automatic staff changes
3107 Voices can switch automatically between the top and the bottom
3108 staff. The syntax for this is
3110 \autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
3112 The two staffs of the piano staff must be named @code{up} and
3115 The autochanger switches on basis of pitch (central C is the turning
3116 point), and it looks ahead skipping over rests to switch in
3117 advance. Here is a practical example:
3119 @lilypond[verbatim,singleline,quote]
3120 \score { \notes \context PianoStaff <<
3121 \context Staff = "up" {
3122 \autochange Staff \context Voice = VA << \relative c' {
3123 g4 a b c d r4 a g } >> }
3124 \context Staff = "down" {
3131 In this example, spacer rests are used to prevent the bottom staff from
3132 terminating too soon.
3137 @internalsref{AutoChangeMusic}.
3141 The staff switches often do not end up in optimal places. For high
3142 quality output, staff switches should be specified manually.
3145 @node Manual staff switches
3146 @subsection Manual staff switches
3148 @cindex manual staff switches
3149 @cindex staff switch, manual
3151 Voices can be switched between staves manually, using the following command:
3153 \change Staff = @var{staffname} @var{music}
3157 The string @var{staffname} is the name of the staff. It switches the
3158 current voice from its current staff to the Staff called
3159 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3168 Pianos have pedals that alter the way sound are produced. Generally, a
3169 piano has three pedals, sustain, una corda, and sostenuto.
3173 Piano pedal instruction can be expressed by attaching
3174 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3175 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3178 @lilypond[fragment,verbatim]
3179 c'4\sustainDown c'4\sustainUp
3182 What is printed can be modified by setting @code{pedal@var{X}Strings},
3183 where @var{X} is one of the pedal types: @code{Sustain},
3184 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3185 documentation of @internalsref{SustainPedal} for more information.
3187 Pedals can also be indicated by a sequence of brackets, by setting the
3188 @code{pedalSustainStyle} property to @code{bracket} objects:
3190 @lilypond[fragment,verbatim]
3191 \property Staff.pedalSustainStyle = #'bracket
3192 c''4\sustainDown d''4 e''4
3193 a'4\sustainUp\sustainDown
3194 f'4 g'4 a'4\sustainUp
3197 A third style of pedal notation is a mixture of text and brackets,
3198 obtained by setting @code{pedal-type} to @code{mixed}:
3200 @lilypond[fragment,verbatim]
3201 \property Staff.pedalSustainStyle = #'mixed
3202 c''4\sustainDown d''4 e''4
3203 c'4\sustainUp\sustainDown
3204 f'4 g'4 a'4\sustainUp
3207 The default `*Ped' style for sustain and damper pedals corresponds to
3208 @code{\pedal-type = #'text}. However, @code{mixed} is the default style
3209 for a sostenuto pedal:
3211 @lilypond[fragment,verbatim]
3212 c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
3215 For fine-tuning of the appearance of a pedal bracket, the properties
3216 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3217 @code{PianoPedalBracket} objects (see
3218 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3219 bracket may be extended to the end of the note head:
3221 @lilypond[fragment,verbatim]
3222 \property Staff.PianoPedalBracket \override
3223 #'shorten-pair = #'(0 . -1.0)
3224 c''4\sostenutoDown d''4 e''4 c'4
3225 f'4 g'4 a'4\sostenutoUp
3229 @subsection Arpeggio
3232 @cindex broken arpeggio
3233 @cindex @code{\arpeggio}
3235 You can specify an arpeggio sign on a chord by attaching an
3236 @code{\arpeggio} to a chord:
3239 @lilypond[fragment,relative,verbatim]
3243 When an arpeggio crosses staves, you attach an arpeggio to the chords
3244 in both staves, and set
3245 @internalsref{PianoStaff}.@code{connectArpeggios}:
3247 @lilypond[fragment,relative,verbatim]
3248 \context PianoStaff <<
3249 \property PianoStaff.connectArpeggios = ##t
3250 \new Staff { <c' e g c>\arpeggio }
3251 \new Staff { \clef bass <c,, e g>\arpeggio }
3255 The direction of the arpeggio is sometimes denoted by adding an
3256 arrowhead to the wiggly line. This can be typeset by setting
3257 @code{arpeggio-direction}:
3259 @lilypond[fragment,relative,verbatim]
3261 \property Voice.Arpeggio \set #'arpeggio-direction = #1
3263 \property Voice.Arpeggio \set #'arpeggio-direction = #-1
3268 A square bracket on the left indicates that the player should not
3269 arpeggiate the chord. To draw these brackets, set the
3270 @code{molecule-callback} property of @code{Arpeggio} or
3271 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
3272 @code{\arpeggio} statements within the chords as before:
3274 @lilypond[fragment,relative,verbatim]
3275 \property PianoStaff.Arpeggio \override
3276 #'molecule-callback = \arpeggioBracket
3282 @cindex @code{\arpeggioBracket}
3283 @code{\arpeggioBracket},
3284 @cindex @code{\arpeggio}
3289 @internalsref{ArpeggioEvent} music expressions lead to
3290 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3291 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3295 It is not possible to mix connected arpeggios and unconnected
3296 arpeggios in one @internalsref{PianoStaff} at the same time.
3298 @node Staff switch lines
3299 @subsection Staff switch lines
3302 @cindex follow voice
3303 @cindex staff switching
3306 @cindex @code{followVoice}
3308 Whenever a voice switches to another staff a line connecting the notes
3309 can be printed automatically. This is enabled if the property
3310 @code{PianoStaff.followVoice} is set to true:
3312 @lilypond[fragment,relative,verbatim]
3313 \context PianoStaff <<
3314 \property PianoStaff.followVoice = ##t
3315 \context Staff \context Voice {
3320 \context Staff=two { \clef bass \skip 1*2 }
3324 The associated object is @internalsref{VoiceFollower}.
3328 @cindex @code{\showStaffSwitch}
3329 @code{\showStaffSwitch},
3330 @cindex @code{\hideStaffSwitch}
3331 @code{\hideStaffSwitch}.
3335 @section Vocal music
3337 This section discusses how to enter and print lyrics.
3341 * The Lyrics context::
3346 @node Entering lyrics
3347 @subsection Entering lyrics
3351 @cindex @code{\lyrics}
3354 Lyrics are entered in a special input mode. This mode is is introduced
3355 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3356 punctuation and accents without any hassle. Syllables are entered like
3357 notes, but with pitches replaced by text. For example,
3359 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3362 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3363 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3364 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3365 any 8-bit character with ASCII code over 127, or a two-character
3366 combination of a backslash followed by one of @code{`}, @code{'},
3367 @code{"}, or @code{^}.
3369 Subsequent characters of a word can be any character that is not a digit
3370 and not white space. One important consequence of this is that a word
3371 can end with @code{@}}. The following example is usually a bug. The
3372 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3374 \lyrics @{ twinkle@}
3377 @cindex @code{\property}, in @code{\lyrics}
3378 Similarly, a period following a alphabetic sequence, is included in the
3379 resulting string. As a consequence, spaces must be inserted around
3380 @code{\property} commands:
3382 \property Lyrics . LyricText \set #'font-shape = #'italic
3386 @cindex spaces, in lyrics
3387 @cindex quotes, in lyrics
3389 Any @code{_} character which appears in an unquoted word is converted
3390 to a space. This provides a mechanism for introducing spaces into words
3391 without using quotes. Quoted words can also be used in Lyrics mode to
3392 specify words that cannot be written with the above rules:
3395 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3399 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3404 These will be attached to the end of the first syllable.
3406 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3407 as a separate word between syllables. The hyphen will have variable
3408 length depending on the space between the syllables and it will be
3409 centered between the syllables.
3414 When a lyric is sung over many notes (this is called a melisma), this is
3415 indicated with a horizontal line centered between a syllable and the
3416 next one. Such a line is called an extender line, and it is entered as
3421 @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3422 @internalsref{ExtenderEvent}.
3426 The definition of lyrics mode is too complex.
3428 @node The Lyrics context
3429 @subsection The Lyrics context
3431 Lyrics are printed by interpreting them in @internalsref{Lyrics} context:
3433 \context Lyrics \lyrics @dots{}
3436 @cindex automatic syllable durations
3437 @cindex @code{\addlyrics}
3438 @cindex lyrics and melodies
3440 This will place the lyrics according to the durations that were
3441 entered. The lyrics can also be aligned under a given melody
3442 automatically. In this case, it is no longer necessary to enter the
3443 correct duration for each syllable. This is achieved by combining the
3444 melody and the lyrics with the @code{\addlyrics} expression:
3448 \context Lyrics @dots{}
3451 @cindex staff order, with @code{\addlyrics}
3453 Normally, this will put the lyrics below the staff. For different or
3454 more complex orderings, the best way is to setup the hierarchy of
3455 staves and lyrics first, e.g.
3457 \context ChoirStaff \notes <<
3458 \context Lyrics = sopr @{ s1 @}
3459 \context Staff = soprStaff @{ s1 @}
3460 \context Lyrics = tenor @{ s1 @}
3461 \context Staff = tenorStaff @{ s1 @}
3464 and then combine the appropriate melodies and lyric lines:
3467 \context Staff = soprStaff @emph{the music}
3468 \context Lyrics = sopr @emph{the lyrics}
3471 putting both together, you would get
3473 \context ChoirStaff \notes <<
3474 \context Lyrics = @dots{}
3475 \context Staff = @dots{}
3481 @cindex choral score
3483 A complete example of a SATB score setup is in the file
3484 @inputfileref{input/template,satb.ly}.
3488 @internalsref{LyricCombineMusic}, @internalsref{Lyrics}, and
3489 @inputfileref{input/template,satb.ly}.
3493 @code{\addlyrics} is not automatic enough: melismata are not detected
3494 automatically, and melismata are not stopped when they hit a rest. A
3495 melisma on the last note in a melody is not printed.
3499 @subsection More stanzas
3502 @cindex phrasing, in lyrics
3505 The lyrics should be aligned with the note heads of the melody. To
3506 achieve this, each line of lyrics should be marked to correspond with
3509 To this end, give the @internalsref{Voice} context an identity:
3511 \context Voice = duet @{
3516 Then set the @internalsref{LyricsVoice} contexts to names starting with
3517 that identity followed by a dash. In the preceding example, the
3518 @internalsref{Voice} identity is @code{duet}, so the identities of the
3519 @internalsref{LyricsVoice}s are marked @code{duet-1} and @code{duet-2}:
3521 \context LyricsVoice = "duet-1" @{
3522 Hi, my name is bert. @}
3523 \context LyricsVoice = "duet-2" @{
3524 Ooooo, ch\'e -- ri, je t'aime. @}
3527 The complete example is shown here:
3528 @lilypond[singleline,verbatim]
3531 \notes \relative c'' \context Voice = duet { \time 3/4
3533 \lyrics \context Lyrics <<
3534 \context LyricsVoice = "duet-1" {
3535 \property LyricsVoice . stanza = "Bert"
3536 Hi, my name is bert. }
3537 \context LyricsVoice = "duet-2" {
3538 \property LyricsVoice . stanza = "Ernie"
3539 Ooooo, ch\'e -- ri, je t'aime. }
3544 @cindex stanza number
3545 @cindex singer's names
3546 @cindex name of singer
3548 Stanza numbers can be added by setting @code{LyricsVoice.stanza}, e.g.
3551 \property LyricsVoice . stanza = "Bert"
3553 \property LyricsVoice . stanza = "Ernie"
3556 Notice how dots are surrounded with spaces in @code{\lyrics} mode, to
3557 prevent @code{LyricsVoice.stanza} being interpreted as a single
3560 Names of the singers should be added using @code{LyricsVoice
3561 . instrument} and @code{LyricsVoice . instr}, analogous to instrument
3562 annotations for staves.
3564 To make empty spaces in lyrics, use @code{\skip}.
3572 Input for lyrics introduces a syntactical ambiguity:
3579 is interpreted as assigning a string identifier @code{\foo} such that
3580 it contains @code{"bar"}. However, it could also be interpreted as
3581 making or a music identifier @code{\foo} containing the syllable
3582 `bar'. The force the latter interpretation, use
3592 The term @emph{ambitus} (plural: ambituses) denotes a range of pitches
3593 for a given voice in a part of music. It also may denote the pitch
3594 range that a musical instrument is capable of playing. Most musical
3595 instruments have their ambitus standardized (or at least there is
3596 agreement upon the minimal ambitus of a particular type of
3597 instrument), such that a composer or arranger of a piece of music can
3598 easily meet the ambitus constraints of the targeted instrument.
3599 However, the ambitus of the human voice depends on individual
3600 physiological state, including education and training of the voice.
3601 Therefore, a singer potentially has to check for each piece of music
3602 if the ambitus of that piece meets his individual capabilities. This
3603 is why the ambitus of a piece may be of particular value to vocal
3606 The ambitus is typically notated on a per-voice basis at the very
3607 beginning of a piece, e.g. nearby the initial clef or time signature of
3608 each staff. The range is graphically specified by two noteheads, that
3609 represent the minimum and maximum pitch. Some publishers use a textual
3610 notation: they put the range in words in front of the corresponding
3611 staff. LilyPond only supports the graphical ambitus notation.
3613 To apply, add the @internalsref{Ambitus_engraver} to the
3614 @internalsref{Voice} context, i.e.
3620 \consists Ambitus_engraver
3625 This results in the following output:
3626 @lilypond[singleline]
3627 upper = \notes \relative c {
3630 as'' c e2 bes f cis d4 e f2 g
3632 lower = \notes \relative c {
3635 e'4 b g a c es fis a cis b a g f e d2
3638 \context ChoirStaff {
3640 \new Staff { \upper }
3641 \new Staff { \lower }
3647 \consists Ambitus_engraver
3653 If you have multiple voices in a single staff, and you want a single
3654 ambitus per staff rather than per each voice, then add the
3655 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3656 rather than to the @internalsref{Voice} context.
3658 It is possible to tune individual ambituses for multiple voices on a
3659 single staff, for example by erasing or shifting them horizontally. An
3660 example is in @inputfileref{input/test,ambitus-mixed.ly}
3664 @internalsref{Ambitus}, @inputfileref{input/regression,ambitus.ly},
3665 @inputfileref{input/test,ambitus-mixed.ly}.
3669 There is no collision handling in the case of multiple per-voice
3675 Tablature notation is used for notating music for plucked string
3676 instruments. It notates pitches not by using note heads, but by
3677 indicating on which string and fret a note must be played. LilyPond
3678 offers limited support for tablature.
3681 * Tablatures basic::
3682 * Non-guitar tablatures::
3685 @node Tablatures basic
3686 @subsection Tablatures basic
3687 @cindex Tablatures basic
3689 The string number associated to a note is given as a backslash
3690 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3691 string. By default, string 1 is the highest one, and the tuning
3692 defaults to the standard guitar tuning (with 6 strings). The notes
3693 are printed as tablature, by using @internalsref{TabStaff} and
3694 @internalsref{TabVoice} contexts:
3696 @lilypond[fragment,verbatim]
3697 \notes \context TabStaff {
3703 When no string is specified, the first string that does not give a
3704 fret number less than @code{minimumFret} is selected. The default
3705 value for @code{minimumFret} is 0:
3709 e8 fis gis a b cis' dis' e'
3710 \property TabStaff.minimumFret = #8
3711 e8 fis gis a b cis' dis' e'
3716 e8 fis gis a b cis' dis' e'
3717 \property TabStaff.minimumFret = #8
3718 e8 fis gis a b cis' dis' e'
3721 \context StaffGroup <<
3722 \context Staff { \clef "G_8" \frag }
3723 \context TabStaff { \frag }
3730 @internalsref{TabStaff}, @internalsref{TabVoice}, and
3731 @internalsref{StringNumberEvent}.
3735 Chords are not handled in a special way, and hence the automatic
3736 string selector may easily select the same string to two notes in a
3740 @node Non-guitar tablatures
3741 @subsection Non-guitar tablatures
3742 @cindex Non-guitar tablatures
3744 You can change the number of strings, by setting the number of lines
3745 in the @internalsref{TabStaff}.
3747 You can change the tuning of the strings. A string tuning is given as
3748 a Scheme list with one integer number for each string, the number
3749 being the pitch (measured in semitones relative to central C) of an
3750 open string. The numbers specified for @code{stringTuning} are the
3751 numbers of semitones to subtract or add, starting the specified pitch
3752 by default middle C, in string order. Thus, the notes are e, a, d, and
3755 @lilypond[fragment,verbatim]
3756 \context TabStaff <<
3757 \property TabStaff.stringTunings = #'(-5 -10 -15 -20)
3760 a,4 c' a e' e c' a e'
3765 It is possible to change the Scheme function to format the tablature
3766 note text. The default is @code{fret-number-tablature-format}, which
3767 uses the fret number. For instruments that do not use this notation,
3768 you can create a special tablature formatting function. This function
3769 takes three argument: string number, string tuning and note pitch.
3773 No guitar special effects have been implemented.
3778 @section Chord names
3781 LilyPond has support for both printing chord names. Chords may be
3782 entered in musical chord notation, i.e. @code{< .. >}, but they can
3783 also be entered by name. Internally, the chords are represented as a
3784 set of pitches, so they can be transposed:
3787 @lilypond[verbatim,singleline]
3788 twoWays = \notes \transpose c c' {
3798 << \context ChordNames \twoWays
3799 \context Voice \twoWays >> }
3802 This example also shows that the chord printing routines do not try to
3803 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3809 * Printing chord names::
3814 @subsection Chords mode
3817 Chord mode is a mode where you can input sets of pitches using common
3818 names. It is introduced by the keyword @code{\chords}.
3819 In chords mode, a chord is entered by the root, which is entered
3820 like a common pitch:
3821 @lilypond[fragment,verbatim,quote, relative=1]
3822 \chords { es4. d8 c2 }
3827 Other chords may be entered by suffixing a colon, and introducing a
3828 modifier, and optionally, a number:
3830 @lilypond[fragment,verbatim,quote]
3831 \chords { e1:m e1:7 e1:m7 }
3833 The first number following the root is taken to be the `type' of the
3834 chord, thirds are added to the root until it reaches the specified
3836 @lilypond[fragment,verbatim]
3837 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3840 @cindex root of chord
3841 @cindex additions, in chords
3842 @cindex removals, in chords
3844 More complex chords may also be constructed adding separate steps
3845 to a chord. Additions are added after the number following
3846 the colon, and are separated by dots:
3848 @lilypond[verbatim,fragment,quote]
3849 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3851 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3853 @lilypond[verbatim,fragment,quote]
3854 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3856 Removals are specified similarly, and are introduced by a caret. They
3857 must come after the additions:
3858 @lilypond[verbatim,fragment]
3859 \chords { c^3 c:7^5 c:9^3.5 }
3862 Modifiers can be used to change pitches. The following modifiers are
3866 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3868 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3871 is the augmented chord. This modifier raises the 5th step.
3873 is the major 7th chord. This modifier raises the 7th step if present.
3875 is the suspended 4th or 2nd. This modifier removes the 3rd
3876 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3879 Modifiers can be mixed with additions:
3880 @lilypond[verbatim,fragment]
3881 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3884 @cindex modifiers, in chords.
3891 Since an unaltered 11 does not sound good when combined with an
3892 unaltered 13, the 11 is removed in this case (unless it is added
3895 @lilypond[fragment,verbatim]
3896 \chords { c:13 c:13.11 c:m13 }
3901 An inversion (putting one pitch of the chord on the bottom), as well
3902 as bass notes, can be specified by appending
3903 @code{/}@var{pitch} to the chord:
3904 @lilypond[fragment,verbatim,center]
3905 \chords { c1 c/g c/f }
3909 A bass note can be added instead of transposed out of the chord,
3910 by using @code{/+}@var{pitch}.
3912 @lilypond[fragment,verbatim,center]
3913 \chords { c1 c/+g c/+f }
3916 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3917 of the commands continue to work, for example, @code{r} and
3918 @code{\skip} can be used to insert rests and spaces, and
3919 @code{\property} may be used to change various settings.
3925 Each step can only be present in a chord once. The following
3926 simply produces the augmented chord, since @code{5+} is interpreted
3929 @lilypond[verbatim,fragment]
3930 \chords { c:5.5-.5+ }
3934 @node Printing chord names
3935 @subsection Printing chord names
3937 @cindex printing chord names
3941 For displaying printed chord names, use the @internalsref{ChordNames} context.
3942 The chords may be entered either using the notation
3943 described above, or directly using @code{<} and @code{>}:
3945 @lilypond[verbatim,singleline]
3947 \chords {a1 b c} <d' f' a'> <e' g' b'>
3951 \context ChordNames \scheme
3952 \context Staff \scheme
3957 You can make the chord changes stand out by setting
3958 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3959 display chord names when there is a change in the chords scheme and at
3960 the start of a new line:
3962 @lilypond[verbatim, linewidth=9cm]
3964 c1:m c:m \break c:m c:m d
3968 \context ChordNames {
3969 \property ChordNames.chordChanges = ##t
3971 \context Staff \transpose c c' \scheme
3976 The default chord name layout is a system for Jazz music, proposed by
3977 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
3978 following properties:
3981 @cindex chordNameExceptions
3982 @item chordNameExceptions
3983 This is a list that contains the chords that have special formatting.
3985 @inputfileref{input/regression,chord-name-exceptions.ly}.
3986 @cindex exceptions, chord names.
3989 @cindex majorSevenSymbol
3990 @item majorSevenSymbol
3991 This property contains the markup object used for the 7th step, when
3992 it is major. Predefined options are @code{whiteTriangleMarkup} and
3993 @code{blackTriangleMarkup}. See
3994 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3996 @cindex chordNameSeparator
3997 @item chordNameSeparator
3998 Different parts of a chord name are normally separated by a
3999 slash. By setting @code{chordNameSeparator}, you can specify other
4001 @lilypond[fragment,verbatim]
4002 \context ChordNames \chords {
4004 \property ChordNames.chordNameSeparator
4005 = \markup { \typewriter "|" }
4009 @cindex chordRootNamer
4010 @item chordRootNamer
4011 The root of a chord is usually printed as a letter with an optional
4012 alteration. The transformation from pitch to letter is done by this
4013 function. Special note names (for example, the German ``H'' for a
4014 B-chord) can be produced by storing a new function in this property.
4016 The pre-defined variables @code{\germanChords},
4017 @code{\semiGermanChords} set these variables.
4020 @cindex chordNoteNamer
4021 @item chordNoteNamer
4022 The default is to print single pitch, e.g. the bass note, using the
4023 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4024 to a specialized function to change this behavior. For example, the
4025 base can be printed in lower case.
4030 There are also two other chord name schemes implemented: an alternate
4031 Jazz chord notation, and a systematic scheme called Banter chords. The
4032 alternate jazz notation is also shown on the chart in @ref{Chord name
4033 chart}. Turning on these styles is described in the input file
4034 @inputfileref{input/test,chord-names-jazz.ly}.
4038 @cindex chords, jazz
4043 @cindex @code{\germanChords}
4044 @code{\germanChords},
4045 @cindex @code{\semiGermanChords}
4046 @code{\semiGermanChords}.
4053 @inputfileref{input/regression,chord-name-major7.ly},
4054 @inputfileref{input/regression,chord-name-exceptions.ly},
4055 @inputfileref{input/test,chord-names-jazz.ly},
4056 @inputfileref{input/test,chord-names-german.ly},
4057 @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4062 Chord names are determined solely from the list of pitches. Chord
4063 inversions are not identified, and neither are added bass notes. This
4064 may result in strange chord names when chords are entered with the
4065 @code{< .. >} syntax.
4070 @node Orchestral music
4071 @section Orchestral music
4073 @cindex Writing parts
4075 Orchestral music involves some special notation, both in the full
4076 score and the individual parts. This section explains how to tackle
4077 some common problems in orchestral music.
4082 * Multiple staff contexts::
4085 * Instrument names::
4087 * Multi measure rests::
4088 * Automatic part combining::
4090 * Different editions from one source::
4091 * Sound output for transposing instruments::
4094 @node Multiple staff contexts
4095 @subsection Multiple staff contexts
4097 Polyphonic scores consist of many staves. These staves can be
4098 constructed in three different ways:
4100 @item The group is started with a brace at the left. This is done with the
4101 @internalsref{GrandStaff} context.
4102 @item The group is started with a bracket. This is done with the
4103 @internalsref{StaffGroup} context
4104 @item The group is started with a vertical line. This is the default
4108 @cindex Staff, multiple
4109 @cindex bracket, vertical
4110 @cindex brace, vertical
4117 @node Rehearsal marks
4118 @subsection Rehearsal marks
4119 @cindex Rehearsal marks
4121 @cindex @code{\mark}
4123 To print a rehearsal mark, use the @code{\mark} command:
4124 @lilypond[fragment,verbatim]
4134 The mark is incremented automatically if you use @code{\mark
4135 \default}. The value to use is stored in the property
4136 @code{rehearsalMark} is used and automatically incremented.
4138 The @code{\mark} command can also be used to put signs like coda,
4139 segno and fermatas on a barline. Use @code{\markup} to
4140 to access the appropriate symbol:
4142 @lilypond[fragment,verbatim,relative=1]
4143 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4147 In this case, during line breaks,
4148 marks must also be printed at the end of the line, and not at the
4149 beginning. Use the following to force that behavior:
4151 \property Score.RehearsalMark \override
4152 #'break-visibility = #begin-of-line-invisible
4155 See @inputfileref{input/test,boxed-molecule.ly} for putting boxes
4161 @cindex barlines, putting symbols on
4165 @internalsref{MarkEvent}, @internalsref{RehearsalMark}, and
4166 @inputfileref{input/test,boxed-molecule.ly}.
4170 @subsection Bar numbers
4174 @cindex measure numbers
4175 @cindex currentBarNumber
4177 Bar numbers are printed by default at the start of the line. The
4178 number itself is stored in the
4179 @code{currentBarNumber} property,
4180 which is normally updated automatically for every measure.
4182 Bar numbers can be typeset at regular intervals instead of at the
4183 beginning of each line. This is illustrated in the following example,
4184 whose source is available as
4185 @inputfileref{input/test,bar-number-regular-interval.ly}:
4187 @lilypondfile[notexidoc]{bar-number-regular-interval.ly}
4192 @internalsref{BarNumber},
4193 @inputfileref{input/test,bar-number-every-five-reset.ly}, and
4194 @inputfileref{input/test,bar-number-regular-interval.ly}.
4198 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4199 there is one at the top. To solve this, the
4200 @code{padding} property of @internalsref{BarNumber} can be
4201 used to position the number correctly.
4203 @node Instrument names
4204 @subsection Instrument names
4206 In an orchestral score, instrument names are printed left side of the
4209 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4210 and @internalsref{Staff}.@code{instr}. This will print a string before
4211 the start of the staff. For the first start, @code{instrument} is
4212 used, for the next ones @code{instr} is used:
4215 @lilypond[verbatim,singleline]
4216 \property Staff.instrument = "ploink " { c''4 }
4220 You can also use markup texts to construct more complicated instrument
4224 @lilypond[fragment,verbatim,singleline]
4226 \property Staff.instrument = \markup {
4227 \column < "Clarinetti"
4229 \smaller \musicglyph #"accidentals--1"
4240 @internalsref{InstrumentName}.
4244 When you put a name on a grand staff or piano staff the width of the
4245 brace is not taken into account. You must add extra spaces to the end of
4246 the name to avoid a collision.
4249 @subsection Transpose
4251 @cindex transposition of pitches
4252 @cindex @code{\transpose}
4254 A music expression can be transposed with @code{\transpose}. The syntax
4257 \transpose @var{from} @var{to} @var{musicexpr}
4260 This means that @var{musicexpr} is transposed by the interval
4261 between @var{from} and @var{to}.
4263 @code{\transpose} distinguishes between enharmonic pitches: both
4264 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4265 half a tone. The first version will print sharps and the second
4266 version will print flats:
4268 @lilypond[singleline, verbatim]
4269 mus =\notes { \key d \major cis d fis g }
4270 \score { \notes \context Staff {
4273 \transpose c g' \mus
4274 \transpose c f' \mus
4280 @internalsref{TransposedMusic}, and @internalsref{UntransposableMusic}.
4284 If you want to use both @code{\transpose} and @code{\relative}, then
4285 you must put @code{\transpose} outside of @code{\relative}, since
4286 @code{\relative} will have no effect music that appears inside a
4292 @node Multi measure rests
4293 @subsection Multi measure rests
4294 @cindex multi measure rests
4295 @cindex Rests, multi measure
4299 Multi measure rests are entered using `@code{R}'. It is specifically
4300 meant for full bar rests and for entering parts: the rest can expand
4301 to fill a score with rests, or it can be printed as a single
4302 multimeasure rest. This expansion is controlled by the property
4303 @code{Score.skipBars}. If this is set to true, empty measures will not
4304 be expanded, and the appropriate number is added automatically:
4306 @lilypond[fragment,verbatim]
4307 \time 4/4 r1 | R1 | R1*2
4308 \property Score.skipBars = ##t R1*17 R1*4
4311 The @code{1} in @code{R1} is similar to the duration notation used for
4312 notes. Hence, for time signatures other than 4/4, you must enter other
4313 durations. This can be done with augmentation dots or fractions:
4315 @lilypond[fragment,verbatim]
4316 \property Score.skipBars = ##t
4324 An @code{R} spanning a single measure is printed as either a whole rest
4325 or a breve, centered in the measure regardless of the time signature.
4327 @cindex text on multi-measure rest
4328 @cindex script on multi-measure rest
4329 @cindex fermata on multi-measure rest
4331 Texts can be added to multi-measure rests by using the
4332 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4333 replaced. If you need both texts and the number, you must add the
4334 number by hand. A variable (@code{\fermataMarkup}) is provided for
4338 @lilypond[verbatim,fragment]
4340 R2._\markup { "Ad lib" }
4344 If you want to have a text on the left end of a multi-measure rest,
4345 attach the text to a zero-length skip note, i.e.
4353 @cindex whole rests for a full measure
4357 @internalsref{MultiMeasureRestEvent},
4358 @internalsref{MultiMeasureTextEvent},
4359 @internalsref{MultiMeasureRestMusicGroup}, and
4360 @internalsref{MultiMeasureRest}.
4362 The layout object @internalsref{MultiMeasureRestNumber} is for the
4363 default number, and @internalsref{MultiMeasureRestText} for user
4368 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4369 over multi-measure rests.
4371 @cindex condensing rests
4373 There is no way to automatically condense multiple rests into a single
4374 multimeasure rest. Multi measure rests do not take part in rest
4377 Be careful when entering multimeasure rests followed by whole
4378 notes. The following will enter two notes lasting four measures each:
4382 When @code{skipBars} is set, then the result will look OK, but the
4383 bar numbering will be off.
4385 @node Automatic part combining
4386 @subsection Automatic part combining
4387 @cindex automatic part combining
4388 @cindex part combiner
4391 Automatic part combining is used to merge two parts of music onto a
4392 staff. It is aimed at typesetting orchestral scores. When the two
4393 parts are identical for a period of time, only one is shown. In
4394 places where the two parts differ, they are typeset as separate
4395 voices, and stem directions are set automatically. Also, solo and
4396 @emph{a due} parts are identified and can be marked.
4400 The syntax for part combining is
4403 \partcombine @var{context} @var{musicexpr1} @var{musicexpr2}
4405 where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
4406 combined into one context of type @var{context}. The music expressions
4407 must be interpreted by contexts whose names should start with @code{one}
4410 The following example demonstrates the basic functionality of the part
4411 combiner: putting parts on one staff, and setting stem directions and
4414 @lilypond[verbatim,singleline,fragment]
4416 \context Voice=one \partcombine Voice
4417 \context Thread=one \relative c'' {
4420 \context Thread=two \relative c'' {
4426 The first @code{g} appears only once, although it was
4427 specified twice (once in each part). Stem, slur and tie directions are
4428 set automatically, depending whether there is a solo or unisono. The
4429 first part (with context called @code{one}) always gets up stems, and
4430 `solo', while the second (called @code{two}) always gets down stems and
4433 If you just want the merging parts, and not the textual markings, you
4434 may set the property @var{soloADue} to false:
4436 @lilypond[verbatim,singleline,fragment]
4438 \property Staff.soloADue = ##f
4439 \context Voice=one \partcombine Voice
4440 \context Thread=one \relative c'' {
4443 \context Thread=two \relative c'' {
4451 @internalsref{PartCombineMusic},
4452 @internalsref{Thread_devnull_engraver}, and
4453 @internalsref{Voice_devnull_engraver} and @internalsref{A2_engraver}.
4457 The syntax for naming contexts in inconsistent with the syntax for
4460 In @code{soloADue} mode, when the two voices play the same notes on and
4461 off, the part combiner may typeset @code{a2} more than once in a
4464 @lilypond[fragment,singleline]
4466 \context Voice=one \partcombine Voice
4467 \context Thread=one \relative c'' {
4470 \context Thread=two \relative c'' {
4476 The part combiner is rather buggy, and it will be replaced by a better
4477 mechanism in the near future.
4479 @cindex @code{Thread_devnull_engraver}
4480 @cindex @code{Voice_engraver}
4481 @cindex @code{A2_engraver}
4484 @subsection Hiding staves
4486 @cindex Frenched scores
4487 @cindex Hiding staves
4489 In orchestral scores, staff lines that only have rests are usually
4490 removed. This saves some space. This style is called `French Score'.
4491 For @internalsref{Lyrics}, @internalsref{LyricsVoice},
4492 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4493 switched on by default. When these line of these contexts turn out
4494 empty after the line-breaking process, they are removed.
4496 For normal staves, a specialized @internalsref{Staff} context is
4497 available, which does the same: staves containing nothing (or only
4498 multi measure rests) are removed. The context definition is stored in
4499 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4500 in this example disappears in the second line:
4505 \notes \relative c' <<
4506 \new Staff { e4 f g a \break c1 }
4507 \new Staff { c4 d e f \break R1 }
4511 \translator { \RemoveEmptyStaffContext }
4516 The first page shows all staffs in full. If they should be removed
4517 from the first page too, set @code{remove-first} to false
4518 in @internalsref{RemoveEmptyVerticalGroup}.
4520 @node Different editions from one source
4521 @subsection Different editions from one source
4523 The @code{\tag} command marks music expressions with a name. These
4524 tagged expressions can be filtered out later. With this mechanism it
4525 is possible to make different versions of the same music source.
4527 In the following example, we see two versions of a piece of music, one
4528 for the full score, and one with cue notes for the instrumental part:
4536 \property Voice.fontSize = #-1
4544 The same can be applied to articulations, texts, etc.: they are
4547 -\tag #@var{your-tag}
4549 to an articulation, for example,
4554 This defines a note with a conditional fingering indication.
4556 By applying the @code{remove-tag} function, tagged expressions can be
4557 filtered. For example,
4561 \apply #(remove-tag 'score) @var{the music}
4562 \apply #(remove-tag 'part) @var{the music}
4567 @lilypondfile[notexidoc]{tag-filter.ly}
4569 The argument of the @code{\tag} command should be a symbol, or a list
4570 of symbols, for example,
4572 \tag #'(original-part transposed-part) @dots{}
4577 @inputfileref{input/regression,tag-filter.ly}
4580 @node Sound output for transposing instruments
4581 @subsection Sound output for transposing instruments
4583 When you want to make a MIDI file from a score containing transposed
4584 and untransposed instruments, you have to instruct LilyPond the pitch
4585 offset (in semitones) for the transposed instruments. This is done
4586 using the @code{transposing} property. It does not affect printed
4589 @cindex @code{transposing}
4592 \property Staff.instrument = #"Cl. in B-flat"
4593 \property Staff.transposing = #-2
4597 @node Ancient notation
4598 @section Ancient notation
4600 @cindex Vaticana, Editio
4601 @cindex Medicaea, Editio
4606 @c [TODO: write more comprehensive introduction on ancient notation]
4608 Support for ancient notation is still under heavy development.
4609 Regardless of all of the current limitations (see the bugs section
4610 below for details), it includes features for mensural
4611 notation and Gregorian Chant notation. There is also limited support
4612 for figured bass notation.
4614 Many graphical objects provide a @code{style} property, see
4615 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4616 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4617 signatures}. By manipulating such a grob property, the typographical
4618 appearance of the affected graphical objects can be accomodated for a
4619 specific notation flavour without need for introducing any new
4623 Other aspects of ancient notation can not that easily be expressed as
4624 in terms of just changing a style property of a graphical object.
4625 Therefore, some notational concepts are introduced specifically for
4626 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4627 @ref{Ligatures}, and @ref{Figured bass}.
4631 * Ancient note heads::
4632 * Ancient accidentals::
4636 * Ancient time signatures::
4641 * Vaticana style contexts::
4644 If this all is way too much of documentation for you, and you just
4645 want to dive into typesetting without worrying too much about the
4646 details on how to customize a context, then you may have a look at the
4647 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4648 set up predefined style-specific voice and staff contexts, and
4649 directly go ahead with the note entry.
4653 Ligatures need special spacing that has not yet been implemented. As
4654 a result, there is too much space between ligatures most of the time,
4655 and line breaking often is unsatisfactory. Also, lyrics do not
4656 correctly align with ligatures.
4658 Accidentals must not be printed within a ligature, but instead need to
4659 be collected and printed in front of it.
4661 Augmentum dots within ligatures are not handled correctly.
4664 @node Ancient note heads
4665 @subsection Ancient note heads
4671 For ancient notation, a note head style other than the @code{default}
4672 style may be chosen. This is accomplished by setting the @code{style}
4673 property of the NoteHead object to the desired value (@code{baroque},
4674 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4675 differs from the @code{default} style only in using a square shape for
4676 @code{\breve} note heads. The @code{neo_mensural} style differs from
4677 the @code{baroque} style in that it uses rhomboidal heads for whole
4678 notes and all smaller durations. Stems are centered on the note
4679 heads. This style is in particular useful when transcribing mensural
4680 music, e.g. for the incipit. The @code{mensural} style finally
4681 produces note heads that mimick the look of note heads in historic
4682 printings of the 16th century.
4684 The following example demonstrates the @code{neo_mensural} style:
4686 @lilypond[fragment,singleline,verbatim]
4687 \property Voice.NoteHead \set #'style = #'neo_mensural
4688 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4691 When typesetting a piece in Gregorian Chant notation, a Gregorian
4692 ligature engraver will automatically select the proper note heads,
4693 such there is no need to explicitly set the note head style. Still,
4694 the note head style can be set e.g. to @code{vaticana_punctum} to
4695 produce punctum neumes. Similarly, a mensural ligature engraver is
4696 used to automatically assemble mensural ligatures. See
4697 @ref{Ligatures} for how ligature engravers work.
4701 @inputfileref{input/regression,note-head-style.ly} gives an overview
4702 over all available note head styles.
4704 @ref{Percussion staves} use note head styles of their own that are
4705 frequently used in contemporary music notation.
4707 @node Ancient accidentals
4708 @subsection Ancient accidentals
4714 Use the @code{style} property of grob @internalsref{Accidental} to
4715 select ancient accidentals. Supported styles are
4716 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4718 @lilypond[singleline,26pt]
4726 { " " \musicglyph #"accidentals-vaticana-1"
4727 " " \musicglyph #"accidentals-vaticana0" }
4731 { " " \musicglyph #"accidentals-medicaea-1" }
4735 { " " \musicglyph #"accidentals-hufnagel-1" }
4739 { " " \musicglyph #"accidentals-mensural-1"
4740 " " \musicglyph #"accidentals-mensural1" }
4749 \remove "Bar_number_engraver"
4753 \remove "Clef_engraver"
4754 \remove "Key_engraver"
4755 \remove "Time_signature_engraver"
4756 \remove "Staff_symbol_engraver"
4757 minimumVerticalExtent = ##f
4763 As shown, not all accidentals are supported by each style. When
4764 trying to access an unsupported accidental, LilyPond will switch to a
4765 different style, as demonstrated in
4766 @inputfileref{input/test,ancient-accidentals.ly}.
4768 Similarly to local accidentals, the style of the key signature can be
4769 controlled by the @code{style} property of the
4770 @internalsref{KeySignature} grob.
4774 @ref{Pitches}, @ref{Chromatic alterations} and @ref{Accidentals} give
4775 a general introduction into the use of accidentals. @ref{Key
4776 signature} gives a general introduction into the use of key
4781 @subsection Ancient rests
4787 Use the @code{style} property of grob @internalsref{Rest} to select
4788 ancient accidentals. Supported styles are @code{classical},
4789 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4790 from the @code{default} style only in that the quarter rest looks like
4791 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4792 well for e.g. the incipit of a transcribed mensural piece of music.
4793 The @code{mensural} style finally mimicks the appearance of rests as
4794 in historic prints of the 16th century.
4796 The following example demonstrates the @code{neo_mensural} style:
4798 @lilypond[fragment,singleline,verbatim]
4799 \property Voice.Rest \set #'style = #'neo_mensural
4800 r\longa r\breve r1 r2 r4 r8 r16
4803 There are no 32th and 64th rests specifically for the mensural or
4804 neo-mensural style. Instead, the rests from the default style will be
4805 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4808 There are no rests in Gregorian Chant notation; instead, it uses
4813 @ref{Rests} gives a general introduction into the use of rests.
4817 @subsection Ancient clefs
4823 LilyPond supports a variety of clefs, many of them ancient.
4825 The following table shows all ancient clefs that are supported via the
4826 @code{\clef} command. Some of the clefs use the same glyph, but
4827 differ only with respect to the line they are printed on. In such
4828 cases, a trailing number in the name is used to enumerate these clefs.
4829 Still, you can manually force a clef glyph to be typeset on an
4830 arbitrary line, as described in @ref{Clef}. The note printed to the
4831 right side of each clef in the example column denotes the @code{c'}
4832 with respect to that clef.
4834 @multitable @columnfractions .3 .3 .3 .1
4838 @b{Description} @tab
4839 @b{Supported Clefs} @tab
4843 @code{clefs-neo_mensural_c} @tab
4844 modern style mensural C clef @tab
4845 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4846 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4847 @lilypond[relative 0, notime]
4848 \property Staff.TimeSignature \set #'transparent = ##t
4849 \clef "neo_mensural_c2" c
4853 @code{clefs-petrucci_c1}
4854 @code{clefs-petrucci_c2}
4855 @code{clefs-petrucci_c3}
4856 @code{clefs-petrucci_c4}
4857 @code{clefs-petrucci_c5}
4860 petrucci style mensural C clefs, for use on different stafflines
4861 (the examples shows the 2nd staffline C clef).
4871 @lilypond[relative 0, notime]
4872 \property Staff.TimeSignature \set #'transparent = ##t
4873 \clef "petrucci_c2" c
4877 @code{clefs-petrucci_f} @tab
4878 petrucci style mensural F clef @tab
4879 @code{petrucci_f} @tab
4880 @lilypond[relative 0, notime]
4881 \property Staff.TimeSignature \set #'transparent = ##t
4882 \clef "petrucci_f" c
4886 @code{clefs-petrucci_g} @tab
4887 petrucci style mensural G clef @tab
4888 @code{petrucci_g} @tab
4889 @lilypond[relative 0, notime]
4890 \property Staff.TimeSignature \set #'transparent = ##t
4891 \clef "petrucci_g" c
4895 @code{clefs-mensural_c} @tab
4896 historic style mensural C clef @tab
4897 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4898 @code{mensural_c4} @tab
4899 @lilypond[relative 0, notime]
4900 \property Staff.TimeSignature \set #'transparent = ##t
4901 \clef "mensural_c2" c
4905 @code{clefs-mensural_f} @tab
4906 historic style mensural F clef @tab
4907 @code{mensural_f} @tab
4908 @lilypond[relative 0, notime]
4909 \property Staff.TimeSignature \set #'transparent = ##t
4910 \clef "mensural_f" c
4914 @code{clefs-mensural_g} @tab
4915 historic style mensural G clef @tab
4916 @code{mensural_g} @tab
4917 @lilypond[relative 0, notime]
4918 \property Staff.TimeSignature \set #'transparent = ##t
4919 \clef "mensural_g" c
4923 @code{clefs-vaticana_do} @tab
4924 Editio Vaticana style do clef @tab
4925 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4926 @lilypond[relative 0, notime]
4927 \property Staff.StaffSymbol \set #'line-count = #4
4928 \property Staff.TimeSignature \set #'transparent = ##t
4929 \clef "vaticana_do2" c
4933 @code{clefs-vaticana_fa} @tab
4934 Editio Vaticana style fa clef @tab
4935 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4936 @lilypond[relative 0, notime]
4937 \property Staff.StaffSymbol \set #'line-count = #4
4938 \property Staff.TimeSignature \set #'transparent = ##t
4939 \clef "vaticana_fa2" c
4943 @code{clefs-medicaea_do} @tab
4944 Editio Medicaea style do clef @tab
4945 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4946 @lilypond[relative 0, notime]
4947 \property Staff.StaffSymbol \set #'line-count = #4
4948 \property Staff.TimeSignature \set #'transparent = ##t
4949 \clef "medicaea_do2" c
4953 @code{clefs-medicaea_fa} @tab
4954 Editio Medicaea style fa clef @tab
4955 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4956 @lilypond[relative 0, notime]
4957 \property Staff.StaffSymbol \set #'line-count = #4
4958 \property Staff.TimeSignature \set #'transparent = ##t
4959 \clef "medicaea_fa2" c
4963 @code{clefs-hufnagel_do} @tab
4964 historic style hufnagel do clef @tab
4965 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
4966 @lilypond[relative 0, notime]
4967 \property Staff.StaffSymbol \set #'line-count = #4
4968 \property Staff.TimeSignature \set #'transparent = ##t
4969 \clef "hufnagel_do2" c
4973 @code{clefs-hufnagel_fa} @tab
4974 historic style hufnagel fa clef @tab
4975 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
4976 @lilypond[relative 0, notime]
4977 \property Staff.StaffSymbol \set #'line-count = #4
4978 \property Staff.TimeSignature \set #'transparent = ##t
4979 \clef "hufnagel_fa2" c
4983 @code{clefs-hufnagel_do_fa} @tab
4984 historic style hufnagel combined do/fa clef @tab
4985 @code{hufnagel_do_fa} @tab
4986 @lilypond[relative 0, notime]
4987 \property Staff.TimeSignature \set #'transparent = ##t
4988 \clef "hufnagel_do_fa" c
4993 @c --- This should go somewhere else: ---
4994 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
4997 @c @code{percussion}
4999 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
5001 @c @item modern style tab clef (glyph: @code{clefs-tab})
5006 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
5008 @emph{Modern style} means ``as is typeset in contemporary editions of
5009 transcribed mensural music''.
5011 @emph{Petrucci style} means ``inspired by printings published by the
5012 famous engraver Petrucci (1466-1539)''.
5014 @emph{Historic style} means ``as was typeset or written in historic
5015 editions (other than those of Petrucci)''.
5017 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5019 Petrucci used C clefs with differently balanced left-side vertical
5020 beams, depending on which staffline it is printed.
5024 For modern clefs, see @ref{Clef}. For the percussion clef, see
5025 @ref{Percussion staves}. For the @code{TAB} clef, see
5030 @subsection Ancient flags
5036 Use the @code{flag-style} property of grob @internalsref{Stem} to
5037 select ancient flags. Besides the @code{default} flag style,
5038 only @code{mensural} style is supported:
5040 @lilypond[fragment,singleline,verbatim]
5041 \property Voice.Stem \set #'flag-style = #'mensural
5042 \property Voice.Stem \set #'thickness = #1.0
5043 \property Voice.NoteHead \set #'style = #'mensural
5045 c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
5046 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5049 Note that the innermost flare of each mensural flag always is
5050 vertically aligned with a staff line. If you do not like this
5051 behaviour, you can set the @code{adjust-if-on-staffline} property of
5052 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5053 of the end of each flare is different between notes on staff lines and
5054 notes between staff lines:
5056 @lilypond[fragment,singleline]
5057 \property Voice.Stem \set #'flag-style = #'mensural
5058 \property Voice.Stem \set #'thickness = #1.0
5059 \property Voice.Stem \set #'adjust-if-on-staffline = ##f
5060 \property Voice.NoteHead \set #'style = #'mensural
5062 c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
5063 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5066 There is no particular flag style for neo-mensural notation. Hence,
5067 when typesetting e.g. the incipit of a transcibed piece of mensural
5068 music, the default flag style should be used. There are no flags in
5069 Gregorian Chant notation.
5072 @node Ancient time signatures
5073 @subsection Ancient time signatures
5075 @cindex time signatures
5079 There is limited support for mensural time signatures. The
5080 glyphs are hard-wired to particular time fractions. In other words,
5081 to get a particular mensural signature glyph with the @code{\time n/m}
5082 command, @code{n} and @code{m} have to be chosen according to the
5088 \property Score.timing = ##f
5089 \property Score.barAlways = ##t
5090 s_\markup { "$\\backslash$time 4/4" }
5091 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/4" }
5093 s_\markup { "$\\backslash$time 2/2" }
5094 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/2" }
5096 s_\markup { "$\\backslash$time 6/4" }
5097 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/4" }
5099 s_\markup { "$\\backslash$time 6/8" }
5100 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/8" }
5102 s_\markup { "$\\backslash$time 3/2" }
5103 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/2" }
5105 s_\markup { "$\\backslash$time 3/4" }
5106 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/4" }
5108 s_\markup { "$\\backslash$time 9/4" }
5109 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/4" }
5111 s_\markup { "$\\backslash$time 9/8" }
5112 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/8" }
5114 s_\markup { "$\\backslash$time 4/8" }
5115 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/8" }
5117 s_\markup { "$\\backslash$time 2/4" }
5118 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/4" }
5126 \remove Staff_symbol_engraver
5127 \remove Clef_engraver
5128 \remove Time_signature_engraver
5134 Use the @code{style} property of grob @internalsref{TimeSignature} to
5135 select ancient time signatures. Supported styles are
5136 @code{neo_mensural} and @code{mensural}. The above table uses the
5137 @code{neo_mensural} style. This style is appropriate e.g. for the
5138 incipit of transcriptions of mensural pieces. The @code{mensural}
5139 style mimicks the look of historical printings of the 16th century.
5141 @inputfileref{input/test,time.ly} gives an overview over all available
5142 ancient and modern styles.
5146 @ref{Time signature} gives a general introduction into the use of time
5151 Mensural signature glyphs are mapped to time fractions in a
5152 hard-wired way. This mapping is sensible, but still arbitrary: given
5153 a mensural time signature, the time fraction represents a modern meter
5154 that usually will be a good choice when transcribing a mensural piece
5155 of music. For a particular piece of mensural music, however, the
5156 mapping may be unsatisfactory. In particular, the mapping assumes a
5157 fixed transcription of durations (e.g. brevis = half note in 2/2,
5158 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
5159 are not at all accessible through the @code{\time} command.
5161 Mensural time signatures are supported typographically, but not yet
5162 musically. The internal representation of durations is
5163 based on a purely binary system; a ternary division such as 1 brevis =
5164 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5165 prolatione maiori) is not correctly handled: event times in ternary
5166 modes will be badly computed, resulting e.g. in horizontally
5167 misaligned note heads, and bar checks are likely to erroneously fail.
5169 The syntax and semantics of the @code{\time} command for mensural
5170 music is subject to change.
5173 @subsection Custodes
5178 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5179 symbol that appears at the end of a staff. It anticipates the pitch
5180 of the first note(s) of the following line and thus helps the player
5181 or singer to manage line breaks during performance, thus enhancing
5182 readability of a score.
5184 Custodes were frequently used in music notation until the 17th
5185 century. Nowadays, they have survived only in a few particular forms
5186 of musical notation such as contemporary editions of Gregorian chant
5187 like the @emph{editio vaticana}. There are different custos glyphs
5188 used in different flavours of notational style.
5192 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5193 @internalsref{Staff} context when declaring the @code{\paper} block,
5194 as shown in the following example:
5200 \consists Custos_engraver
5201 Custos \override #'style = #'mensural
5206 The result looks like this:
5212 \property Staff.Custos \set #'style = #'mensural
5219 \consists Custos_engraver
5226 The custos glyph is selected by the @code{style} property. The styles
5227 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5228 @code{mensural}. They are demonstrated in the following fragment:
5238 { " " \musicglyph #"custodes-vaticana-u0" }
5242 { " " \musicglyph #"custodes-medicaea-u0" }
5246 { " " \musicglyph #"custodes-hufnagel-u0" }
5250 { " " \musicglyph #"custodes-mensural-u0" }
5259 \remove "Bar_number_engraver"
5263 \remove "Clef_engraver"
5264 \remove "Key_engraver"
5265 \remove "Time_signature_engraver"
5266 \remove "Staff_symbol_engraver"
5267 minimumVerticalExtent = ##f
5273 If the boolean property @code{adjust-if-on-staffline} is set to
5274 @code{#t} (which it is by default), lily typesets slightly different
5275 variants of the custos glyph, depending on whether the custos, is
5276 typeset on or between stafflines. The glyph will
5277 optically fit well into the staff, with the appendage on the right of
5278 the custos always ending at the same vertical position between two
5279 stafflines regardless of the pitch. If you set
5280 @code{adjust-if-on-staffline} to @code{#f}, then
5281 a compromise between both forms is used.
5283 Just like stems can be attached to noteheads in two directions
5284 @emph{up} and @emph{down}, each custos glyph is available with its
5285 appendage pointing either up or down. If the pitch of a custos is
5286 above a selectable position, the appendage will point downwards; if
5287 the pitch is below this position, the appendage will point upwards.
5288 Use property @code{neutral-position} to select this position. By
5289 default, it is set to @code{0}, such that the neutral position is the
5290 center of the staff. Use property @code{neutral-direction} to control
5291 what happens if a custos is typeset on the neutral position itself.
5292 By default, this property is set to @code{-1}, such that the appendage
5293 will point downwards. If set to @code{1}, the appendage will point
5294 upwards. Other values such as @code{0} are reserved for future
5295 extensions and should not be used.
5299 @internalsref{Custos} and @inputfileref{input/regression,custos.ly}.
5303 @subsection Divisiones
5309 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5310 `division') is a staff context symbol that is used to structure
5311 Gregorian music into phrases and sections. The musical meaning of
5312 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5313 can be characterized as short, medium and long pause, somewhat like
5314 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5315 a chant, but is also frequently used within a single
5316 antiphonal/responsorial chant to mark the end of each section.
5320 To use divisiones, include the file @code{gregorian-init.ly}. It
5321 contains definitions that you can apply by just inserting
5322 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5323 and @code{\finalis} at proper places in the input. Some editions use
5324 @emph{virgula} or @emph{caesura} instead of divisio minima.
5325 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5328 @lilypondfile[notexidoc]{divisiones.ly}
5332 @cindex @code{\virgula}
5334 @cindex @code{\caesura}
5336 @cindex @code{\divisioMinima}
5337 @code{\divisioMinima},
5338 @cindex @code{\divisioMaior}
5339 @code{\divisioMaior},
5340 @cindex @code{\divisioMaxima}
5341 @code{\divisioMaxima},
5342 @cindex @code{\finalis}
5347 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
5348 @inputfileref{input/test,divisiones.ly}, and @ref{Breath marks}.
5351 @subsection Ligatures
5355 @c TODO: Should double check if I recalled things correctly when I wrote
5356 @c down the following paragraph by heart.
5358 In musical terminology, a ligature is a coherent graphical symbol that
5359 represents at least two distinct notes. Ligatures originally appeared
5360 in the manuscripts of Gregorian chant notation roughly since the 9th
5361 century as an allusion to the accent symbols of greek lyric poetry to
5362 denote ascending or descending sequences of notes. Both, the shape
5363 and the exact meaning of ligatures changed tremendously during the
5364 following centuries: In early notation, ligatures were used for
5365 monophonic tunes (Gregorian chant) and very soon denoted also the way
5366 of performance in the sense of articulation. With upcoming
5367 multiphony, the need for a metric system arised, since multiple voices
5368 of a piece have to be synchronized some way. New notation systems
5369 were invented that used the manifold shapes of ligatures to now denote
5370 rhythmical patterns (e.g. black mensural notation, mannered notation,
5371 ars nova). With the invention of the metric system of the white
5372 mensural notation, the need for ligatures to denote such patterns
5373 disappeared. Nevertheless, ligatures were still in use in the
5374 mensural system for a couple of decades until they finally disappeared
5375 during the late 16th / early 17th century. Still, ligatures have
5376 survived in contemporary editions of Gregorian chant such as the
5377 Editio Vaticana from 1905/08.
5381 Syntactically, ligatures are simply enclosed by @code{\[} and
5382 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5383 additional input syntax specific for this particular type of ligature.
5384 By default, the @internalsref{LigatureBracket} engraver just puts a
5385 square bracket above the ligature:
5387 @lilypond[singleline,verbatim]
5389 \notes \transpose c c' {
5397 To select a specific style of ligatures, a proper ligature engraver
5398 has to be added to the @internalsref{Voice} context, as explained in
5399 the following subsections. Only white mensural ligatures
5400 are supported with certain limitations. Support for Editio Vaticana
5401 will be added in the future.
5404 * White mensural ligatures::
5405 * Gregorian square neumes ligatures::
5408 @node White mensural ligatures
5409 @subsubsection White mensural ligatures
5411 @cindex Mensural ligatures
5412 @cindex White mensural ligatures
5414 There is limited support for white mensural ligatures. The
5415 implementation is still experimental; it may output strange
5416 warnings or even crash in some cases or produce weird results on more
5421 To engrave white mensural ligatures, in the paper block the
5422 @internalsref{Mensural_ligature_engraver} has to be put into the
5423 @internalsref{Voice} context, and remove the
5424 @internalsref{Ligature_bracket_engraver}:
5430 \remove Ligature_bracket_engraver
5431 \consists Mensural_ligature_engraver
5436 There is no additional input language to describe the shape of a
5437 white mensural ligature. The shape is rather determined solely from
5438 the pitch and duration of the enclosed notes. While this approach may
5439 take a new user a while to get accustomed, it has the great advantage
5440 that the full musical information of the ligature is known internally.
5441 This is not only required for correct MIDI output, but also allows for
5442 automatic transcription of the ligatures.
5447 \property Score.timing = ##f
5448 \property Score.defaultBarType = "empty"
5449 \property Voice.NoteHead \set #'style = #'neo_mensural
5450 \property Staff.TimeSignature \set #'style = #'neo_mensural
5452 \[ g\longa c\breve a\breve f\breve d'\longa \]
5454 \[ e1 f1 a\breve g\longa \]
5456 @lilypond[singleline]
5458 \notes \transpose c c' {
5459 \property Score.timing = ##f
5460 \property Score.defaultBarType = "empty"
5461 \property Voice.NoteHead \set #'style = #'neo_mensural
5462 \property Staff.TimeSignature \set #'style = #'neo_mensural
5464 \[ g\longa c\breve a\breve f\breve d'\longa \]
5466 \[ e1 f1 a\breve g\longa \]
5471 \remove Ligature_bracket_engraver
5472 \consists Mensural_ligature_engraver
5478 Without replacing @internalsref{Ligature_bracket_engraver} with
5479 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5482 @lilypond[singleline]
5484 \notes \transpose c c' {
5485 \property Score.timing = ##f
5486 \property Score.defaultBarType = "empty"
5487 \property Voice.NoteHead \set #'style = #'neo_mensural
5488 \property Staff.TimeSignature \set #'style = #'neo_mensural
5490 \[ g\longa c\breve a\breve f\breve d'\longa \]
5492 \[ e1 f1 a\breve g\longa \]
5498 @node Gregorian square neumes ligatures
5499 @subsubsection Gregorian square neumes ligatures
5501 @cindex Square neumes ligatures
5502 @cindex Gregorian square neumes ligatures
5504 Gregorian square neumes notation (following the style of the Editio
5505 Vaticana) is under heavy development, but not yet really usable for
5506 production purposes. Core ligatures can already be typeset, but
5507 essential issues for serious typesetting are still under development,
5508 such as (among others) horizontal alignment of multiple ligatures,
5509 lyrics alignment and proper accidentals handling. Still, this section
5510 gives a sneak preview of what Gregorian chant may look like once it
5513 The following table contains the extended neumes table of the 2nd
5514 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5515 1983 by the monks of Solesmes.
5517 @multitable @columnfractions .4 .2 .2 .2
5520 @b{Neuma aut@*Neumarum Elementa} @tab
5521 @b{Figurae@*Rectae} @tab
5522 @b{Figurae@*Liquescentes Auctae} @tab
5523 @b{Figurae@*Liquescentes Deminutae}
5525 @c TODO: \paper block is identical in all of the below examples.
5526 @c Therefore, it should somehow be included rather than duplicated all
5529 @c why not make identifiers in ly/engraver-init.ly? --hwn
5531 @c Because it's just used to typeset plain notes without
5532 @c a staff for demonstration purposes rather than something
5533 @c special of Gregorian chant notation. --jr
5538 @lilypond[noindent, 26pt, nofragment, linewidth=1.5cm]
5539 \include "gregorian-init.ly"
5541 \notes \transpose c c' {
5544 \noBreak s^\markup {"a"} \noBreak
5546 % Punctum Inclinatum
5548 \noBreak s^\markup {"b"}
5554 \remove "Bar_number_engraver"
5558 \remove "Clef_engraver"
5559 \remove "Key_engraver"
5560 StaffSymbol \set #'transparent = ##t
5561 \remove "Time_signature_engraver"
5562 \remove "Bar_engraver"
5563 minimumVerticalExtent = ##f
5567 \remove Ligature_bracket_engraver
5568 \consists Vaticana_ligature_engraver
5569 NoteHead \set #'style = #'vaticana_punctum
5570 Stem \set #'transparent = ##t
5576 @lilypond[noindent, 26pt, nofragment, linewidth=2.5cm]
5577 \include "gregorian-init.ly"
5579 \notes \transpose c c' {
5580 % Punctum Auctum Ascendens
5581 \[ \auctum \ascendens b \]
5582 \noBreak s^\markup {"c"} \noBreak
5584 % Punctum Auctum Descendens
5585 \[ \auctum \descendens b \]
5586 \noBreak s^\markup {"d"} \noBreak
5588 % Punctum Inclinatum Auctum
5589 \[ \inclinatum \auctum b \]
5590 \noBreak s^\markup {"e"}
5596 \remove "Bar_number_engraver"
5600 \remove "Clef_engraver"
5601 \remove "Key_engraver"
5602 StaffSymbol \set #'transparent = ##t
5603 \remove "Time_signature_engraver"
5604 \remove "Bar_engraver"
5605 minimumVerticalExtent = ##f
5609 \remove Ligature_bracket_engraver
5610 \consists Vaticana_ligature_engraver
5611 NoteHead \set #'style = #'vaticana_punctum
5612 Stem \set #'transparent = ##t
5618 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5619 \include "gregorian-init.ly"
5621 \notes \transpose c c' {
5622 % Punctum Inclinatum Parvum
5623 \[ \inclinatum \deminutum b \]
5624 \noBreak s^\markup {"f"}
5630 \remove "Bar_number_engraver"
5634 \remove "Clef_engraver"
5635 \remove "Key_engraver"
5636 StaffSymbol \set #'transparent = ##t
5637 \remove "Time_signature_engraver"
5638 \remove "Bar_engraver"
5639 minimumVerticalExtent = ##f
5643 \remove Ligature_bracket_engraver
5644 \consists Vaticana_ligature_engraver
5645 NoteHead \set #'style = #'vaticana_punctum
5646 Stem \set #'transparent = ##t
5655 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5656 \include "gregorian-init.ly"
5658 \notes \transpose c c' {
5661 \noBreak s^\markup {"g"}
5667 \remove "Bar_number_engraver"
5671 \remove "Clef_engraver"
5672 \remove "Key_engraver"
5673 StaffSymbol \set #'transparent = ##t
5674 \remove "Time_signature_engraver"
5675 \remove "Bar_engraver"
5676 minimumVerticalExtent = ##f
5680 \remove Ligature_bracket_engraver
5681 \consists Vaticana_ligature_engraver
5682 NoteHead \set #'style = #'vaticana_punctum
5683 Stem \set #'transparent = ##t
5692 @code{3. Apostropha vel Stropha}
5694 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5695 \include "gregorian-init.ly"
5697 \notes \transpose c c' {
5700 \noBreak s^\markup {"h"}
5706 \remove "Bar_number_engraver"
5710 \remove "Clef_engraver"
5711 \remove "Key_engraver"
5712 StaffSymbol \set #'transparent = ##t
5713 \remove "Time_signature_engraver"
5714 \remove "Bar_engraver"
5715 minimumVerticalExtent = ##f
5719 \remove Ligature_bracket_engraver
5720 \consists Vaticana_ligature_engraver
5721 NoteHead \set #'style = #'vaticana_punctum
5722 Stem \set #'transparent = ##t
5728 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5729 \include "gregorian-init.ly"
5731 \notes \transpose c c' {
5733 \[ \stropha \auctum b \]
5734 \noBreak s^\markup {"i"}
5740 \remove "Bar_number_engraver"
5744 \remove "Clef_engraver"
5745 \remove "Key_engraver"
5746 StaffSymbol \set #'transparent = ##t
5747 \remove "Time_signature_engraver"
5748 \remove "Bar_engraver"
5749 minimumVerticalExtent = ##f
5753 \remove Ligature_bracket_engraver
5754 \consists Vaticana_ligature_engraver
5755 NoteHead \set #'style = #'vaticana_punctum
5756 Stem \set #'transparent = ##t
5766 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5767 \include "gregorian-init.ly"
5769 \notes \transpose c c' {
5772 \noBreak s^\markup {"j"}
5778 \remove "Bar_number_engraver"
5782 \remove "Clef_engraver"
5783 \remove "Key_engraver"
5784 StaffSymbol \set #'transparent = ##t
5785 \remove "Time_signature_engraver"
5786 \remove "Bar_engraver"
5787 minimumVerticalExtent = ##f
5791 \remove Ligature_bracket_engraver
5792 \consists Vaticana_ligature_engraver
5793 NoteHead \set #'style = #'vaticana_punctum
5794 Stem \set #'transparent = ##t
5803 @code{5. Clivis vel Flexa}
5805 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5806 \include "gregorian-init.ly"
5808 \notes \transpose c c' {
5817 \remove "Bar_number_engraver"
5821 \remove "Clef_engraver"
5822 \remove "Key_engraver"
5823 StaffSymbol \set #'transparent = ##t
5824 \remove "Time_signature_engraver"
5825 \remove "Bar_engraver"
5826 minimumVerticalExtent = ##f
5830 \remove Ligature_bracket_engraver
5831 \consists Vaticana_ligature_engraver
5832 NoteHead \set #'style = #'vaticana_punctum
5833 Stem \set #'transparent = ##t
5839 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5840 \include "gregorian-init.ly"
5842 \notes \transpose c c' {
5843 % Clivis Aucta Descendens
5844 \[ b \flexa \auctum \descendens g \]
5845 \noBreak s^\markup {"l"} \noBreak
5847 % Clivis Aucta Ascendens
5848 \[ b \flexa \auctum \ascendens g \]
5849 \noBreak s^\markup {"m"}
5855 \remove "Bar_number_engraver"
5859 \remove "Clef_engraver"
5860 \remove "Key_engraver"
5861 StaffSymbol \set #'transparent = ##t
5862 \remove "Time_signature_engraver"
5863 \remove "Bar_engraver"
5864 minimumVerticalExtent = ##f
5868 \remove Ligature_bracket_engraver
5869 \consists Vaticana_ligature_engraver
5870 NoteHead \set #'style = #'vaticana_punctum
5871 Stem \set #'transparent = ##t
5877 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5878 \include "gregorian-init.ly"
5880 \notes \transpose c c' {
5882 \[ b \flexa \deminutum g \]
5889 \remove "Bar_number_engraver"
5893 \remove "Clef_engraver"
5894 \remove "Key_engraver"
5895 StaffSymbol \set #'transparent = ##t
5896 \remove "Time_signature_engraver"
5897 \remove "Bar_engraver"
5898 minimumVerticalExtent = ##f
5902 \remove Ligature_bracket_engraver
5903 \consists Vaticana_ligature_engraver
5904 NoteHead \set #'style = #'vaticana_punctum
5905 Stem \set #'transparent = ##t
5912 @code{6. Podatus vel Pes}
5914 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5915 \include "gregorian-init.ly"
5917 \notes \transpose c c' {
5926 \remove "Bar_number_engraver"
5930 \remove "Clef_engraver"
5931 \remove "Key_engraver"
5932 StaffSymbol \set #'transparent = ##t
5933 \remove "Time_signature_engraver"
5934 \remove "Bar_engraver"
5935 minimumVerticalExtent = ##f
5939 \remove Ligature_bracket_engraver
5940 \consists Vaticana_ligature_engraver
5941 NoteHead \set #'style = #'vaticana_punctum
5942 Stem \set #'transparent = ##t
5948 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5949 \include "gregorian-init.ly"
5951 \notes \transpose c c' {
5952 % Pes Auctus Descendens
5953 \[ g \pes \auctum \descendens b \]
5954 \noBreak s^\markup {"p"} \noBreak
5956 % Pes Auctus Ascendens
5957 \[ g \pes \auctum \ascendens b \]
5958 \noBreak s^\markup {"q"}
5964 \remove "Bar_number_engraver"
5968 \remove "Clef_engraver"
5969 \remove "Key_engraver"
5970 StaffSymbol \set #'transparent = ##t
5971 \remove "Time_signature_engraver"
5972 \remove "Bar_engraver"
5973 minimumVerticalExtent = ##f
5977 \remove Ligature_bracket_engraver
5978 \consists Vaticana_ligature_engraver
5979 NoteHead \set #'style = #'vaticana_punctum
5980 Stem \set #'transparent = ##t
5986 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5987 \include "gregorian-init.ly"
5989 \notes \transpose c c' {
5991 \[ g \pes \deminutum b \]
5998 \remove "Bar_number_engraver"
6002 \remove "Clef_engraver"
6003 \remove "Key_engraver"
6004 StaffSymbol \set #'transparent = ##t
6005 \remove "Time_signature_engraver"
6006 \remove "Bar_engraver"
6007 minimumVerticalExtent = ##f
6011 \remove Ligature_bracket_engraver
6012 \consists Vaticana_ligature_engraver
6013 NoteHead \set #'style = #'vaticana_punctum
6014 Stem \set #'transparent = ##t
6021 @code{7. Pes Quassus}
6023 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6024 \include "gregorian-init.ly"
6026 \notes \transpose c c' {
6028 \[ \oriscus g \pes \virga b \]
6035 \remove "Bar_number_engraver"
6039 \remove "Clef_engraver"
6040 \remove "Key_engraver"
6041 StaffSymbol \set #'transparent = ##t
6042 \remove "Time_signature_engraver"
6043 \remove "Bar_engraver"
6044 minimumVerticalExtent = ##f
6048 \remove Ligature_bracket_engraver
6049 \consists Vaticana_ligature_engraver
6050 NoteHead \set #'style = #'vaticana_punctum
6051 Stem \set #'transparent = ##t
6057 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6058 \include "gregorian-init.ly"
6060 \notes \transpose c c' {
6061 % Pes Quassus Auctus Descendens
6062 \[ \oriscus g \pes \auctum \descendens b \]
6069 \remove "Bar_number_engraver"
6073 \remove "Clef_engraver"
6074 \remove "Key_engraver"
6075 StaffSymbol \set #'transparent = ##t
6076 \remove "Time_signature_engraver"
6077 \remove "Bar_engraver"
6078 minimumVerticalExtent = ##f
6082 \remove Ligature_bracket_engraver
6083 \consists Vaticana_ligature_engraver
6084 NoteHead \set #'style = #'vaticana_punctum
6085 Stem \set #'transparent = ##t
6093 @code{8. Quilisma Pes}
6095 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6096 \include "gregorian-init.ly"
6098 \notes \transpose c c' {
6100 \[ \quilisma g \pes b \]
6107 \remove "Bar_number_engraver"
6111 \remove "Clef_engraver"
6112 \remove "Key_engraver"
6113 StaffSymbol \set #'transparent = ##t
6114 \remove "Time_signature_engraver"
6115 \remove "Bar_engraver"
6116 minimumVerticalExtent = ##f
6120 \remove Ligature_bracket_engraver
6121 \consists Vaticana_ligature_engraver
6122 NoteHead \set #'style = #'vaticana_punctum
6123 Stem \set #'transparent = ##t
6129 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6130 \include "gregorian-init.ly"
6132 \notes \transpose c c' {
6133 % Quilisma Pes Auctus Descendens
6134 \[ \quilisma g \pes \auctum \descendens b \]
6141 \remove "Bar_number_engraver"
6145 \remove "Clef_engraver"
6146 \remove "Key_engraver"
6147 StaffSymbol \set #'transparent = ##t
6148 \remove "Time_signature_engraver"
6149 \remove "Bar_engraver"
6150 minimumVerticalExtent = ##f
6154 \remove Ligature_bracket_engraver
6155 \consists Vaticana_ligature_engraver
6156 NoteHead \set #'style = #'vaticana_punctum
6157 Stem \set #'transparent = ##t
6165 @code{9. Podatus Initio Debilis}
6167 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6168 \include "gregorian-init.ly"
6170 \notes \transpose c c' {
6171 % Pes Initio Debilis
6172 \[ \deminutum g \pes b \]
6179 \remove "Bar_number_engraver"
6183 \remove "Clef_engraver"
6184 \remove "Key_engraver"
6185 StaffSymbol \set #'transparent = ##t
6186 \remove "Time_signature_engraver"
6187 \remove "Bar_engraver"
6188 minimumVerticalExtent = ##f
6192 \remove Ligature_bracket_engraver
6193 \consists Vaticana_ligature_engraver
6194 NoteHead \set #'style = #'vaticana_punctum
6195 Stem \set #'transparent = ##t
6201 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6202 \include "gregorian-init.ly"
6204 \notes \transpose c c' {
6205 % Pes Auctus Descendens Initio Debilis
6206 \[ \deminutum g \pes \auctum \descendens b \]
6213 \remove "Bar_number_engraver"
6217 \remove "Clef_engraver"
6218 \remove "Key_engraver"
6219 StaffSymbol \set #'transparent = ##t
6220 \remove "Time_signature_engraver"
6221 \remove "Bar_engraver"
6222 minimumVerticalExtent = ##f
6226 \remove Ligature_bracket_engraver
6227 \consists Vaticana_ligature_engraver
6228 NoteHead \set #'style = #'vaticana_punctum
6229 Stem \set #'transparent = ##t
6239 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6240 \include "gregorian-init.ly"
6242 \notes \transpose c c' {
6244 \[ a \pes b \flexa g \]
6251 \remove "Bar_number_engraver"
6255 \remove "Clef_engraver"
6256 \remove "Key_engraver"
6257 StaffSymbol \set #'transparent = ##t
6258 \remove "Time_signature_engraver"
6259 \remove "Bar_engraver"
6260 minimumVerticalExtent = ##f
6264 \remove Ligature_bracket_engraver
6265 \consists Vaticana_ligature_engraver
6266 NoteHead \set #'style = #'vaticana_punctum
6267 Stem \set #'transparent = ##t
6273 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6274 \include "gregorian-init.ly"
6276 \notes \transpose c c' {
6277 % Torculus Auctus Descendens
6278 \[ a \pes b \flexa \auctum \descendens g \]
6285 \remove "Bar_number_engraver"
6289 \remove "Clef_engraver"
6290 \remove "Key_engraver"
6291 StaffSymbol \set #'transparent = ##t
6292 \remove "Time_signature_engraver"
6293 \remove "Bar_engraver"
6294 minimumVerticalExtent = ##f
6298 \remove Ligature_bracket_engraver
6299 \consists Vaticana_ligature_engraver
6300 NoteHead \set #'style = #'vaticana_punctum
6301 Stem \set #'transparent = ##t
6307 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6308 \include "gregorian-init.ly"
6310 \notes \transpose c c' {
6311 % Torculus Deminutus
6312 \[ a \pes b \flexa \deminutum g \]
6319 \remove "Bar_number_engraver"
6323 \remove "Clef_engraver"
6324 \remove "Key_engraver"
6325 StaffSymbol \set #'transparent = ##t
6326 \remove "Time_signature_engraver"
6327 \remove "Bar_engraver"
6328 minimumVerticalExtent = ##f
6332 \remove Ligature_bracket_engraver
6333 \consists Vaticana_ligature_engraver
6334 NoteHead \set #'style = #'vaticana_punctum
6335 Stem \set #'transparent = ##t
6342 @code{11. Torculus Initio Debilis}
6344 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6345 \include "gregorian-init.ly"
6347 \notes \transpose c c' {
6348 % Torculus Initio Debilis
6349 \[ \deminutum a \pes b \flexa g \]
6356 \remove "Bar_number_engraver"
6360 \remove "Clef_engraver"
6361 \remove "Key_engraver"
6362 StaffSymbol \set #'transparent = ##t
6363 \remove "Time_signature_engraver"
6364 \remove "Bar_engraver"
6365 minimumVerticalExtent = ##f
6369 \remove Ligature_bracket_engraver
6370 \consists Vaticana_ligature_engraver
6371 NoteHead \set #'style = #'vaticana_punctum
6372 Stem \set #'transparent = ##t
6378 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6379 \include "gregorian-init.ly"
6381 \notes \transpose c c' {
6382 % Torculus Auctus Descendens Initio Debilis
6383 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6390 \remove "Bar_number_engraver"
6394 \remove "Clef_engraver"
6395 \remove "Key_engraver"
6396 StaffSymbol \set #'transparent = ##t
6397 \remove "Time_signature_engraver"
6398 \remove "Bar_engraver"
6399 minimumVerticalExtent = ##f
6403 \remove Ligature_bracket_engraver
6404 \consists Vaticana_ligature_engraver
6405 NoteHead \set #'style = #'vaticana_punctum
6406 Stem \set #'transparent = ##t
6412 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6413 \include "gregorian-init.ly"
6415 \notes \transpose c c' {
6416 % Torculus Deminutus Initio Debilis
6417 \[ \deminutum a \pes b \flexa \deminutum g \]
6424 \remove "Bar_number_engraver"
6428 \remove "Clef_engraver"
6429 \remove "Key_engraver"
6430 StaffSymbol \set #'transparent = ##t
6431 \remove "Time_signature_engraver"
6432 \remove "Bar_engraver"
6433 minimumVerticalExtent = ##f
6437 \remove Ligature_bracket_engraver
6438 \consists Vaticana_ligature_engraver
6439 NoteHead \set #'style = #'vaticana_punctum
6440 Stem \set #'transparent = ##t
6447 @code{12. Porrectus}
6449 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6450 \include "gregorian-init.ly"
6452 \notes \transpose c c' {
6454 \[ a \flexa g \pes b \]
6461 \remove "Bar_number_engraver"
6465 \remove "Clef_engraver"
6466 \remove "Key_engraver"
6467 StaffSymbol \set #'transparent = ##t
6468 \remove "Time_signature_engraver"
6469 \remove "Bar_engraver"
6470 minimumVerticalExtent = ##f
6474 \remove Ligature_bracket_engraver
6475 \consists Vaticana_ligature_engraver
6476 NoteHead \set #'style = #'vaticana_punctum
6477 Stem \set #'transparent = ##t
6483 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6484 \include "gregorian-init.ly"
6486 \notes \transpose c c' {
6487 % Porrectus Auctus Descendens
6488 \[ a \flexa g \pes \auctum \descendens b \]
6495 \remove "Bar_number_engraver"
6499 \remove "Clef_engraver"
6500 \remove "Key_engraver"
6501 StaffSymbol \set #'transparent = ##t
6502 \remove "Time_signature_engraver"
6503 \remove "Bar_engraver"
6504 minimumVerticalExtent = ##f
6508 \remove Ligature_bracket_engraver
6509 \consists Vaticana_ligature_engraver
6510 NoteHead \set #'style = #'vaticana_punctum
6511 Stem \set #'transparent = ##t
6517 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6518 \include "gregorian-init.ly"
6520 \notes \transpose c c' {
6521 % Porrectus Deminutus
6522 \[ a \flexa g \pes \deminutum b \]
6529 \remove "Bar_number_engraver"
6533 \remove "Clef_engraver"
6534 \remove "Key_engraver"
6535 StaffSymbol \set #'transparent = ##t
6536 \remove "Time_signature_engraver"
6537 \remove "Bar_engraver"
6538 minimumVerticalExtent = ##f
6542 \remove Ligature_bracket_engraver
6543 \consists Vaticana_ligature_engraver
6544 NoteHead \set #'style = #'vaticana_punctum
6545 Stem \set #'transparent = ##t
6554 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6555 \include "gregorian-init.ly"
6557 \notes \transpose c c' {
6559 \[ \virga b \inclinatum a \inclinatum g \]
6566 \remove "Bar_number_engraver"
6570 \remove "Clef_engraver"
6571 \remove "Key_engraver"
6572 StaffSymbol \set #'transparent = ##t
6573 \remove "Time_signature_engraver"
6574 \remove "Bar_engraver"
6575 minimumVerticalExtent = ##f
6579 \remove Ligature_bracket_engraver
6580 \consists Vaticana_ligature_engraver
6581 NoteHead \set #'style = #'vaticana_punctum
6582 Stem \set #'transparent = ##t
6588 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6589 \include "gregorian-init.ly"
6591 \notes \transpose c c' {
6593 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6600 \remove "Bar_number_engraver"
6604 \remove "Clef_engraver"
6605 \remove "Key_engraver"
6606 StaffSymbol \set #'transparent = ##t
6607 \remove "Time_signature_engraver"
6608 \remove "Bar_engraver"
6609 minimumVerticalExtent = ##f
6613 \remove Ligature_bracket_engraver
6614 \consists Vaticana_ligature_engraver
6615 NoteHead \set #'style = #'vaticana_punctum
6616 Stem \set #'transparent = ##t
6622 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6623 \include "gregorian-init.ly"
6625 \notes \transpose c c' {
6626 % Climacus Deminutus
6627 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6634 \remove "Bar_number_engraver"
6638 \remove "Clef_engraver"
6639 \remove "Key_engraver"
6640 StaffSymbol \set #'transparent = ##t
6641 \remove "Time_signature_engraver"
6642 \remove "Bar_engraver"
6643 minimumVerticalExtent = ##f
6647 \remove Ligature_bracket_engraver
6648 \consists Vaticana_ligature_engraver
6649 NoteHead \set #'style = #'vaticana_punctum
6650 Stem \set #'transparent = ##t
6657 @code{14. Scandicus}
6659 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6660 \include "gregorian-init.ly"
6662 \notes \transpose c c' {
6664 \[ g \pes a \virga b \]
6671 \remove "Bar_number_engraver"
6675 \remove "Clef_engraver"
6676 \remove "Key_engraver"
6677 StaffSymbol \set #'transparent = ##t
6678 \remove "Time_signature_engraver"
6679 \remove "Bar_engraver"
6680 minimumVerticalExtent = ##f
6684 \remove Ligature_bracket_engraver
6685 \consists Vaticana_ligature_engraver
6686 NoteHead \set #'style = #'vaticana_punctum
6687 Stem \set #'transparent = ##t
6693 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6694 \include "gregorian-init.ly"
6696 \notes \transpose c c' {
6697 % Scandicus Auctus Descendens
6698 \[ g \pes a \pes \auctum \descendens b \]
6705 \remove "Bar_number_engraver"
6709 \remove "Clef_engraver"
6710 \remove "Key_engraver"
6711 StaffSymbol \set #'transparent = ##t
6712 \remove "Time_signature_engraver"
6713 \remove "Bar_engraver"
6714 minimumVerticalExtent = ##f
6718 \remove Ligature_bracket_engraver
6719 \consists Vaticana_ligature_engraver
6720 NoteHead \set #'style = #'vaticana_punctum
6721 Stem \set #'transparent = ##t
6727 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6728 \include "gregorian-init.ly"
6730 \notes \transpose c c' {
6731 % Scandicus Deminutus
6732 \[ g \pes a \pes \deminutum b \]
6739 \remove "Bar_number_engraver"
6743 \remove "Clef_engraver"
6744 \remove "Key_engraver"
6745 StaffSymbol \set #'transparent = ##t
6746 \remove "Time_signature_engraver"
6747 \remove "Bar_engraver"
6748 minimumVerticalExtent = ##f
6752 \remove Ligature_bracket_engraver
6753 \consists Vaticana_ligature_engraver
6754 NoteHead \set #'style = #'vaticana_punctum
6755 Stem \set #'transparent = ##t
6764 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6765 \include "gregorian-init.ly"
6767 \notes \transpose c c' {
6769 \[ g \oriscus a \pes \virga b \]
6776 \remove "Bar_number_engraver"
6780 \remove "Clef_engraver"
6781 \remove "Key_engraver"
6782 StaffSymbol \set #'transparent = ##t
6783 \remove "Time_signature_engraver"
6784 \remove "Bar_engraver"
6785 minimumVerticalExtent = ##f
6789 \remove Ligature_bracket_engraver
6790 \consists Vaticana_ligature_engraver
6791 NoteHead \set #'style = #'vaticana_punctum
6792 Stem \set #'transparent = ##t
6798 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6799 \include "gregorian-init.ly"
6801 \notes \transpose c c' {
6802 % Salicus Auctus Descendens
6803 \[ g \oriscus a \pes \auctum \descendens b \]
6810 \remove "Bar_number_engraver"
6814 \remove "Clef_engraver"
6815 \remove "Key_engraver"
6816 StaffSymbol \set #'transparent = ##t
6817 \remove "Time_signature_engraver"
6818 \remove "Bar_engraver"
6819 minimumVerticalExtent = ##f
6823 \remove Ligature_bracket_engraver
6824 \consists Vaticana_ligature_engraver
6825 NoteHead \set #'style = #'vaticana_punctum
6826 Stem \set #'transparent = ##t
6836 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6837 \include "gregorian-init.ly"
6839 \notes \transpose c c' {
6841 \[ \stropha b \stropha b \stropha a \]
6848 \remove "Bar_number_engraver"
6852 \remove "Clef_engraver"
6853 \remove "Key_engraver"
6854 StaffSymbol \set #'transparent = ##t
6855 \remove "Time_signature_engraver"
6856 \remove "Bar_engraver"
6857 minimumVerticalExtent = ##f
6861 \remove Ligature_bracket_engraver
6862 \consists Vaticana_ligature_engraver
6863 NoteHead \set #'style = #'vaticana_punctum
6864 Stem \set #'transparent = ##t
6876 Unlike most other neumes notation systems, the input language for
6877 neumes does not necessarily reflect directly the typographical
6878 appearance, but is designed to solely focuse on musical meaning. For
6879 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6880 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6881 a Porrectus with a curved flexa shape and only a single Punctum head.
6882 There is no command to explicitly typeset the curved flexa shape; the
6883 decision of when to typeset a curved flexa shape is purely taken from
6884 the musical input. The idea of this approach is to separate the
6885 musical aspects of the input from the notation style of the output.
6886 This way, the same input can be reused to typeset the same music in a
6887 different style of Gregorian chant notation such as Hufnagel (also
6888 known as German gothic neumes) or Medicaea (kind of a very simple
6889 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6890 engraver and Medicaea ligature engraver will have been implemented, it
6891 will be as simple as replacing the ligature engraver in the
6892 @internalsref{Voice} context to get the desired notation style from
6895 The following table shows the code fragments that produce the
6896 ligatures in the above neumes table. The letter in the first column
6897 in each line of the below table indicates to which ligature in the
6898 above table it refers. The second column gives the name of the
6899 ligature. The third column shows the code fragment that produces this
6900 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6902 @multitable @columnfractions .1 .4 .5
6916 Punctum Inclinatum @tab
6917 @code{\[ \inclinatum b \]}
6921 Punctum Auctum Ascendens @tab
6922 @code{\[ \auctum \ascendens b \]}
6926 Punctum Auctum Descendens @tab
6927 @code{\[ \auctum \descendens b \]}
6931 Punctum Inclinatum Auctum @tab
6932 @code{\[ \inclinatum \auctum b \]}
6936 Punctum Inclinatum Parvum @tab
6937 @code{\[ \inclinatum \deminutum b \]}
6942 @code{\[ \virga b \]}
6947 @code{\[ \stropha b \]}
6952 @code{\[ \stropha \auctum b \]}
6957 @code{\[ \oriscus b \]}
6961 Clivis vel Flexa @tab
6962 @code{\[ b \flexa g \]}
6966 Clivis Aucta Descendens @tab
6967 @code{\[ b \flexa \auctum \descendens g \]}
6971 Clivis Aucta Ascendens @tab
6972 @code{\[ b \flexa \auctum \ascendens g \]}
6977 @code{\[ b \flexa \deminutum g \]}
6981 Podatus vel Pes @tab
6982 @code{\[ g \pes b \]}
6986 Pes Auctus Descendens @tab
6987 @code{\[ g \pes \auctum \descendens b \]}
6991 Pes Auctus Ascendens @tab
6992 @code{\[ g \pes \auctum \ascendens b \]}
6997 @code{\[ g \pes \deminutum b \]}
7002 @code{\[ \oriscus g \pes \virga b \]}
7006 Pes Quassus Auctus Descendens @tab
7007 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7012 @code{\[ \quilisma g \pes b \]}
7016 Quilisma Pes Auctus Descendens @tab
7017 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7021 Pes Initio Debilis @tab
7022 @code{\[ \deminutum g \pes b \]}
7026 Pes Auctus Descendens Initio Debilis @tab
7027 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7032 @code{\[ a \pes b \flexa g \]}
7036 Torculus Auctus Descendens @tab
7037 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7041 Torculus Deminutus @tab
7042 @code{\[ a \pes b \flexa \deminutum g \]}
7046 Torculus Initio Debilis @tab
7047 @code{\[ \deminutum a \pes b \flexa g \]}
7051 Torculus Auctus Descendens Initio Debilis @tab
7052 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7056 Torculus Deminutus Initio Debilis @tab
7057 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7062 @code{\[ a \flexa g \pes b \]}
7066 Porrectus Auctus Descendens @tab
7067 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7071 Porrectus Deminutus @tab
7072 @code{\[ a \flexa g \pes \deminutum b \]}
7077 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7081 Climacus Auctus @tab
7082 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7086 Climacus Deminutus @tab
7087 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7092 @code{\[ g \pes a \virga b \]}
7096 Scandicus Auctus Descendens @tab
7097 @code{\[ g \pes a \pes \auctum \descendens b \]}
7101 Scandicus Deminutus @tab
7102 @code{\[ g \pes a \pes \deminutum b \]}
7107 @code{\[ g \oriscus a \pes \virga b \]}
7111 Salicus Auctus Descendens @tab
7112 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7117 @code{\[ \stropha b \stropha b \stropha a \]}
7123 The following head prefixes are supported:
7125 @cindex @code{\virga}
7127 @cindex @code{\stropha}
7129 @cindex @code{\inclinatum}
7131 @cindex @code{\auctum}
7133 @cindex @code{\descendens}
7135 @cindex @code{\ascendens}
7137 @cindex @code{\oriscus}
7139 @cindex @code{\quilisma}
7141 @cindex @code{\deminutum}
7144 Head prefixes can be accumulated, though restrictions apply. For
7145 example, either @code{\descendens} or @code{\ascendens} can be applied
7146 to a head, but not both to the same head.
7149 @cindex @code{\flexa}
7150 Two adjacent heads can be tied together with the @code{\pes} and
7151 @code{\flexa} infix commands for a rising and falling line of melody,
7156 Trigonus: apply equal spacing, regardless of pitch.
7159 @subsection Figured bass
7161 @cindex Basso continuo
7163 @c TODO: musicological blurb about FB
7167 LilyPond has limited support for figured bass:
7169 @lilypond[verbatim,fragment]
7171 \context Voice \notes { \clef bass dis4 c d ais}
7172 \context FiguredBass
7174 < 6 >4 < 7 >8 < 6+ [_!] >
7180 The support for figured bass consists of two parts: there is an input
7181 mode, introduced by @code{\figures}, where you can enter bass figures
7182 as numbers, and there is a context called @internalsref{FiguredBass} that
7183 takes care of making @internalsref{BassFigure} objects.
7185 In figures input mode, a group of bass figures is delimited by
7186 @code{<} and @code{>}. The duration is entered after the @code{>>}:
7191 \context FiguredBass
7195 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7202 \context FiguredBass
7203 \figures { <4- 6+ 7!> }
7206 Spaces or dashes may be inserted by using @code{_}. Brackets are
7207 introduced with @code{[} and @code{]}:
7213 \context FiguredBass
7214 \figures { < [4 6] 8 [_! 12]> }
7217 Although the support for figured bass may superficially resemble chord
7218 support, it works much simpler. The @code{\figures} mode simply
7219 stores the numbers , and @internalsref{FiguredBass} context prints
7220 them as entered. There is no conversion to pitches, and no
7221 realizations of the bass are played in the MIDI file.
7223 Internally, the code produces markup texts. You can use any of the
7224 markup text properties to override formatting. For example, the
7225 vertical spacing of the figures may be set with @code{baseline-skip}.
7229 @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7230 and @internalsref{FiguredBass} context.
7234 Slash notation for alterations is not supported.
7237 @node Vaticana style contexts
7238 @subsection Vaticana style contexts
7240 @cindex VaticanaVoiceContext
7241 @cindex VaticanaStaffContext
7243 The predefined @code{VaticanaVoiceContext} and
7244 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7245 Gregorian Chant in the style of the Editio Vaticana. These contexts
7246 initialize all relevant context properties and grob properties to
7247 proper values. With these contexts, you can immediately go ahead
7248 entering the chant, as the following short excerpt demonstrates:
7250 @lilypond[raggedright,verbatim,noindent]
7251 \include "gregorian-init.ly"
7254 \context VaticanaVoice {
7255 \property Score.BarNumber \set #'transparent = ##t
7257 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7258 \[ f( \pes a c' c' \pes d') \] c' \divisioMinima \break
7259 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7262 \context Lyrics \lyrics {
7263 San- ctus, San- ctus, San- ctus
7268 @node Contemporary notation
7269 @section Contemporary notation
7271 In the 20th century, composers have greatly expanded the musical
7272 vocabulary. With this expansion, many innovations in musical notation
7273 have been tried. The book by Stone (1980) gives a comprehensive
7274 overview (see @ref{Literature list}). In general, the use of new,
7275 innovative notation makes a piece harder to understand and perform and
7276 its use should therefore be avoided if possible. For this reason,
7277 support for contemporary notation in LilyPond is limited.
7286 @subsection Clusters
7290 In musical terminology, a @emph{cluster} denotes a range of
7291 simultaneously sounding pitches that may change over time. The set of
7292 available pitches to apply usually depends on the accoustic source.
7293 Thus, in piano music, a cluster typically consists of a continous range
7294 of the semitones as provided by the piano's fixed set of a chromatic
7295 scale. In choral music, each singer of the choir typically may sing an
7296 arbitrary pitch within the cluster's range that is not bound to any
7297 diatonic, chromatic or other scale. In electronic music, a cluster
7298 (theoretically) may even cover a continuous range of pitches, thus
7299 resulting in coloured noise, such as pink noise.
7301 Clusters can be denoted in the context of ordinary staff notation by
7302 engraving simple geometrical shapes that replace ordinary notation of
7303 notes. Ordinary notes as musical events specify starting time and
7304 duration of pitches; however, the duration of a note is expressed by the
7305 shape of the note head rather than by the horizontal graphical extent of
7306 the note symbol. In contrast, the shape of a cluster geometrically
7307 describes the development of a range of pitches (vertical extent) over
7308 time (horizontal extent). Still, the geometrical shape of a cluster
7309 covers the area in wich any single pitch contained in the cluster would
7310 be notated as an ordinary note. From this point of view, it is
7311 reasonable to specify a cluster as the envelope of a set of notes.
7315 A cluster is engraved as the envelope of a set of
7316 cluster-notes. Cluster notes are created by applying the function
7317 @code{notes-to-clusters} to a sequence of chords, e.g.
7319 @lilypond[relative 1,verbatim]
7320 \apply #notes-to-clusters { <c e > <b f'> }
7323 The following example (from
7324 @inputfileref{input/regression,cluster.ly}) shows what the result
7327 @lilypondfile[notexidoc]{cluster.ly}
7329 By default, @internalsref{Cluster_spanner_engraver} is in the
7330 @internalsref{Voice} context. This allows putting ordinary notes and
7331 clusters together in the same staff, even simultaneously. In such a
7332 case no attempt is made to automatically avoid collisions between
7333 ordinary notes and clusters.
7337 @internalsref{ClusterSpanner}, @internalsref{ClusterSpannerBeacon},
7338 @inputfileref{input/regression,cluster.ly},
7339 @internalsref{Cluster_spanner_engraver}, and @internalsref{ClusterNoteEvent}.
7343 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7344 accurately. Use @code{<g a>8 <e a>8} instead.
7349 @subsection Fermatas
7355 Contemporary music notation frequently uses special fermata symbols to
7356 indicate fermatas of differing lengths.
7360 The following are supported
7362 @lilypond[singleline]
7364 << \addlyrics \notes {
7384 \context Lyrics \lyrics {
7385 "shortfermata" "fermata" "longfermata" "verylongfermata"
7390 See @ref{Articulations} for general instructions how to apply scripts
7391 such as fermatas to a @code{\notes@{@}} block.
7394 @section Tuning output
7396 There are situations where default layout decisions are not
7397 sufficient. In this section we discuss ways to override these
7400 Formatting is internally done by manipulating so called objects
7401 (graphic objects). Each object carries with it a set of properties
7402 (object or layout properties) specific to that object. For example, a
7403 stem object has properties that specify its direction, length and
7406 The most direct way of tuning the output is by altering the values of
7407 these properties. There are two ways of doing that: first, you can
7408 temporarily change the definition of one type of object, thus
7409 affecting a whole set of objects. Second, you can select one specific
7410 object, and set a layout property in that object.
7412 Do not confuse layout properties with translation
7413 properties. Translation properties always use a mixed caps style
7414 naming, and are manipulated using @code{\property}:
7416 \property Context.propertyName = @var{value}
7418 Layout properties are use Scheme style variable naming, i.e. lower
7419 case words separated with dashes. They are symbols, and should always
7420 be quoted using @code{#'}. For example, this could be an imaginary
7421 layout property name:
7423 #'layout-property-name
7428 * Constructing a tweak::
7436 @node Tuning objects
7437 @subsection Tuning objects
7439 @cindex object description
7441 The definition of an object is a list of default object
7442 properties. For example, the definition of the Stem object (available
7443 in @file{scm/define-grobs.scm}), includes the following definitions
7444 for @internalsref{Stem}:
7448 (beamed-lengths . (0.0 2.5 2.0 1.5))
7449 (Y-extent-callback . ,Stem::height)
7454 Adding variables on top of this existing definition overrides the
7455 system default, and alters the resulting appearance of the layout
7461 Changing a variable for only one object is commonly achieved with
7465 \once \property @var{context}.@var{objectname}
7466 \override @var{symbol} = @var{value}
7468 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7469 and @var{objectname} is a string and @var{value} is a Scheme expression.
7470 This command applies a setting only during one moment in the score.
7472 In the following example, only one @internalsref{Stem} object is
7473 changed from its original setting:
7475 @lilypond[verbatim, fragment, relative=1]
7477 \once \property Voice.Stem \set #'thickness = #4
7481 @cindex @code{\once}
7483 For changing more objects, the same command, without @code{\once} can
7486 \property @var{context}.@var{objectname} \override @var{symbol} = @var{value}
7488 This command adds @code{@var{symbol} = @var{value}} to the definition
7489 of @var{objectname} in the context @var{context}, and this definition
7490 stays in place until it is removed.
7492 An existing definition may be removed by the following command:
7495 \property @var{context}.@var{objectname} \revert @var{symbol}
7498 All @code{\override} and @code{\revert} commands should be balanced.
7499 The @code{\set} shorthand performs a revert followed by an override,
7500 and is often more convenient to use
7503 \property @var{context}.@var{objectname} \set @var{symbol} = @var{value}
7507 @lilypond[verbatim,quote]
7508 c'4 \property Voice.Stem \override #'thickness = #4.0
7510 c'4 \property Voice.Stem \revert #'thickness
7514 The following example gives exactly the same result as the previous
7515 one (assuming the system default for stem thickness is 1.3):
7517 @lilypond[verbatim,quote]
7518 c'4 \property Voice.Stem \set #'thickness = #4.0
7520 c'4 \property Voice.Stem \set #'thickness = #1.3
7524 Reverting a setting which was not set in the first place has no
7525 effect. However, if the setting was set as a system default, this may
7526 remove the default value, and this may give surprising results,
7527 including crashes. In other words, @code{\override} and
7528 @code{\revert} must be carefully balanced. The following are examples
7529 of correct nesting of @code{\override}, @code{\set}, @code{\revert}:
7533 a clumsy but correct form:
7535 \override \revert \override \revert \override \revert
7539 shorter version of the same:
7541 \override \set \set \revert
7545 a short form, using only @code{\set}. This requires you to know the
7548 \set \set \set \set @var{to default value}
7552 if there is no default (i.e. by default, the object property is unset),
7555 \set \set \set \revert
7559 The object description is an Scheme association list. Since a Scheme
7560 list is a singly linked list, we can treat it as a stack, and
7561 @code{\override} and @code{\revert} are push and pop operations. The
7562 association list is stored in a normal context property, hence
7564 \property Voice.NoteHead = #'()
7566 will effectively erase @internalsref{NoteHead}s from the current
7567 @internalsref{Voice}. Typically, this will blank the object. However,
7568 this mechanism should not be used: it may cause crashes or other
7573 @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7574 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7575 @internalsref{All-layout-objects}.
7580 The backend is not very strict in type-checking object properties.
7581 Cyclic references in Scheme values for properties cause hangs and/or
7582 crashes. Reverting properties that are system defaults may also lead
7585 A property tweak of modifies a local copy of the object definition.
7586 After such a tweak, the definition is independent of the objects in
7587 enclosing contexts. For example
7590 \property Voice.Stem \set #'neutral-direction = #1
7592 \property Staff.Stem \set #'thickness = #4.0
7597 In this fragment, @code{neutral-direction} is tweaked. As a result,
7598 the current @internalsref{Voice} gets a private version of the
7599 @internalsref{Stem} object. The following tweak modifies the
7600 definition at @internalsref{Staff} level. Since it a different
7601 definition, the thickness of the @code{b'16} is unaffected. For the
7602 third note, a new Voice is created, which inherits the new definition,
7603 including the changed thickness, but excluding the new neutral
7609 * Constructing a tweak::
7615 @node Constructing a tweak
7616 @subsection Constructing a tweak
7619 @cindex internal documentation
7620 @cindex finding graphical objects
7621 @cindex graphical object descriptions
7623 @cindex @code{\override}
7625 @cindex internal documentation
7629 Three pieces of information are required to use @code{\override} and
7630 @code{\set}: the name of the layout object, the context and the name
7631 of the property. We demonstrate how to glean this information from
7632 the notation manual and the generated documentation.
7634 The generated documentation is a set of HTML pages which should be
7635 included if you installed a binary distribution, typically in
7636 @file{/usr/share/doc/lilypond}. They are also available on the web:
7637 go to the @uref{http://lilypond.org,LilyPond website}, click
7638 ``Documentation'', select the correct version, and click then
7639 ``Program reference.'' It is advisable to bookmark the local HTML
7640 files. They will load faster than the ones on the web. If you use the
7641 version from the web, you must check whether the documentation matches
7642 the program version: it is generated from the definitions that the
7643 program uses, and therefore it is strongly tied to the LilyPond
7647 @c [TODO: revise for new site.]
7649 Suppose we want to move the fingering indication in the fragment below:
7651 @lilypond[relative=2,verbatim]
7657 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7658 instructions}), you will notice that there is written:
7663 @internalsref{FingerEvent} and @internalsref{Fingering}.
7670 In other words, the fingerings once entered, are internally stored as
7671 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7672 layout object is created for every @code{FingerEvent}.
7674 The Fingering object has a number of different functions, and each of
7675 those is captured in an interface. The interfaces are listed under
7676 @internalsref{Fingering} in the program reference.
7680 The @code{Fingering} object has a fixed size
7681 (@internalsref{item-interface}), the symbol is a piece of text
7682 (@internalsref{text-interface}), whose font can be set
7683 (@internalsref{font-interface}). It is centered horizontally
7684 (@internalsref{self-alignment-interface}), it is placed next to other
7685 objects (@internalsref{side-position-interface}) vertically, and its
7686 placement is coordinated with other scripts
7687 (@internalsref{text-script-interface}). It also has the standard
7688 @internalsref{grob-interface} (grob stands for Graphical object)
7690 @cindex graphical object
7691 @cindex layout object
7692 @cindex object, layout
7693 with all the variables that come with
7694 it. Finally, it denotes a fingering instruction, so it has
7695 @internalsref{finger-interface}.
7697 For the vertical placement, we have to look under
7698 @code{side-position-interface}:
7700 @code{side-position-interface}
7702 Position a victim object (this one) next to other objects (the
7703 support). In this case, the property @code{direction} signifies where to put the
7704 victim object relative to the support (left or right, up or down?)
7709 below this description, the variable @code{padding} is described as
7713 (dimension, in staff space)
7715 add this much extra space between objects that are next to each
7716 other. Default value: @code{0.6}
7720 By increasing the value of @code{padding}, we can move away the
7721 fingering. The following command inserts 3 staff spaces of white
7722 between the note and the fingering:
7724 \once \property Voice.Fingering \set #'padding = #3
7727 Inserting this command before the Fingering object is created,
7728 i.e. before @code{c2}, yields the following result:
7730 @lilypond[relative=2,fragment,verbatim]
7731 \once \property Voice.Fingering
7738 The context name @code{Voice} in the example above can be determined
7739 as follows. In the documentation for @internalsref{Fingering}, it says
7741 Fingering grobs are created by: @internalsref{Fingering_engraver}
7744 Clicking @code{Fingering_engraver} shows the documentation of
7745 the module responsible for interpreting the fingering instructions and
7746 translating them to a @code{Fingering} object. Such a module is called
7747 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7750 Fingering_engraver is part of contexts: Voice
7752 so tuning the settings for Fingering should be done with
7754 \property Voice.Fingering \set @dots{}
7757 Of course, the tweak may also done in a larger context than
7758 @code{Voice}, for example, @internalsref{Staff} or
7759 @internalsref{Score}.
7763 The program reference also contains alphabetical lists of
7764 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7765 @internalsref{Music-expressions}, so you can also find which objects to
7766 tweak by browsing the internals document.
7770 @subsection Applyoutput
7772 The most versatile way of tuning an object is @code{\applyoutput}. Its
7775 \applyoutput @var{proc}
7779 where @var{proc} is a Scheme function, taking three arguments.
7781 When interpreted, the function @var{proc} is called for every layout
7782 object found in the context, with the following arguments:
7784 @item the layout object itself,
7785 @item the context where the layout object was created, and
7786 @item the context where @code{\applyoutput} is processed.
7790 In addition, the cause of the layout object, i.e. the music
7791 expression or object that was responsible for creating it, is in the
7792 object property @code{cause}. For example, for a note head, this is a
7793 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7794 this is a @internalsref{NoteHead} object.
7796 Here is a simple example of @code{\applyoutput}; it blanks note-heads on the
7799 (define (blanker grob grob-origin context)
7800 (if (and (memq (ly:get-grob-property grob 'interfaces)
7801 note-head-interface)
7802 (eq? (ly:get-grob-property grob 'staff-position) 0))
7804 (ly:set-grob-property! grob 'transparent #t)))
7809 @node Font selection
7810 @subsection Font selection
7812 The most common thing to change about the appearance of fonts is their
7813 size. The font size of any context can be easily changed by setting
7814 the @code{fontSize} property for that context. Its value is a number:
7815 negative numbers make the font smaller, positive numbers larger. An
7816 example is given below:
7818 @lilypond[fragment,relative=1,verbatim,quote]
7819 c4 c4 \property Voice.fontSize = #-1
7822 This command will set @code{font-size} (see below), and does
7823 not change the size of variable symbols, such as beams or slurs.
7825 One of the uses of @code{fontSize} is to get smaller symbols for cue
7826 notes. An elaborate example of those is in
7827 @inputfileref{input/test,cue-notes.ly}.
7829 @cindex magnification
7832 The font used for printing a object can be selected by setting
7833 @code{font-name}, e.g.
7835 \property Staff.TimeSignature
7836 \set #'font-name = #"cmr17"
7840 Any font can be used, as long as it is available to @TeX{}. Possible
7841 fonts include foreign fonts or fonts that do not belong to the
7842 Computer Modern font family. The size of fonts selected in this way
7843 can be changed with the @code{font-magnification} property. For
7844 example, @code{2.0} blows up all letters by a factor 2 in both
7848 @cindex font magnification
7850 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7851 can also be adjusted with a more fine-grained mechanism. By setting
7852 the object properties described below, you can select a different font;
7853 all three mechanisms work for every object that supports
7854 @code{font-interface}:
7859 is a symbol indicating the general class of the typeface. Supported are
7860 @code{roman} (Computer Modern), @code{braces} (for piano staff
7861 braces), @code{music} (the standard music font, including ancient
7862 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7865 is a symbol indicating the shape of the font, there are typically several
7866 font shapes available for each font family. Choices are @code{italic},
7867 @code{caps} and @code{upright}.
7870 is a symbol indicating the series of the font. There are typically several
7871 font series for each font family and shape. Choices are @code{medium}
7876 For any of these properties, the value @code{*} (i.e. the symbol
7877 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
7878 to override default setting, which are always present. For example:
7880 \property Lyrics . LyricText \override #'font-series = #'bold
7881 \property Lyrics . LyricText \override #'font-family = #'typewriter
7882 \property Lyrics . LyricText \override #'font-shape = #'*
7885 @cindex @code{font-style}
7887 The font size is set by modifying the @code{font-size} property. Its
7888 value is a number indicating the size relative to the standard size.
7889 Each step up is an increase of approximately 12% of the font size. Six
7890 steps is exactly a factor two. The Scheme function @code{magstep}
7891 converts a @code{font-size} number to a scaling factor.
7893 LilyPond has fonts in different design sizes: the music fonts for
7894 smaller sizes are chubbier, while the text fonts are relatively wider.
7895 Font size changes are achieved by scaling the design size that is
7896 closest to the desired size.
7898 The @code{font-size} mechanism does not work for fonts selected
7899 through @code{font-name}. These may be scaled with
7900 @code{font-magnification}.
7904 The following commands set @code{fontSize} for the current voice.
7906 @cindex @code{\tiny}
7908 @cindex @code{\small}
7910 @cindex @code{\normalsize}
7915 @file{ly/paper20.ly} contains hints how new fonts may be added to
7920 There is no style sheet provided for other fonts besides the @TeX{}
7923 @cindex font selection
7924 @cindex font magnification
7925 @cindex @code{font-interface}
7929 @subsection Text markup
7934 @cindex typeset text
7936 LilyPond has an internal mechanism to typeset texts. You can access it
7937 with the keyword @code{\markup}. Within markup mode, you can enter texts
7938 similar to lyrics: simply enter them, surrounded by spaces:
7941 @lilypond[verbatim,fragment,relative=1]
7942 c1^\markup { hello }
7943 c1_\markup { hi there }
7944 c1^\markup { hi \bold there, is \italic anyone home? }
7947 @cindex font switching
7949 The markup in the example demonstrates font switching commands. The
7950 command @code{\bold} and @code{\italic} only apply to the first
7951 following word; enclose a set of texts with braces to apply a command
7954 \markup @{ \bold @{ hi there @} @}
7958 For clarity, you can also do this for single arguments, e.g.
7960 \markup @{ is \italic @{ anyone @} home @}
7963 @cindex font size, texts
7965 The following size commands set absolute sizes:
7967 @cindex @code{\teeny}
7968 @cindex @code{\tiny}
7969 @cindex @code{\small}
7970 @cindex @code{\large}
7971 @cindex @code{\huge}
7981 You can also make letter larger or smaller relative to their neighbors,
7982 with the commands @code{\larger} and @code{\smaller}.
7986 @cindex font style, for texts
7987 @cindex @code{\bold}
7988 @cindex @code{\dynamic}
7989 @cindex @code{\number}
7990 @cindex @code{\italic}
7992 The following font change commands are defined:
7995 changes to the font used in dynamic signs. This font does not
7996 contain all characters of the alphabet, so when producing ``piu f'',
7997 the ``piu'' should be done in a different font.
8001 changes to the font used in time signatures. It only contains
8002 numbers and a few punctuation marks.
8004 changes @code{font-shape} to @code{italic}.
8006 changes @code{font-series} to @code{bold}.
8009 @cindex raising text
8010 @cindex lowering text
8012 @cindex translating text
8015 @cindex @code{\super}
8017 Raising and lowering texts can be done with @code{\super} and
8020 @lilypond[verbatim,fragment,relative=1]
8021 c1^\markup { E "=" mc \super "2" }
8024 @cindex @code{\raise}
8026 If you want to give an explicit amount for lowering or raising, use
8027 @code{\raise}. This command takes a Scheme valued first argument, and
8028 a markup object as second argument:
8030 @lilypond[verbatim,fragment,relative=1,quote]
8031 c1^\markup { C \small \raise #1.0 \bold { "9/7+" }}
8033 The argument to @code{\raise} is the vertical displacement amount,
8034 measured in (global) staff spaces. @code{\raise} and @code{\super}
8035 raise objects in relation to their surrounding markups. They cannot be
8036 used to move a single text up or down, when it is above or below a
8037 note, since the mechanism that positions it next to the note cancels
8038 any vertical shift. For vertical positioning, use the @code{padding}
8039 and/or @code{extra-offset} properties.
8041 Other commands taking single arguments include
8044 @item \bracket, \hbracket
8045 Bracket the argument markup with normal and horizontal brackets
8049 @cindex @code{\musicglyph}
8050 This is converted to a musical symbol, e.g. @code{\musicglyph
8051 #"accidentals-0"} will select the natural sign from the music font.
8052 See @ref{The Feta font} for a complete listing of the possible glyphs.
8054 This produces a single character, e.g. @code{\char #65} produces the
8057 @item \note @var{log} @var{dots} @var{dir}
8058 @cindex @code{\note}
8060 This produces a note with a stem pointing in @var{dir} direction, with
8061 duration log @var{log} and @var{dots} augmentation dots. The duration
8062 log is the negative 2-logarithm of the duration denominator. For
8063 example, a quarter note has log 2, an eighth note 3 and a breve has
8066 @item \hspace #@var{amount}
8067 @cindex @code{\hspace}
8068 This produces a invisible object taking horizontal space.
8070 \markup @{ A \hspace #2.0 B @}
8072 will put extra space between A and B, on top of the space that is
8073 normally inserted before elements on a line.
8075 @item \fontsize #@var{size}
8076 @cindex @code{\fontsize}
8077 This sets the relative font size, eg.
8079 A \fontsize #2 @{ B C @} D
8083 This will enlarge the B and the C by two steps.
8084 @item \translate #(cons @var{x} @var{y})
8086 This translates an object. Its first argument is a cons of numbers
8088 A \translate #(cons 2 -3) @{ B C @} D
8090 This moves `B C' 2 spaces to the right, and 3 down, relative to its
8091 surroundings. This command cannot be used to move isolated scripts
8092 vertically, for the same reason that @code{\raise} cannot be used for
8095 @item \magnify #@var{mag}
8096 @cindex @code{\magnify}
8097 This sets the font magnification for the its argument. In the following
8098 example, the middle A will be 10% larger:
8100 A \magnify #1.1 @{ A @} A
8104 @item \override #(@var{key} . @var{value})
8105 @cindex @code{\override}
8106 This overrides a formatting property for its argument. The argument
8107 should be a key/value pair, e.g.
8109 m \override #'(font-family . math) m m
8113 In markup mode you can compose expressions, similar to mathematical
8114 expressions, XML documents and music expressions. The braces group
8115 notes into horizontal lines. Other types of lists also exist: you can
8116 stack expressions grouped with @code{<}, and @code{>} vertically with
8117 the command @code{\column}. Similarly, @code{\center} aligns texts by
8120 @lilypond[verbatim,fragment,relative=1]
8121 c1^\markup { \column < a bbbb c > }
8122 c1^\markup { \center < a bbbb c > }
8123 c1^\markup { \line < a b c > }
8126 Markups can be stored in variables, and these variables
8127 may be attached to notes, like
8129 allegro = \markup { \bold \large { Allegro } }
8130 \notes { a^\allegro b c d }
8133 The markup mechanism is extensible. Refer to
8134 @file{scm/new-markup.scm} for more information.
8139 @internalsref{Markup-functions}, and @file{scm/new-markup.scm}.
8146 Text layout is ultimately done by @TeX{}, which does kerning of
8147 letters. LilyPond does not account for kerning, so texts will be
8148 spaced slightly too wide.
8150 Syntax errors for markup mode are confusing.
8152 Markup texts cannot be used in the titling of the @code{\header}
8153 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
8160 @section Global layout
8162 The global layout determined by three factors: the page layout, the
8163 line breaks and the spacing. These all influence each other. The
8164 choice of spacing determines how densely each system of music is set,
8165 which influences where line breaks breaks are chosen, and thus
8166 ultimately how many pages a piece of music takes. This section
8167 explains how to tune the algorithm for spacing.
8169 Globally spoken, this procedure happens in three steps: first,
8170 flexible distances (``springs'') are chosen, based on durations. All
8171 possible line breaking combination are tried, and the one with the
8172 best results---a layout that has uniform density and requires as
8173 little stretching or cramping as possible---is chosen. When the score
8174 is processed by @TeX{}, each page is filled with systems, and page breaks
8175 are chosen whenever the page gets full.
8180 * Vertical spacing::
8181 * Horizontal spacing::
8188 @node Vertical spacing
8189 @subsection Vertical spacing
8191 @cindex vertical spacing
8192 @cindex distance between staves
8193 @cindex staff distance
8194 @cindex between staves, distance
8195 @cindex staffs per page
8196 @cindex space between staves
8198 The height of each system is determined automatically by LilyPond, to
8199 keep systems from bumping into each other, some minimum distances are
8200 set. By changing these, you can put staves closer together, and thus
8201 put more systems onto one page.
8203 Normally staves are stacked vertically. To make
8204 staves maintain a distance, their vertical size is padded. This is
8205 done with the property @code{minimumVerticalExtent}. It takes a pair
8206 of numbers, so if you want to make it smaller from its, then you could
8209 \property Staff.minimumVerticalExtent = #'(-4 . 4)
8211 This sets the vertical size of the current staff to 4 staff spaces on
8212 either side of the center staff line. The argument of
8213 @code{minimumVerticalExtent} is interpreted as an interval, where the
8214 center line is the 0, so the first number is generally negative. The
8215 staff can be made larger at the bottom by setting it to @code{(-6
8218 The piano staves are handled a little differently: to make cross-staff
8219 beaming work correctly, it is necessary that the distance between staves
8220 is fixed beforehand. This is also done with a
8221 @internalsref{VerticalAlignment} object, created in
8222 @internalsref{PianoStaff}. In this object the distance between the
8223 staves is fixed by setting @code{forced-distance}. If you want to
8224 override this, use a @code{\translator} block as follows:
8228 VerticalAlignment \override #'forced-distance = #9
8231 This would bring the staves together at a distance of 9 staff spaces,
8232 measured from the center line of each staff.
8236 Vertical alignment of staves is handled by the
8237 @internalsref{VerticalAlignment} object.
8241 @node Horizontal spacing
8242 @subsection Horizontal Spacing
8244 The spacing engine translates differences in durations into
8245 stretchable distances (``springs'') of differing lengths. Longer
8246 durations get more space, shorter durations get less. The shortest
8247 durations get a fixed amount of space (which is controlled by
8248 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8249 /The longer the duration, the more space it gets: doubling a
8250 duration adds a fixed amount (this amount is controlled by
8251 @code{spacing-increment}) of space to the note.
8253 For example, the following piece contains lots of half, quarter and
8254 8th notes, the eighth note is followed by 1 note head width (NHW).
8255 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8256 @lilypond[fragment, verbatim, relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8260 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8261 width of a note head, and @code{shortest-duration-space} is set to
8262 2.0, meaning that the shortest note gets 2 NHW (2 times
8263 @code{shortest-duration-space}) of space. For normal notes, this space
8264 is always counted from the left edge of the symbol, so the shortest
8265 notes are generally followed by one NHW of space.
8267 If one would follow the above procedure exactly, then adding a single
8268 32th note to a score that uses 8th and 16th notes, would widen up the
8269 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8270 thus adding 1 NHW to every note. To prevent this, the
8271 shortest duration for spacing is not the shortest note in the score,
8272 but the most commonly found shortest note. Notes that are even
8273 shorter this are followed by a space that is proportional to their
8274 duration relative to the common shortest note. So if we were to add
8275 only a few 16th notes to the example above, they would be followed by
8278 @lilypond[fragment, verbatim, relative=2]
8279 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8282 The most common shortest duration is determined as follows: in every
8283 measure, the shortest duration is determined. The most common short
8284 duration, is taken as the basis for the spacing, with the stipulation
8285 that this shortest duration should always be equal to or shorter than
8286 1/8th note. The shortest duration is printed when you run lilypond
8287 with @code{--verbose}. These durations may also be customized. If you
8288 set the @code{common-shortest-duration} in
8289 @internalsref{SpacingSpanner}, then this sets the base duration for
8290 spacing. The maximum duration for this base (normally 1/8th), is set
8291 through @code{base-shortest-duration}.
8293 @cindex @code{common-shortest-duration}
8294 @cindex @code{base-shortest-duration}
8295 @cindex @code{stem-spacing-correction}
8296 @cindex @code{spacing}
8298 In the introduction it was explained that stem directions influence
8299 spacing. This is controlled with @code{stem-spacing-correction}
8300 property in @internalsref{NoteSpacing}, which are generated for every
8301 @internalsref{Voice} context. The @code{StaffSpacing} object
8302 (generated at @internalsref{Staff} context) contains the same property
8303 for controlling the stem/barline spacing. The following example
8304 shows these corrections, once with default settings, and once with
8305 exaggerated corrections:
8311 \property Staff.NoteSpacing \override #'stem-spacing-correction
8313 \property Staff.StaffSpacing \override #'stem-spacing-correction
8318 \paper { raggedright = ##t } }
8321 @cindex SpacingSpanner, overriding properties
8323 Properties of the @internalsref{SpacingSpanner} must be overridden
8324 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8325 created before any @code{\property} statements are interpreted.
8327 \paper @{ \translator @{
8329 SpacingSpanner \override #'spacing-increment = #3.0
8336 @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8337 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8338 @internalsref{SeparatingGroupSpanner}.
8342 Spacing is determined on a score wide basis. If you have a score that
8343 changes its character (measured in durations) halfway during the
8344 score, the part containing the longer durations will be spaced too
8347 There is no convenient mechanism to manually override spacing.
8352 @subsection Font size
8353 @cindex font size, setting
8354 @cindex staff size, setting
8355 @cindex @code{paper} file
8357 The Feta font provides musical symbols at seven different sizes.
8358 These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
8359 26 point. The point size of a font is the height of the corresponding
8360 staff (excluding line thicknesses).
8362 Definitions for these sizes are the files @file{paperSZ.ly}, where
8363 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include any
8364 of these files, the variables @code{paperEleven},
8365 @code{paperThirteen}, @code{paperSixteen},
8366 @code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
8367 are defined respectively. The default @code{\paper} block is also
8368 set. These files should be imported at toplevel, i.e.
8370 \include "paper26.ly"
8374 The default font size settings for each staff heights are generated
8375 from the 20pt style sheet. For more details, see the file
8376 @file{scm/font.scm}.
8380 @subsection Line breaking
8383 @cindex breaking lines
8385 Line breaks are normally computed automatically. They are chosen such
8386 that lines look neither cramped nor loose, and that consecutive lines
8387 have similar density.
8389 Occasionally you might want to override the automatic breaks; you can
8390 do this by specifying @code{\break}. This will force a line break at
8391 this point. Line breaks can only occur at places where there are bar
8392 lines. If you want to have a line break where there is no bar line,
8393 you can force an invisible bar line by entering @code{\bar
8394 ""}. Similarly, @code{\noBreak} forbids a line break at a
8398 @cindex regular line breaks
8399 @cindex four bar music.
8401 For linebreaks at regular intervals use @code{\break} separated by
8402 skips and repeated with @code{\repeat}:
8404 << \repeat unfold 7 @{ s1 * 4 \break @}
8405 @emph{the real music}
8410 This makes the following 28 measures (assuming 4/4 time) be broken every
8415 @internalsref{BreakEvent}.
8419 @subsection Page layout
8422 @cindex breaking pages
8424 @cindex @code{indent}
8425 @cindex @code{linewidth}
8427 The most basic settings influencing the spacing are @code{indent} and
8428 @code{linewidth}. They are set in the @code{\paper} block. They
8429 control the indentation of the first line of music, and the lengths of
8432 If @code{raggedright} is set to true in the @code{\paper}
8433 block, then the lines are justified at their natural length. This
8434 useful for short fragments, and for checking how tight the natural
8438 @cindex vertical spacing
8440 The page layout process happens outside the LilyPond formatting
8441 engine: variables controlling page layout are passed to the output,
8442 and are further interpreted by @code{lilypond} wrapper program. It
8443 responds to the following variables in the @code{\paper} block. The
8444 variable @code{textheight} sets the total height of the music on each
8445 page. The spacing between systems is controlled with
8446 @code{interscoreline}, its default is 16pt. The distance between the
8447 score lines will stretch in order to fill the full page
8448 @code{interscorelinefill} is set to a positive number. In that case
8449 @code{interscoreline} specifies the minimum spacing.
8451 @cindex @code{textheight}
8452 @cindex @code{interscoreline}
8453 @cindex @code{interscorelinefill}
8455 If the variable @code{lastpagefill} is defined,
8456 @c fixme: this should only be done if lastpagefill == #t
8457 systems are evenly distributed vertically on the last page. This
8458 might produce ugly results in case there are not enough systems on the
8459 last page. The @command{lilypond-book} command ignores
8460 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8463 @cindex @code{lastpagefill}
8465 Page breaks are normally computed by @TeX{}, so they are not under
8466 direct control of LilyPond. However, you can insert a commands into
8467 the @file{.tex} output to instruct @TeX{} where to break pages. This
8468 is done by setting the @code{between-systems-strings} on the
8469 @internalsref{NonMusicalPaperColumn} where the system is broken.
8470 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8471 The predefined command @code{\newpage} also does this.
8475 @cindex @code{papersize}
8477 To change the paper size, you must first set the @code{papersize} paper
8478 variable variable as in the example below. Set it to
8479 the strings @code{a4}, @code{letter}, or @code{legal}. After this
8480 specification, you must set the font as described above. If you want
8481 the default font, then use the 20 point font.
8484 \paper@{ papersize = "a4" @}
8485 \include "paper16.ly"
8488 The file @code{paper16.ly} will now include a file named @file{a4.ly}, which
8489 will set the paper variables @code{hsize} and @code{vsize} (used by
8490 @code{lilypond-book} and @code{lilypond}).
8495 @cindex @code{\newpage}
8501 @ref{Invoking lilypond},
8502 @inputfileref{input/regression,between-systems.ly}, and
8503 @internalsref{NonMusicalPaperColumn}.
8507 LilyPond has no concept of page layout, which makes it difficult to
8508 reliably choose page breaks in longer pieces.
8517 Entered music can also be converted to MIDI output. The performance
8518 is good enough for proof-hearing the music for errors.
8520 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8521 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8522 marks translate to a fixed fraction of the available MIDI volume
8523 range, crescendi and decrescendi make the volume vary linearly between
8524 their two extremities. The fractions can be adjusted by
8525 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8526 For each type of MIDI instrument, a volume range can be defined. This
8527 gives a basic equalizer control, which can enhance the quality of
8528 the MIDI output remarkably. The equalizer can be controlled by
8529 setting @code{instrumentEqualizer}.
8533 Many musically interesting effects, such as swing, articulation,
8534 slurring, etc., are not translated to MIDI.
8539 * MIDI instrument names::
8544 @subsection MIDI block
8548 The MIDI block is analogous to the paper block, but it is somewhat
8549 simpler. The @code{\midi} block can contain:
8553 @item a @code{\tempo} definition, and
8554 @item context definitions.
8557 Assignments in the @code{\midi} block are not allowed.
8559 A number followed by a period is interpreted as a real number, so
8560 for setting the tempo for dotted notes, an extra space should be
8561 inserted, for example:
8564 \midi @{ \tempo 4 . = 120 @}
8568 @cindex context definition
8570 Context definitions follow precisely the same syntax as within the
8571 \paper block. Translation modules for sound are called performers.
8572 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8575 @node MIDI instrument names
8576 @subsection MIDI instrument names
8578 @cindex instrument names
8579 @cindex @code{Staff.midiInstrument}
8581 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8582 property. The instrument name should be chosen from the list in
8583 @ref{MIDI instruments}.
8587 If the selected string does not exactly match, then the default is
8588 used, which is the Grand Piano.