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 It is possible to place arbitrary strings of text or markup text (see
2167 @ref{Text markup}) above or below notes by using a string:
2168 @code{c^"text"}. By default, these indications do not influence the
2169 note spacing, but by using the command @code{\fatText}, the widths
2170 will be taken into account:
2172 @lilypond[fragment,singleline,verbatim] \relative c' {
2173 c4^"longtext" \fatText c4_"longlongtext" c4 }
2176 It is possible to use @TeX{} commands in the strings, but this should
2177 be avoided because the exact dimensions of the string can then no
2183 @internalsref{TextScriptEvent}, @internalsref{TextScript}, and
2189 @subsection Grace notes
2192 @c should have blurb about accaciatura / appogiatura
2194 @cindex @code{\grace}
2198 Grace notes are ornaments that are written out. The most common ones
2199 are acciaccatura, which should be played as very short. It is denoted
2200 by a slurred small note with a slashed stem. The appoggiatura is a
2201 grace note that takes a fixed fraction of the main note, is and
2202 denoted as a slurred note in small print without a slash.
2203 They are entered with the commands @code{\acciaccatura} and
2204 @code{\appoggiatura}, as demonstrated in the following example:
2207 @cindex appoggiatura
2208 @cindex acciaccatura
2210 @lilypond[relative=2,verbatim,fragment]
2211 b4 \acciaccatura d8 c4 \appoggiatura e8 d4
2212 \acciaccatura { g16[ f] } e4
2215 Both are special forms of the @code{\grace} command. By prefixing this
2216 keyword to a music expression, a new one is formed, which will be
2217 printed in a smaller font and takes up no logical time in a measure.
2218 @lilypond[relative=2,verbatim,fragment]
2220 \grace { c16[ d16] } c2 c4
2224 Unlike @code{\acciaccatura} and @code{\appoggiatura}, the
2225 @code{\grace} command does not start a slur.
2227 Internally, timing for grace notes is done using a second, `grace'
2228 time. Every point in time consists of two rational numbers: one
2229 denotes the logical time, one denotes the grace timing. The above
2230 example is shown here with timing tuples:
2232 @lilypond[singleline]
2235 c4 \grace c16 c4 \grace {
2238 \new Lyrics \lyrics {
2241 ( \fraction 1 4 , \fraction -1 16 ) } 16 }
2242 \markup { (\fraction 1 4 , 0 ) } 4
2244 \markup { (\fraction 2 4 , \fraction "-1" 8 ) } 16
2245 \markup { (\fraction 2 4 , \fraction "-1" 16 ) } 16
2247 \markup { ( \fraction 2 4 , 0 ) }
2252 The placement of grace notes is synchronized between different staves.
2253 In the following example, there are two sixteenth graces notes for
2254 every eighth grace note:
2256 @lilypond[relative=2,verbatim,fragment]
2257 << \new Staff { e4 \grace { c16[ d e f] } e4 }
2258 \new Staff { c'4 \grace { g8[ b] } c4 } >>
2263 If you want to end a note with a grace, then the standard trick
2264 is to put the grace notes after a ``space note'', e.g.
2265 @lilypond[fragment,verbatim, relative=2]
2268 { s2 \grace { c16[ d] } } >>
2274 By adjusting the duration of the skip note (here it is a half-note),
2275 the space between the main-note and the grace is adjusted.
2278 A @code{\grace} section will introduce special typesetting settings,
2279 for example, to produce smaller type, and set directions. Hence, when
2280 introducing layout tweaks, they should be inside the grace section,
2282 @lilypond[fragment,verbatim,relative 1]
2285 \property Voice.Stem \override #'direction = #-1
2287 \property Voice.Stem \revert #'direction
2294 The overrides should also be reverted inside the grace section.
2296 If the layout of grace sections must be changed throughout the music,
2297 then this can be accomplished through the function
2298 @code{add-grace-property}. The following example
2299 undefines the Stem direction grace section, so stems do not always
2304 #(add-grace-property "Voice" Stem direction '())
2310 Another option is to change the variables @code{startGraceMusic},
2311 @code{stopGraceMusic}, @code{startAccacciaturaMusic},
2312 @code{stopAccacciaturaMusic}, @code{startAppoggiaturaMusic},
2313 @code{stopAppoggiaturaMstuic}. More information is in the file
2314 @file{ly/grace-init.ly}
2319 @internalsref{GraceMusic}.
2323 Grace notes cannot be used in the smallest size (@file{paper11.ly}).
2325 A score that starts with an @code{\grace} section needs an explicit
2326 @code{\context Voice} declaration, otherwise the main note and grace
2327 note end up on different staves.
2329 Grace note synchronization can also lead to surprises. Staff notation,
2330 such as key signatures, barlines, etc. are also synchronized. Take
2331 care when you mix staves with grace notes and staves without, for example,
2333 @lilypond[relative=2,verbatim,fragment]
2334 << \new Staff { e4 \bar "|:" \grace c16 d4 }
2335 \new Staff { c4 \bar "|:" d4 } >>
2338 Grace sections should only be used within sequential music
2339 expressions. Nesting or juxtaposing grace sections is not supported,
2340 and might produce crashes or other errors.
2342 Overriding settings cannot be done in separate styles for appoggiatura
2347 @subsection Glissando
2350 @cindex @code{\glissando}
2352 A glissando is a smooth change in pitch. It is denoted by a line or a
2353 wavy line between two notes.
2357 A glissando line can be requested by attaching a @code{\glissando} to
2360 @lilypond[fragment,relative,verbatim]
2366 @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2371 Adding additional texts (such as @emph{gliss.}) is not supported.
2375 @subsection Dynamics
2388 @cindex @code{\ffff}
2398 Absolute dynamic marks are specified using an variable after a
2399 note: @code{c4\ff}. The available dynamic marks are @code{\ppp},
2400 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2401 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2402 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2404 @lilypond[verbatim,singleline,fragment,relative]
2405 c'\ppp c\pp c \p c\mp c\mf c\f c\ff c\fff
2411 @cindex @code{\decr}
2412 @cindex @code{\rced}
2419 A crescendo mark is started with @code{\<} and terminated with
2420 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2421 with @code{\!}. Because these marks are bound to notes, if you must
2422 use spacer notes if multiple marks during one note are needed:
2424 @lilypond[fragment,verbatim,center,quote]
2425 c''\< c''\! d''\decr e''\rced
2426 << f''1 { s4 s4\< s4\! \> s4\! } >>
2428 This may give rise to very short hairpins. Use @code{minimum-length}
2429 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2433 \property Staff.Hairpin \override #'minimum-length = #5
2436 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2437 is an example how to do it:
2439 @lilypond[fragment,relative=2,verbatim]
2440 c4 \cresc c4 c c c \endcresc c4
2446 You can also supply your own texts:
2447 @lilypond[fragment,relative,verbatim]
2449 \property Voice.crescendoText = \markup { \italic "cresc. poco" }
2450 \property Voice.crescendoSpanner = #'dashed-line
2460 @cindex @code{\dynamicUp}
2462 @cindex @code{\dynamicDown}
2463 @code{\dynamicDown},
2464 @cindex @code{\dynamicBoth}
2465 @code{\dynamicBoth}.
2467 @cindex direction, of dynamics
2471 @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2472 @internalsref{AbsoluteDynamicEvent}.
2474 Dynamics are objects of @internalsref{DynamicText} and
2475 @internalsref{Hairpin}. Vertical positioning of these symbols is
2476 handled by the @internalsref{DynamicLineSpanner} object.
2478 If you want to adjust padding or vertical direction of the dynamics, you
2479 must set properties for the @internalsref{DynamicLineSpanner} object.
2487 @cindex @code{\repeat}
2490 Repetition is a central concept in music, and multiple notations exist
2491 for repetitions. In LilyPond, most of these notations can be captured
2492 in a uniform syntax. One of the advantages is that they can be
2493 rendered in MIDI accurately.
2495 The following types of repetition are supported:
2499 Repeated music is fully written (played) out. Useful for MIDI
2500 output, and entering repetitive music.
2503 This is the normal notation: Repeats are not written out, but
2504 alternative endings (voltas) are printed, left to right.
2508 Alternative endings are written stacked. This has limited use but may be
2509 used to typeset two lines of lyrics in songs with repeats, see
2510 @inputfileref{input,star-spangled-banner.ly}.
2518 Make beat or measure repeats. These look like percent signs.
2524 * Repeats and MIDI::
2525 * Manual repeat commands::
2527 * Tremolo subdivisions::
2532 @subsection Repeat syntax
2536 LilyPond has one syntactic construct for specifying different types of
2537 repeats. The syntax is
2540 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2543 If you have alternative endings, you may add
2544 @cindex @code{\alternative}
2546 \alternative @code{@{} @var{alternative1}
2548 @var{alternative3} @dots{} @code{@}}
2550 where each @var{alternative} is a music expression. If you do not
2551 give enough alternatives for all of the repeats, then the first
2552 alternative is assumed to be played more than once.
2554 Normal notation repeats are used like this:
2555 @lilypond[fragment,verbatim,relative 1]
2557 \repeat volta 2 { c4 d e f }
2558 \repeat volta 2 { f e d c }
2561 With alternative endings:
2562 @lilypond[fragment,verbatim,relative 1]
2564 \repeat volta 2 {c4 d e f}
2565 \alternative { {d2 d} {f f,} }
2569 @lilypond[fragment,verbatim,relative 1]
2572 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2573 \alternative { { g4 g g } { a | a a a a | b2. } }
2579 If you do a nested repeat like
2588 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2589 belongs. This ambiguity is resolved by always having the
2590 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2591 it is advisable to use braces in such situations.
2594 @node Repeats and MIDI
2595 @subsection Repeats and MIDI
2597 @cindex expanding repeats
2599 For instructions on how to unfold repeats for MIDI output, see the
2600 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2605 Timing information is not remembered at the start of an alternative,
2606 so after a repeat timing information must be reset by hand, for
2607 example by setting @code{Score.measurePosition} or entering
2608 @code{\partial}. Similarly, slurs or ties are also not repeated.
2611 @node Manual repeat commands
2612 @subsection Manual repeat commands
2614 @cindex @code{repeatCommands}
2616 The property @code{repeatCommands} can be used to control the layout of
2617 repeats. Its value is a Scheme list of repeat commands, where each repeat
2621 @item the symbol @code{start-repeat},
2622 which prints a @code{|:} bar line,
2623 @item the symbol @code{end-repeat},
2624 which prints a @code{:|} bar line,
2625 @item the list @code{(volta @var{text})},
2626 which prints a volta bracket saying @var{text}: The text can be specified as
2627 a text string or as a markup text, see @ref{Text markup}. Do not
2628 forget to change the font, as the default number font does not contain
2629 alphabetic characters. Or,
2630 @item the list @code{(volta #f)}, which
2631 stops a running volta bracket:
2634 @lilypond[verbatim, fragment,relative 2]
2636 \property Score.repeatCommands = #'((volta "93") end-repeat)
2638 \property Score.repeatCommands = #'((volta #f))
2645 @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2646 @internalsref{VoltaRepeatedMusic},
2647 @internalsref{UnfoldedRepeatedMusic}, and
2648 @internalsref{FoldedRepeatedMusic}.
2650 @node Tremolo repeats
2651 @subsection Tremolo repeats
2652 @cindex tremolo beams
2654 To place tremolo marks between notes, use @code{\repeat} with tremolo
2656 @lilypond[verbatim,singleline]
2658 \context Voice \notes\relative c' {
2659 \repeat "tremolo" 8 { c16 d16 }
2660 \repeat "tremolo" 4 { c16 d16 }
2661 \repeat "tremolo" 2 { c16 d16 }
2666 Tremolo marks can also be put on a single note. In this case, the
2667 note should not be surrounded by braces.
2668 @lilypond[verbatim,singleline]
2669 \repeat "tremolo" 4 c16
2672 A similar mechanism is the tremolo subdivision, described in
2673 @ref{Tremolo subdivisions}.
2677 In this manual: @ref{Tremolo subdivisions}, @ref{Repeats}.
2679 Internals: tremolo beams are @internalsref{Beam} objects. Single stem
2680 tremolos are @internalsref{StemTremolo}s. The music expression is
2681 @internalsref{TremoloEvent},
2683 Example files: @inputfileref{input/regression,chord-tremolo.ly},
2684 @inputfileref{input/regression,stem-tremolo.ly}.
2686 @node Tremolo subdivisions
2687 @subsection Tremolo subdivisions
2688 @cindex tremolo marks
2689 @cindex @code{tremoloFlags}
2691 Tremolo marks can be printed on a single note by adding
2692 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2693 A @var{length} value of 8 gives one line across the note stem. If the
2694 length is omitted, then then the last value (stored in
2695 @code{Voice.tremoloFlags}) is used:
2697 @lilypond[verbatim,fragment,center]
2698 c'2:8 c':32 | c': c': |
2701 @c [TODO : stok is te kort bij 32en]
2705 Tremolos in this style do not carry over into the MIDI output.
2709 In this manual: @ref{Tremolo repeats}.
2711 Elsewhere: @internalsref{StemTremolo}, @internalsref{TremoloEvent}.
2713 @node Measure repeats
2714 @subsection Measure repeats
2716 @cindex percent repeats
2717 @cindex measure repeats
2719 In the @code{percent} style, a note pattern can be repeated. It is
2720 printed once, and then the pattern is replaced with a special sign.
2721 Patterns of a one and two measures are replaced by percent-like signs,
2722 patterns that divide the measure length are replaced by slashes:
2724 @lilypond[verbatim,singleline]
2725 \context Voice { \repeat "percent" 4 { c'4 }
2726 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2732 @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2733 @internalsref{PercentRepeatedMusic}, and
2734 @internalsref{DoublePercentRepeat}.
2738 @node Rhythmic music
2739 @section Rhythmic music
2741 Sometimes you might want to show only the rhythm of a melody. This
2742 can be done with the rhythmic staff. All pitches of notes on such a
2743 staff are squashed, and the staff itself has a single line:
2745 @lilypond[fragment,relative,verbatim]
2746 \context RhythmicStaff {
2748 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2753 * Percussion staves::
2754 * Percussion MIDI output::
2757 @node Percussion staves
2758 @subsection Percussion staves
2762 A percussion part for more than one instrument typically uses a
2763 multiline staff where each position in the staff refers to one piece
2768 Percussion staves are typeset with help of a set of Scheme
2769 functions. The system is based on the general MIDI drum-pitches.
2770 Include @file{drumpitch-init.ly} to use drum pitches. This file
2771 defines the pitches from the Scheme variable @code{drum-pitch-names},
2772 the definition of which can be read in @file{scm/drums.scm}. Each
2773 piece of percussion has a full name and an abbreviated name, and either
2774 the full name or the abbreviation may be used in input files.
2776 To typeset the music on a staff apply the function @code{drums->paper}
2777 to the percussion music. This function takes a list of percussion
2778 instrument names, notehead scripts and staff positions (that is:
2779 pitches relative to the C-clef) and transforms the input
2780 music by moving the pitch, changing the notehead and (optionally)
2783 @lilypond[singleline,verbatim,quote]
2784 \include "drumpitch-init.ly"
2785 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2786 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2788 \apply #(drums->paper 'drums) \context Staff <<
2790 \new Voice { \voiceOne \up }
2791 \new Voice { \voiceTwo \down }
2796 In the above example the music was transformed using the list @code{'drums}.
2797 The following lists are defined in @file{scm/drums.scm}:
2800 to typeset a typical drum kit on a five-line staff:
2803 \include "drumpitch-init.ly"
2804 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2805 bd sn ss tomh tommh tomml toml tomfh tomfl }
2806 mus = \notes { cymc cyms cymr hh hhc hho hhho hhp cb hc
2807 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2810 \apply #(drums->paper 'drums) \context Staff <<
2814 \context Lyrics \nam
2817 linewidth = 100.0\mm
2820 \remove Bar_engraver
2821 \remove Time_signature_engraver
2822 minimumVerticalExtent = #'(-4.0 . 5.0)
2826 \remove Stem_engraver
2832 The drum scheme supports six different toms. When there fewer toms, simply
2833 select the toms that produce the desired result, i.e. to get toms on
2834 the three middle lines you use @code{tommh}, @code{tomml} and
2837 Because general MIDI does not contain rimshots the sidestick is used
2838 for this purpose instead.
2840 to typeset timbales on a two line staff:
2842 @lilypond[singleline]
2843 \include "drumpitch-init.ly"
2844 nam = \lyrics { timh ssh timl ssl cb }
2845 mus = \notes { timh ssh timl ssl cb s16 }
2848 \apply #(drums->paper 'timbales) \context Staff <<
2852 \context Lyrics \nam
2857 \remove Bar_engraver
2858 \remove Time_signature_engraver
2859 StaffSymbol \override #'line-count = #2
2860 StaffSymbol \override #'staff-space = #2
2861 minimumVerticalExtent = #'(-3.0 . 4.0)
2865 \remove Stem_engraver
2872 to typeset congas on a two line staff:
2874 @lilypond[singleline]
2875 \include "drumpitch-init.ly"
2876 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2877 mus = \notes { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2880 \apply #(drums->paper 'congas) \context Staff <<
2884 \context Lyrics \nam
2889 \remove Bar_engraver
2890 \remove Time_signature_engraver
2891 StaffSymbol \override #'line-count = #2
2892 StaffSymbol \override #'staff-space = #2
2893 minimumVerticalExtent = #'(-3.0 . 4.0)
2897 \remove Stem_engraver
2903 to typeset bongos on a two line staff:
2905 @lilypond[singleline]
2906 \include "drumpitch-init.ly"
2907 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2908 mus = \notes { boh boho bohm ssh bol bolo bolm ssl s16 }
2911 \apply #(drums->paper 'bongos) \context Staff <<
2915 \context Lyrics \nam
2920 \remove Bar_engraver
2921 \remove Time_signature_engraver
2922 StaffSymbol \override #'line-count = #2
2923 StaffSymbol \override #'staff-space = #2
2924 minimumVerticalExtent = #'(-3.0 . 4.0)
2928 \remove Stem_engraver
2934 to typeset all kinds of simple percussion on one line staves:
2935 @lilypond[singleline]
2936 \include "drumpitch-init.ly"
2937 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2938 mus = \notes { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2941 \apply #(drums->paper 'percussion) \context Staff <<
2945 \context Lyrics \nam
2950 \remove Bar_engraver
2951 \remove Time_signature_engraver
2952 StaffSymbol \override #'line-count = #1
2953 minimumVerticalExtent = #'(-2.0 . 3.0)
2957 \remove Stem_engraver
2964 If you do not like any of the predefined lists you can define your own
2965 list at the top of your file:
2967 @lilypond[singleline, verbatim]
2968 #(set-drum-kit 'mydrums `(
2969 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2970 (snare default #f ,(ly:make-pitch 0 1 0))
2971 (hihat cross #f ,(ly:make-pitch 0 5 0))
2972 (pedalhihat xcircle "stopped" ,(ly:make-pitch 0 5 0))
2973 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2975 \include "drumpitch-init.ly"
2976 up = \notes { hh8 hh hh hh hhp4 hhp }
2977 down = \notes { bd4 sn bd toml8 toml }
2979 \apply #(drums->paper 'mydrums) \context Staff <<
2981 \new Voice { \voiceOne \up }
2982 \new Voice { \voiceTwo \down }
2987 To use a modified existing list, one can prepend modifications to the
2991 #(set-drum-kit 'mydrums (append `(
2992 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2993 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2994 ) (get-drum-kit 'drums)))
2997 You can easily combine percussion notation with pitched notation.
2998 Indeed, the file @file{drumpitch-init.ly} replaces the normal pitch
2999 names, so you will have to reinclude @file{nederlands.ly} after the
3000 drum-pattern-definitions to enter normal notes:
3002 @lilypond[singleline,verbatim]
3003 \include "drumpitch-init.ly"
3004 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
3005 down = \notes { bassdrum4 snare8 bd r bd sn4 }
3006 \include "nederlands.ly"
3007 bass = \notes \transpose c c,, { a4. e8 r e g e }
3010 \apply #(drums->paper 'drums) \new Staff <<
3012 \new Voice { \voiceOne \up }
3013 \new Voice { \voiceTwo \down }
3015 \new Staff { \clef "F_8" \bass }
3020 @node Percussion MIDI output
3021 @subsection Percussion MIDI output
3023 In order to produce correct MIDI output you need to produce two score
3024 blocks---one for the paper and one for the MIDI output. To use the
3025 percussion channel you set the property @code{instrument} to
3026 @code{'drums}. Because the drum-pitches themselves are similar to the
3027 general MIDI pitches all you have to do is to insert the voices with
3028 none of the scheme functions to get the correct MIDI output:
3032 \apply #(drums->paper 'mydrums) \context Staff <<
3041 \property Staff.instrument = #'drums
3051 Chords entered with @code{< @dots{} >} do not work. This scheme is a
3052 temporary implementation.
3056 @section Piano music
3058 Piano staves are two normal staves coupled with a brace. The staves
3059 are largely independent, but sometimes voices can cross between the
3060 two staves. The same notation is also used for harps and other key
3061 instruments. The @internalsref{PianoStaff} is especially built to
3062 handle this cross-staffing behavior. In this section we discuss the
3063 @internalsref{PianoStaff} and some other pianistic peculiarities.
3067 * Automatic staff changes::
3068 * Manual staff switches::
3071 * Staff switch lines::
3076 There is no support for putting chords across staves. You can get
3077 this result by increasing the length of the stem in the lower stave so
3078 it reaches the stem in the upper stave, or vice versa. An example is
3079 included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
3081 Dynamics are not centered, but kludges do exist. See
3082 @inputfileref{input/template,piano-dynamics.ly}.
3084 @cindex cross staff stem
3085 @cindex stem, cross staff
3088 @c fixme: should have hyperlinks as well.
3094 @node Automatic staff changes
3095 @subsection Automatic staff changes
3096 @cindex Automatic staff changes
3098 Voices can switch automatically between the top and the bottom
3099 staff. The syntax for this is
3101 \autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
3103 The two staffs of the piano staff must be named @code{up} and
3106 The autochanger switches on basis of pitch (central C is the turning
3107 point), and it looks ahead skipping over rests to switch in
3108 advance. Here is a practical example:
3110 @lilypond[verbatim,singleline,quote]
3111 \score { \notes \context PianoStaff <<
3112 \context Staff = "up" {
3113 \autochange Staff \context Voice = VA << \relative c' {
3114 g4 a b c d r4 a g } >> }
3115 \context Staff = "down" {
3122 In this example, spacer rests are used to prevent the bottom staff from
3123 terminating too soon.
3128 @internalsref{AutoChangeMusic}.
3132 The staff switches often do not end up in optimal places. For high
3133 quality output, staff switches should be specified manually.
3136 @node Manual staff switches
3137 @subsection Manual staff switches
3139 @cindex manual staff switches
3140 @cindex staff switch, manual
3142 Voices can be switched between staves manually, using the following command:
3144 \change Staff = @var{staffname} @var{music}
3148 The string @var{staffname} is the name of the staff. It switches the
3149 current voice from its current staff to the Staff called
3150 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3159 Pianos have pedals that alter the way sound are produced. Generally, a
3160 piano has three pedals, sustain, una corda, and sostenuto.
3164 Piano pedal instruction can be expressed by attaching
3165 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3166 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3169 @lilypond[fragment,verbatim]
3170 c'4\sustainDown c'4\sustainUp
3173 What is printed can be modified by setting @code{pedal@var{X}Strings},
3174 where @var{X} is one of the pedal types: @code{Sustain},
3175 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3176 documentation of @internalsref{SustainPedal} for more information.
3178 Pedals can also be indicated by a sequence of brackets, by setting the
3179 @code{pedalSustainStyle} property to @code{bracket} objects:
3181 @lilypond[fragment,verbatim]
3182 \property Staff.pedalSustainStyle = #'bracket
3183 c''4\sustainDown d''4 e''4
3184 a'4\sustainUp\sustainDown
3185 f'4 g'4 a'4\sustainUp
3188 A third style of pedal notation is a mixture of text and brackets,
3189 obtained by setting @code{pedal-type} to @code{mixed}:
3191 @lilypond[fragment,verbatim]
3192 \property Staff.pedalSustainStyle = #'mixed
3193 c''4\sustainDown d''4 e''4
3194 c'4\sustainUp\sustainDown
3195 f'4 g'4 a'4\sustainUp
3198 The default `*Ped' style for sustain and damper pedals corresponds to
3199 @code{\pedal-type = #'text}. However, @code{mixed} is the default style
3200 for a sostenuto pedal:
3202 @lilypond[fragment,verbatim]
3203 c''4\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4\sostenutoUp
3206 For fine-tuning of the appearance of a pedal bracket, the properties
3207 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3208 @code{PianoPedalBracket} objects (see
3209 @internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
3210 bracket may be extended to the end of the note head:
3212 @lilypond[fragment,verbatim]
3213 \property Staff.PianoPedalBracket \override
3214 #'shorten-pair = #'(0 . -1.0)
3215 c''4\sostenutoDown d''4 e''4 c'4
3216 f'4 g'4 a'4\sostenutoUp
3220 @subsection Arpeggio
3223 @cindex broken arpeggio
3224 @cindex @code{\arpeggio}
3226 You can specify an arpeggio sign on a chord by attaching an
3227 @code{\arpeggio} to a chord:
3230 @lilypond[fragment,relative,verbatim]
3234 When an arpeggio crosses staves, you attach an arpeggio to the chords
3235 in both staves, and set
3236 @internalsref{PianoStaff}.@code{connectArpeggios}:
3238 @lilypond[fragment,relative,verbatim]
3239 \context PianoStaff <<
3240 \property PianoStaff.connectArpeggios = ##t
3241 \new Staff { <c' e g c>\arpeggio }
3242 \new Staff { \clef bass <c,, e g>\arpeggio }
3246 The direction of the arpeggio is sometimes denoted by adding an
3247 arrowhead to the wiggly line. This can be typeset by setting
3248 @code{arpeggio-direction}:
3250 @lilypond[fragment,relative,verbatim]
3252 \property Voice.Arpeggio \set #'arpeggio-direction = #1
3254 \property Voice.Arpeggio \set #'arpeggio-direction = #-1
3259 A square bracket on the left indicates that the player should not
3260 arpeggiate the chord. To draw these brackets, set the
3261 @code{molecule-callback} property of @code{Arpeggio} or
3262 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
3263 @code{\arpeggio} statements within the chords as before:
3265 @lilypond[fragment,relative,verbatim]
3266 \property PianoStaff.Arpeggio \override
3267 #'molecule-callback = \arpeggioBracket
3273 @cindex @code{\arpeggioBracket}
3274 @code{\arpeggioBracket},
3275 @cindex @code{\arpeggio}
3280 @internalsref{ArpeggioEvent} music expressions lead to
3281 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3282 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3286 It is not possible to mix connected arpeggios and unconnected
3287 arpeggios in one @internalsref{PianoStaff} at the same time.
3289 @node Staff switch lines
3290 @subsection Staff switch lines
3293 @cindex follow voice
3294 @cindex staff switching
3297 @cindex @code{followVoice}
3299 Whenever a voice switches to another staff a line connecting the notes
3300 can be printed automatically. This is enabled if the property
3301 @code{PianoStaff.followVoice} is set to true:
3303 @lilypond[fragment,relative,verbatim]
3304 \context PianoStaff <<
3305 \property PianoStaff.followVoice = ##t
3306 \context Staff \context Voice {
3311 \context Staff=two { \clef bass \skip 1*2 }
3315 The associated object is @internalsref{VoiceFollower}.
3319 @cindex @code{\showStaffSwitch}
3320 @code{\showStaffSwitch},
3321 @cindex @code{\hideStaffSwitch}
3322 @code{\hideStaffSwitch}.
3326 @section Vocal music
3328 This section discusses how to enter and print lyrics.
3332 * The Lyrics context::
3337 @node Entering lyrics
3338 @subsection Entering lyrics
3342 @cindex @code{\lyrics}
3345 Lyrics are entered in a special input mode. This mode is is introduced
3346 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3347 punctuation and accents without any hassle. Syllables are entered like
3348 notes, but with pitches replaced by text. For example,
3350 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3353 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3354 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3355 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3356 any 8-bit character with ASCII code over 127, or a two-character
3357 combination of a backslash followed by one of @code{`}, @code{'},
3358 @code{"}, or @code{^}.
3360 Subsequent characters of a word can be any character that is not a digit
3361 and not white space. One important consequence of this is that a word
3362 can end with @code{@}}. The following example is usually a bug. The
3363 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3365 \lyrics @{ twinkle@}
3368 @cindex @code{\property}, in @code{\lyrics}
3369 Similarly, a period following a alphabetic sequence, is included in the
3370 resulting string. As a consequence, spaces must be inserted around
3371 @code{\property} commands:
3373 \property Lyrics . LyricText \set #'font-shape = #'italic
3377 @cindex spaces, in lyrics
3378 @cindex quotes, in lyrics
3380 Any @code{_} character which appears in an unquoted word is converted
3381 to a space. This provides a mechanism for introducing spaces into words
3382 without using quotes. Quoted words can also be used in Lyrics mode to
3383 specify words that cannot be written with the above rules:
3386 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3390 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3395 These will be attached to the end of the first syllable.
3397 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3398 as a separate word between syllables. The hyphen will have variable
3399 length depending on the space between the syllables and it will be
3400 centered between the syllables.
3405 When a lyric is sung over many notes (this is called a melisma), this is
3406 indicated with a horizontal line centered between a syllable and the
3407 next one. Such a line is called an extender line, and it is entered as
3412 @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3413 @internalsref{ExtenderEvent}.
3417 The definition of lyrics mode is too complex.
3419 @node The Lyrics context
3420 @subsection The Lyrics context
3422 Lyrics are printed by interpreting them in @internalsref{Lyrics} context:
3424 \context Lyrics \lyrics @dots{}
3427 @cindex automatic syllable durations
3428 @cindex @code{\addlyrics}
3429 @cindex lyrics and melodies
3431 This will place the lyrics according to the durations that were
3432 entered. The lyrics can also be aligned under a given melody
3433 automatically. In this case, it is no longer necessary to enter the
3434 correct duration for each syllable. This is achieved by combining the
3435 melody and the lyrics with the @code{\addlyrics} expression:
3439 \context Lyrics @dots{}
3442 @cindex staff order, with @code{\addlyrics}
3444 Normally, this will put the lyrics below the staff. For different or
3445 more complex orderings, the best way is to setup the hierarchy of
3446 staves and lyrics first, e.g.
3448 \context ChoirStaff \notes <<
3449 \context Lyrics = sopr @{ s1 @}
3450 \context Staff = soprStaff @{ s1 @}
3451 \context Lyrics = tenor @{ s1 @}
3452 \context Staff = tenorStaff @{ s1 @}
3455 and then combine the appropriate melodies and lyric lines:
3458 \context Staff = soprStaff @emph{the music}
3459 \context Lyrics = sopr @emph{the lyrics}
3462 putting both together, you would get
3464 \context ChoirStaff \notes <<
3465 \context Lyrics = @dots{}
3466 \context Staff = @dots{}
3472 @cindex choral score
3474 A complete example of a SATB score setup is in the file
3475 @inputfileref{input/template,satb.ly}.
3479 @internalsref{LyricCombineMusic}, @internalsref{Lyrics}, and
3480 @inputfileref{input/template,satb.ly}.
3484 @code{\addlyrics} is not automatic enough: melismata are not detected
3485 automatically, and melismata are not stopped when they hit a rest. A
3486 melisma on the last note in a melody is not printed.
3490 @subsection More stanzas
3493 @cindex phrasing, in lyrics
3496 The lyrics should be aligned with the note heads of the melody. To
3497 achieve this, each line of lyrics should be marked to correspond with
3500 To this end, give the @internalsref{Voice} context an identity:
3502 \context Voice = duet @{
3507 Then set the @internalsref{LyricsVoice} contexts to names starting with
3508 that identity followed by a dash. In the preceding example, the
3509 @internalsref{Voice} identity is @code{duet}, so the identities of the
3510 @internalsref{LyricsVoice}s are marked @code{duet-1} and @code{duet-2}:
3512 \context LyricsVoice = "duet-1" @{
3513 Hi, my name is bert. @}
3514 \context LyricsVoice = "duet-2" @{
3515 Ooooo, ch\'e -- ri, je t'aime. @}
3518 The complete example is shown here:
3519 @lilypond[singleline,verbatim]
3522 \notes \relative c'' \context Voice = duet { \time 3/4
3524 \lyrics \context Lyrics <<
3525 \context LyricsVoice = "duet-1" {
3526 \property LyricsVoice . stanza = "Bert"
3527 Hi, my name is bert. }
3528 \context LyricsVoice = "duet-2" {
3529 \property LyricsVoice . stanza = "Ernie"
3530 Ooooo, ch\'e -- ri, je t'aime. }
3535 @cindex stanza number
3536 @cindex singer's names
3537 @cindex name of singer
3539 Stanza numbers can be added by setting @code{LyricsVoice.stanza}, e.g.
3542 \property LyricsVoice . stanza = "Bert"
3544 \property LyricsVoice . stanza = "Ernie"
3547 Notice how dots are surrounded with spaces in @code{\lyrics} mode, to
3548 prevent @code{LyricsVoice.stanza} being interpreted as a single
3551 Names of the singers should be added using @code{LyricsVoice
3552 . instrument} and @code{LyricsVoice . instr}, analogous to instrument
3553 annotations for staves.
3555 To make empty spaces in lyrics, use @code{\skip}.
3563 Input for lyrics introduces a syntactical ambiguity:
3570 is interpreted as assigning a string identifier @code{\foo} such that
3571 it contains @code{"bar"}. However, it could also be interpreted as
3572 making or a music identifier @code{\foo} containing the syllable
3573 `bar'. The force the latter interpretation, use
3583 The term @emph{ambitus} (plural: ambituses) denotes a range of pitches
3584 for a given voice in a part of music. It also may denote the pitch
3585 range that a musical instrument is capable of playing. Most musical
3586 instruments have their ambitus standardized (or at least there is
3587 agreement upon the minimal ambitus of a particular type of
3588 instrument), such that a composer or arranger of a piece of music can
3589 easily meet the ambitus constraints of the targeted instrument.
3590 However, the ambitus of the human voice depends on individual
3591 physiological state, including education and training of the voice.
3592 Therefore, a singer potentially has to check for each piece of music
3593 if the ambitus of that piece meets his individual capabilities. This
3594 is why the ambitus of a piece may be of particular value to vocal
3597 The ambitus is typically notated on a per-voice basis at the very
3598 beginning of a piece, e.g. nearby the initial clef or time signature of
3599 each staff. The range is graphically specified by two noteheads, that
3600 represent the minimum and maximum pitch. Some publishers use a textual
3601 notation: they put the range in words in front of the corresponding
3602 staff. LilyPond only supports the graphical ambitus notation.
3604 To apply, add the @internalsref{Ambitus_engraver} to the
3605 @internalsref{Voice} context, i.e.
3611 \consists Ambitus_engraver
3616 This results in the following output:
3617 @lilypond[singleline]
3618 upper = \notes \relative c {
3621 as'' c e2 bes f cis d4 e f2 g
3623 lower = \notes \relative c {
3626 e'4 b g a c es fis a cis b a g f e d2
3629 \context ChoirStaff {
3631 \new Staff { \upper }
3632 \new Staff { \lower }
3638 \consists Ambitus_engraver
3644 If you have multiple voices in a single staff, and you want a single
3645 ambitus per staff rather than per each voice, then add the
3646 @internalsref{Ambitus_engraver} to the @internalsref{Staff} context
3647 rather than to the @internalsref{Voice} context.
3649 It is possible to tune individual ambituses for multiple voices on a
3650 single staff, for example by erasing or shifting them horizontally. An
3651 example is in @inputfileref{input/test,ambitus-mixed.ly}
3655 @internalsref{Ambitus}, @inputfileref{input/regression,ambitus.ly},
3656 @inputfileref{input/test,ambitus-mixed.ly}.
3660 There is no collision handling in the case of multiple per-voice
3666 Tablature notation is used for notating music for plucked string
3667 instruments. It notates pitches not by using note heads, but by
3668 indicating on which string and fret a note must be played. LilyPond
3669 offers limited support for tablature.
3672 * Tablatures basic::
3673 * Non-guitar tablatures::
3676 @node Tablatures basic
3677 @subsection Tablatures basic
3678 @cindex Tablatures basic
3680 The string number associated to a note is given as a backslash
3681 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3682 string. By default, string 1 is the highest one, and the tuning
3683 defaults to the standard guitar tuning (with 6 strings). The notes
3684 are printed as tablature, by using @internalsref{TabStaff} and
3685 @internalsref{TabVoice} contexts:
3687 @lilypond[fragment,verbatim]
3688 \notes \context TabStaff {
3694 When no string is specified, the first string that does not give a
3695 fret number less than @code{minimumFret} is selected. The default
3696 value for @code{minimumFret} is 0:
3700 e8 fis gis a b cis' dis' e'
3701 \property TabStaff.minimumFret = #8
3702 e8 fis gis a b cis' dis' e'
3707 e8 fis gis a b cis' dis' e'
3708 \property TabStaff.minimumFret = #8
3709 e8 fis gis a b cis' dis' e'
3712 \context StaffGroup <<
3713 \context Staff { \clef "G_8" \frag }
3714 \context TabStaff { \frag }
3721 @internalsref{TabStaff}, @internalsref{TabVoice}, and
3722 @internalsref{StringNumberEvent}.
3726 Chords are not handled in a special way, and hence the automatic
3727 string selector may easily select the same string to two notes in a
3731 @node Non-guitar tablatures
3732 @subsection Non-guitar tablatures
3733 @cindex Non-guitar tablatures
3735 You can change the number of strings, by setting the number of lines
3736 in the @internalsref{TabStaff}.
3738 You can change the tuning of the strings. A string tuning is given as
3739 a Scheme list with one integer number for each string, the number
3740 being the pitch (measured in semitones relative to central C) of an
3741 open string. The numbers specified for @code{stringTuning} are the
3742 numbers of semitones to subtract or add, starting the specified pitch
3743 by default middle C, in string order. Thus, the notes are e, a, d, and
3746 @lilypond[fragment,verbatim]
3747 \context TabStaff <<
3748 \property TabStaff.stringTunings = #'(-5 -10 -15 -20)
3751 a,4 c' a e' e c' a e'
3756 It is possible to change the Scheme function to format the tablature
3757 note text. The default is @code{fret-number-tablature-format}, which
3758 uses the fret number. For instruments that do not use this notation,
3759 you can create a special tablature formatting function. This function
3760 takes three argument: string number, string tuning and note pitch.
3764 No guitar special effects have been implemented.
3769 @section Chord names
3772 LilyPond has support for both printing chord names. Chords may be
3773 entered in musical chord notation, i.e. @code{< .. >}, but they can
3774 also be entered by name. Internally, the chords are represented as a
3775 set of pitches, so they can be transposed:
3778 @lilypond[verbatim,singleline]
3779 twoWays = \notes \transpose c c' {
3789 << \context ChordNames \twoWays
3790 \context Voice \twoWays >> }
3793 This example also shows that the chord printing routines do not try to
3794 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3800 * Printing chord names::
3805 @subsection Chords mode
3808 Chord mode is a mode where you can input sets of pitches using common
3809 names. It is introduced by the keyword @code{\chords}.
3810 In chords mode, a chord is entered by the root, which is entered
3811 like a common pitch:
3812 @lilypond[fragment,verbatim,quote, relative=1]
3813 \chords { es4. d8 c2 }
3818 Other chords may be entered by suffixing a colon, and introducing a
3819 modifier, and optionally, a number:
3821 @lilypond[fragment,verbatim,quote]
3822 \chords { e1:m e1:7 e1:m7 }
3824 The first number following the root is taken to be the `type' of the
3825 chord, thirds are added to the root until it reaches the specified
3827 @lilypond[fragment,verbatim]
3828 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3831 @cindex root of chord
3832 @cindex additions, in chords
3833 @cindex removals, in chords
3835 More complex chords may also be constructed adding separate steps
3836 to a chord. Additions are added after the number following
3837 the colon, and are separated by dots:
3839 @lilypond[verbatim,fragment,quote]
3840 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3842 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3844 @lilypond[verbatim,fragment,quote]
3845 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3847 Removals are specified similarly, and are introduced by a caret. They
3848 must come after the additions:
3849 @lilypond[verbatim,fragment]
3850 \chords { c^3 c:7^5 c:9^3.5 }
3853 Modifiers can be used to change pitches. The following modifiers are
3857 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3859 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3862 is the augmented chord. This modifier raises the 5th step.
3864 is the major 7th chord. This modifier raises the 7th step if present.
3866 is the suspended 4th or 2nd. This modifier removes the 3rd
3867 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3870 Modifiers can be mixed with additions:
3871 @lilypond[verbatim,fragment]
3872 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3875 @cindex modifiers, in chords.
3882 Since an unaltered 11 does not sound good when combined with an
3883 unaltered 13, the 11 is removed in this case (unless it is added
3886 @lilypond[fragment,verbatim]
3887 \chords { c:13 c:13.11 c:m13 }
3892 An inversion (putting one pitch of the chord on the bottom), as well
3893 as bass notes, can be specified by appending
3894 @code{/}@var{pitch} to the chord:
3895 @lilypond[fragment,verbatim,center]
3896 \chords { c1 c/g c/f }
3900 A bass note can be added instead of transposed out of the chord,
3901 by using @code{/+}@var{pitch}.
3903 @lilypond[fragment,verbatim,center]
3904 \chords { c1 c/+g c/+f }
3907 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3908 of the commands continue to work, for example, @code{r} and
3909 @code{\skip} can be used to insert rests and spaces, and
3910 @code{\property} may be used to change various settings.
3916 Each step can only be present in a chord once. The following
3917 simply produces the augmented chord, since @code{5+} is interpreted
3920 @lilypond[verbatim,fragment]
3921 \chords { c:5.5-.5+ }
3925 @node Printing chord names
3926 @subsection Printing chord names
3928 @cindex printing chord names
3932 For displaying printed chord names, use the @internalsref{ChordNames} context.
3933 The chords may be entered either using the notation
3934 described above, or directly using @code{<} and @code{>}:
3936 @lilypond[verbatim,singleline]
3938 \chords {a1 b c} <d' f' a'> <e' g' b'>
3942 \context ChordNames \scheme
3943 \context Staff \scheme
3948 You can make the chord changes stand out by setting
3949 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3950 display chord names when there is a change in the chords scheme and at
3951 the start of a new line:
3953 @lilypond[verbatim, linewidth=9cm]
3955 c1:m c:m \break c:m c:m d
3959 \context ChordNames {
3960 \property ChordNames.chordChanges = ##t
3962 \context Staff \transpose c c' \scheme
3967 The default chord name layout is a system for Jazz music, proposed by
3968 Klaus Ignatzek (see @ref{Literature list}). It can be tuned through the
3969 following properties:
3972 @cindex chordNameExceptions
3973 @item chordNameExceptions
3974 This is a list that contains the chords that have special formatting.
3976 @inputfileref{input/regression,chord-name-exceptions.ly}.
3977 @cindex exceptions, chord names.
3980 @cindex majorSevenSymbol
3981 @item majorSevenSymbol
3982 This property contains the markup object used for the 7th step, when
3983 it is major. Predefined options are @code{whiteTriangleMarkup} and
3984 @code{blackTriangleMarkup}. See
3985 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3987 @cindex chordNameSeparator
3988 @item chordNameSeparator
3989 Different parts of a chord name are normally separated by a
3990 slash. By setting @code{chordNameSeparator}, you can specify other
3992 @lilypond[fragment,verbatim]
3993 \context ChordNames \chords {
3995 \property ChordNames.chordNameSeparator
3996 = \markup { \typewriter "|" }
4000 @cindex chordRootNamer
4001 @item chordRootNamer
4002 The root of a chord is usually printed as a letter with an optional
4003 alteration. The transformation from pitch to letter is done by this
4004 function. Special note names (for example, the German ``H'' for a
4005 B-chord) can be produced by storing a new function in this property.
4007 The pre-defined variables @code{\germanChords},
4008 @code{\semiGermanChords} set these variables.
4011 @cindex chordNoteNamer
4012 @item chordNoteNamer
4013 The default is to print single pitch, e.g. the bass note, using the
4014 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
4015 to a specialized function to change this behavior. For example, the
4016 base can be printed in lower case.
4021 There are also two other chord name schemes implemented: an alternate
4022 Jazz chord notation, and a systematic scheme called Banter chords. The
4023 alternate jazz notation is also shown on the chart in @ref{Chord name
4024 chart}. Turning on these styles is described in the input file
4025 @inputfileref{input/test,chord-names-jazz.ly}.
4029 @cindex chords, jazz
4034 @cindex @code{\germanChords}
4035 @code{\germanChords},
4036 @cindex @code{\semiGermanChords}
4037 @code{\semiGermanChords}.
4044 @inputfileref{input/regression,chord-name-major7.ly},
4045 @inputfileref{input/regression,chord-name-exceptions.ly},
4046 @inputfileref{input/test,chord-names-jazz.ly},
4047 @inputfileref{input/test,chord-names-german.ly},
4048 @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
4053 Chord names are determined solely from the list of pitches. Chord
4054 inversions are not identified, and neither are added bass notes. This
4055 may result in strange chord names when chords are entered with the
4056 @code{< .. >} syntax.
4061 @node Orchestral music
4062 @section Orchestral music
4064 @cindex Writing parts
4066 Orchestral music involves some special notation, both in the full
4067 score and the individual parts. This section explains how to tackle
4068 some common problems in orchestral music.
4073 * Multiple staff contexts::
4076 * Instrument names::
4078 * Multi measure rests::
4079 * Automatic part combining::
4081 * Different editions from one source::
4082 * Sound output for transposing instruments::
4085 @node Multiple staff contexts
4086 @subsection Multiple staff contexts
4088 Polyphonic scores consist of many staves. These staves can be
4089 constructed in three different ways:
4091 @item The group is started with a brace at the left. This is done with the
4092 @internalsref{GrandStaff} context.
4093 @item The group is started with a bracket. This is done with the
4094 @internalsref{StaffGroup} context
4095 @item The group is started with a vertical line. This is the default
4099 @cindex Staff, multiple
4100 @cindex bracket, vertical
4101 @cindex brace, vertical
4108 @node Rehearsal marks
4109 @subsection Rehearsal marks
4110 @cindex Rehearsal marks
4112 @cindex @code{\mark}
4114 To print a rehearsal mark, use the @code{\mark} command:
4115 @lilypond[fragment,verbatim]
4125 The mark is incremented automatically if you use @code{\mark
4126 \default}. The value to use is stored in the property
4127 @code{rehearsalMark} is used and automatically incremented.
4129 The @code{\mark} command can also be used to put signs like coda,
4130 segno and fermatas on a barline. Use @code{\markup} to
4131 to access the appropriate symbol:
4133 @lilypond[fragment,verbatim,relative=1]
4134 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4138 In this case, during line breaks,
4139 marks must also be printed at the end of the line, and not at the
4140 beginning. Use the following to force that behavior:
4142 \property Score.RehearsalMark \override
4143 #'break-visibility = #begin-of-line-invisible
4146 See @inputfileref{input/test,boxed-molecule.ly} for putting boxes
4152 @cindex barlines, putting symbols on
4156 @internalsref{MarkEvent}, @internalsref{RehearsalMark}, and
4157 @inputfileref{input/test,boxed-molecule.ly}.
4161 @subsection Bar numbers
4165 @cindex measure numbers
4166 @cindex currentBarNumber
4168 Bar numbers are printed by default at the start of the line. The
4169 number itself is stored in the
4170 @code{currentBarNumber} property,
4171 which is normally updated automatically for every measure.
4173 Bar numbers can be typeset at regular intervals instead of at the
4174 beginning of each line. This is illustrated in the following example,
4175 whose source is available as
4176 @inputfileref{input/test,bar-number-regular-interval.ly}:
4178 @lilypondfile[notexidoc]{bar-number-regular-interval.ly}
4183 @internalsref{BarNumber},
4184 @inputfileref{input/test,bar-number-every-five-reset.ly}, and
4185 @inputfileref{input/test,bar-number-regular-interval.ly}.
4189 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4190 there is one at the top. To solve this, the
4191 @code{padding} property of @internalsref{BarNumber} can be
4192 used to position the number correctly.
4194 @node Instrument names
4195 @subsection Instrument names
4197 In an orchestral score, instrument names are printed left side of the
4200 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4201 and @internalsref{Staff}.@code{instr}. This will print a string before
4202 the start of the staff. For the first start, @code{instrument} is
4203 used, for the next ones @code{instr} is used:
4206 @lilypond[verbatim,singleline]
4207 \property Staff.instrument = "ploink " { c''4 }
4211 You can also use markup texts to construct more complicated instrument
4215 @lilypond[fragment,verbatim,singleline]
4217 \property Staff.instrument = \markup {
4218 \column < "Clarinetti"
4220 \smaller \musicglyph #"accidentals--1"
4231 @internalsref{InstrumentName}.
4235 When you put a name on a grand staff or piano staff the width of the
4236 brace is not taken into account. You must add extra spaces to the end of
4237 the name to avoid a collision.
4240 @subsection Transpose
4242 @cindex transposition of pitches
4243 @cindex @code{\transpose}
4245 A music expression can be transposed with @code{\transpose}. The syntax
4248 \transpose @var{from} @var{to} @var{musicexpr}
4251 This means that @var{musicexpr} is transposed by the interval
4252 between @var{from} and @var{to}.
4254 @code{\transpose} distinguishes between enharmonic pitches: both
4255 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4256 half a tone. The first version will print sharps and the second
4257 version will print flats:
4259 @lilypond[singleline, verbatim]
4260 mus =\notes { \key d \major cis d fis g }
4261 \score { \notes \context Staff {
4264 \transpose c g' \mus
4265 \transpose c f' \mus
4271 @internalsref{TransposedMusic}, and @internalsref{UntransposableMusic}.
4275 If you want to use both @code{\transpose} and @code{\relative}, then
4276 you must put @code{\transpose} outside of @code{\relative}, since
4277 @code{\relative} will have no effect music that appears inside a
4283 @node Multi measure rests
4284 @subsection Multi measure rests
4285 @cindex multi measure rests
4286 @cindex Rests, multi measure
4290 Multi measure rests are entered using `@code{R}'. It is specifically
4291 meant for full bar rests and for entering parts: the rest can expand
4292 to fill a score with rests, or it can be printed as a single
4293 multimeasure rest. This expansion is controlled by the property
4294 @code{Score.skipBars}. If this is set to true, empty measures will not
4295 be expanded, and the appropriate number is added automatically:
4297 @lilypond[fragment,verbatim]
4298 \time 4/4 r1 | R1 | R1*2
4299 \property Score.skipBars = ##t R1*17 R1*4
4302 The @code{1} in @code{R1} is similar to the duration notation used for
4303 notes. Hence, for time signatures other than 4/4, you must enter other
4304 durations. This can be done with augmentation dots or fractions:
4306 @lilypond[fragment,verbatim]
4307 \property Score.skipBars = ##t
4315 An @code{R} spanning a single measure is printed as either a whole rest
4316 or a breve, centered in the measure regardless of the time signature.
4318 @cindex text on multi-measure rest
4319 @cindex script on multi-measure rest
4320 @cindex fermata on multi-measure rest
4322 Texts can be added to multi-measure rests by using the
4323 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4324 replaced. If you need both texts and the number, you must add the
4325 number by hand. A variable (@code{\fermataMarkup}) is provided for
4329 @lilypond[verbatim,fragment]
4331 R2._\markup { "Ad lib" }
4335 If you want to have a text on the left end of a multi-measure rest,
4336 attach the text to a zero-length skip note, i.e.
4344 @cindex whole rests for a full measure
4348 @internalsref{MultiMeasureRestEvent},
4349 @internalsref{MultiMeasureTextEvent},
4350 @internalsref{MultiMeasureRestMusicGroup}, and
4351 @internalsref{MultiMeasureRest}.
4353 The layout object @internalsref{MultiMeasureRestNumber} is for the
4354 default number, and @internalsref{MultiMeasureRestText} for user
4359 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4360 over multi-measure rests.
4362 @cindex condensing rests
4364 There is no way to automatically condense multiple rests into a single
4365 multimeasure rest. Multi measure rests do not take part in rest
4368 Be careful when entering multimeasure rests followed by whole
4369 notes. The following will enter two notes lasting four measures each:
4373 When @code{skipBars} is set, then the result will look OK, but the
4374 bar numbering will be off.
4376 @node Automatic part combining
4377 @subsection Automatic part combining
4378 @cindex automatic part combining
4379 @cindex part combiner
4382 Automatic part combining is used to merge two parts of music onto a
4383 staff. It is aimed at typesetting orchestral scores. When the two
4384 parts are identical for a period of time, only one is shown. In
4385 places where the two parts differ, they are typeset as separate
4386 voices, and stem directions are set automatically. Also, solo and
4387 @emph{a due} parts are identified and can be marked.
4391 The syntax for part combining is
4394 \partcombine @var{context} @var{musicexpr1} @var{musicexpr2}
4396 where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
4397 combined into one context of type @var{context}. The music expressions
4398 must be interpreted by contexts whose names should start with @code{one}
4401 The following example demonstrates the basic functionality of the part
4402 combiner: putting parts on one staff, and setting stem directions and
4405 @lilypond[verbatim,singleline,fragment]
4407 \context Voice=one \partcombine Voice
4408 \context Thread=one \relative c'' {
4411 \context Thread=two \relative c'' {
4417 The first @code{g} appears only once, although it was
4418 specified twice (once in each part). Stem, slur and tie directions are
4419 set automatically, depending whether there is a solo or unisono. The
4420 first part (with context called @code{one}) always gets up stems, and
4421 `solo', while the second (called @code{two}) always gets down stems and
4424 If you just want the merging parts, and not the textual markings, you
4425 may set the property @var{soloADue} to false:
4427 @lilypond[verbatim,singleline,fragment]
4429 \property Staff.soloADue = ##f
4430 \context Voice=one \partcombine Voice
4431 \context Thread=one \relative c'' {
4434 \context Thread=two \relative c'' {
4442 @internalsref{PartCombineMusic},
4443 @internalsref{Thread_devnull_engraver}, and
4444 @internalsref{Voice_devnull_engraver} and @internalsref{A2_engraver}.
4448 The syntax for naming contexts in inconsistent with the syntax for
4451 In @code{soloADue} mode, when the two voices play the same notes on and
4452 off, the part combiner may typeset @code{a2} more than once in a
4455 @lilypond[fragment,singleline]
4457 \context Voice=one \partcombine Voice
4458 \context Thread=one \relative c'' {
4461 \context Thread=two \relative c'' {
4467 The part combiner is rather buggy, and it will be replaced by a better
4468 mechanism in the near future.
4470 @cindex @code{Thread_devnull_engraver}
4471 @cindex @code{Voice_engraver}
4472 @cindex @code{A2_engraver}
4475 @subsection Hiding staves
4477 @cindex Frenched scores
4478 @cindex Hiding staves
4480 In orchestral scores, staff lines that only have rests are usually
4481 removed. This saves some space. This style is called `French Score'.
4482 For @internalsref{Lyrics}, @internalsref{LyricsVoice},
4483 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4484 switched on by default. When these line of these contexts turn out
4485 empty after the line-breaking process, they are removed.
4487 For normal staves, a specialized @internalsref{Staff} context is
4488 available, which does the same: staves containing nothing (or only
4489 multi measure rests) are removed. The context definition is stored in
4490 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4491 in this example disappears in the second line:
4496 \notes \relative c' <<
4497 \new Staff { e4 f g a \break c1 }
4498 \new Staff { c4 d e f \break R1 }
4502 \translator { \RemoveEmptyStaffContext }
4507 The first page shows all staffs in full. If they should be removed
4508 from the first page too, set @code{remove-first} to false
4509 in @internalsref{RemoveEmptyVerticalGroup}.
4511 @node Different editions from one source
4512 @subsection Different editions from one source
4514 The @code{\tag} command marks music expressions with a name. These
4515 tagged expressions can be filtered out later. With this mechanism it
4516 is possible to make different versions of the same music source.
4518 In the following example, we see two versions of a piece of music, one
4519 for the full score, and one with cue notes for the instrumental part:
4527 \property Voice.fontSize = #-1
4535 The same can be applied to articulations, texts, etc.: they are
4538 -\tag #@var{your-tag}
4540 to an articulation, for example,
4545 This defines a note with a conditional fingering indication.
4547 By applying the @code{remove-tag} function, tagged expressions can be
4548 filtered. For example,
4552 \apply #(remove-tag 'score) @var{the music}
4553 \apply #(remove-tag 'part) @var{the music}
4558 @lilypondfile[notexidoc]{tag-filter.ly}
4560 The argument of the @code{\tag} command should be a symbol, or a list
4561 of symbols, for example,
4563 \tag #'(original-part transposed-part) @dots{}
4568 @inputfileref{input/regression,tag-filter.ly}
4571 @node Sound output for transposing instruments
4572 @subsection Sound output for transposing instruments
4574 When you want to make a MIDI file from a score containing transposed
4575 and untransposed instruments, you have to instruct LilyPond the pitch
4576 offset (in semitones) for the transposed instruments. This is done
4577 using the @code{transposing} property. It does not affect printed
4580 @cindex @code{transposing}
4583 \property Staff.instrument = #"Cl. in B-flat"
4584 \property Staff.transposing = #-2
4588 @node Ancient notation
4589 @section Ancient notation
4591 @cindex Vaticana, Editio
4592 @cindex Medicaea, Editio
4597 @c [TODO: write more comprehensive introduction on ancient notation]
4599 Support for ancient notation is still under heavy development.
4600 Regardless of all of the current limitations (see the bugs section
4601 below for details), it includes features for mensural
4602 notation and Gregorian Chant notation. There is also limited support
4603 for figured bass notation.
4605 Many graphical objects provide a @code{style} property, see
4606 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4607 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4608 signatures}. By manipulating such a grob property, the typographical
4609 appearance of the affected graphical objects can be accomodated for a
4610 specific notation flavour without need for introducing any new
4614 Other aspects of ancient notation can not that easily be expressed as
4615 in terms of just changing a style property of a graphical object.
4616 Therefore, some notational concepts are introduced specifically for
4617 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4618 @ref{Ligatures}, and @ref{Figured bass}.
4622 * Ancient note heads::
4623 * Ancient accidentals::
4627 * Ancient time signatures::
4632 * Vaticana style contexts::
4635 If this all is way too much of documentation for you, and you just
4636 want to dive into typesetting without worrying too much about the
4637 details on how to customize a context, then you may have a look at the
4638 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4639 set up predefined style-specific voice and staff contexts, and
4640 directly go ahead with the note entry.
4644 Ligatures need special spacing that has not yet been implemented. As
4645 a result, there is too much space between ligatures most of the time,
4646 and line breaking often is unsatisfactory. Also, lyrics do not
4647 correctly align with ligatures.
4649 Accidentals must not be printed within a ligature, but instead need to
4650 be collected and printed in front of it.
4652 Augmentum dots within ligatures are not handled correctly.
4655 @node Ancient note heads
4656 @subsection Ancient note heads
4662 For ancient notation, a note head style other than the @code{default}
4663 style may be chosen. This is accomplished by setting the @code{style}
4664 property of the NoteHead object to the desired value (@code{baroque},
4665 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4666 differs from the @code{default} style only in using a square shape for
4667 @code{\breve} note heads. The @code{neo_mensural} style differs from
4668 the @code{baroque} style in that it uses rhomboidal heads for whole
4669 notes and all smaller durations. Stems are centered on the note
4670 heads. This style is in particular useful when transcribing mensural
4671 music, e.g. for the incipit. The @code{mensural} style finally
4672 produces note heads that mimick the look of note heads in historic
4673 printings of the 16th century.
4675 The following example demonstrates the @code{neo_mensural} style:
4677 @lilypond[fragment,singleline,verbatim]
4678 \property Voice.NoteHead \set #'style = #'neo_mensural
4679 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4682 When typesetting a piece in Gregorian Chant notation, a Gregorian
4683 ligature engraver will automatically select the proper note heads,
4684 such there is no need to explicitly set the note head style. Still,
4685 the note head style can be set e.g. to @code{vaticana_punctum} to
4686 produce punctum neumes. Similarly, a mensural ligature engraver is
4687 used to automatically assemble mensural ligatures. See
4688 @ref{Ligatures} for how ligature engravers work.
4692 @inputfileref{input/regression,note-head-style.ly} gives an overview
4693 over all available note head styles.
4695 @ref{Percussion staves} use note head styles of their own that are
4696 frequently used in contemporary music notation.
4698 @node Ancient accidentals
4699 @subsection Ancient accidentals
4705 Use the @code{style} property of grob @internalsref{Accidental} to
4706 select ancient accidentals. Supported styles are
4707 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4709 @lilypond[singleline,26pt]
4717 { " " \musicglyph #"accidentals-vaticana-1"
4718 " " \musicglyph #"accidentals-vaticana0" }
4722 { " " \musicglyph #"accidentals-medicaea-1" }
4726 { " " \musicglyph #"accidentals-hufnagel-1" }
4730 { " " \musicglyph #"accidentals-mensural-1"
4731 " " \musicglyph #"accidentals-mensural1" }
4740 \remove "Bar_number_engraver"
4744 \remove "Clef_engraver"
4745 \remove "Key_engraver"
4746 \remove "Time_signature_engraver"
4747 \remove "Staff_symbol_engraver"
4748 minimumVerticalExtent = ##f
4754 As shown, not all accidentals are supported by each style. When
4755 trying to access an unsupported accidental, LilyPond will switch to a
4756 different style, as demonstrated in
4757 @inputfileref{input/test,ancient-accidentals.ly}.
4759 Similarly to local accidentals, the style of the key signature can be
4760 controlled by the @code{style} property of the
4761 @internalsref{KeySignature} grob.
4765 @ref{Pitches}, @ref{Chromatic alterations} and @ref{Accidentals} give
4766 a general introduction into the use of accidentals. @ref{Key
4767 signature} gives a general introduction into the use of key
4772 @subsection Ancient rests
4778 Use the @code{style} property of grob @internalsref{Rest} to select
4779 ancient accidentals. Supported styles are @code{classical},
4780 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4781 from the @code{default} style only in that the quarter rest looks like
4782 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4783 well for e.g. the incipit of a transcribed mensural piece of music.
4784 The @code{mensural} style finally mimicks the appearance of rests as
4785 in historic prints of the 16th century.
4787 The following example demonstrates the @code{neo_mensural} style:
4789 @lilypond[fragment,singleline,verbatim]
4790 \property Voice.Rest \set #'style = #'neo_mensural
4791 r\longa r\breve r1 r2 r4 r8 r16
4794 There are no 32th and 64th rests specifically for the mensural or
4795 neo-mensural style. Instead, the rests from the default style will be
4796 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4799 There are no rests in Gregorian Chant notation; instead, it uses
4804 @ref{Rests} gives a general introduction into the use of rests.
4808 @subsection Ancient clefs
4814 LilyPond supports a variety of clefs, many of them ancient.
4816 The following table shows all ancient clefs that are supported via the
4817 @code{\clef} command. Some of the clefs use the same glyph, but
4818 differ only with respect to the line they are printed on. In such
4819 cases, a trailing number in the name is used to enumerate these clefs.
4820 Still, you can manually force a clef glyph to be typeset on an
4821 arbitrary line, as described in @ref{Clef}. The note printed to the
4822 right side of each clef in the example column denotes the @code{c'}
4823 with respect to that clef.
4825 @multitable @columnfractions .3 .3 .3 .1
4829 @b{Description} @tab
4830 @b{Supported Clefs} @tab
4834 @code{clefs-neo_mensural_c} @tab
4835 modern style mensural C clef @tab
4836 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4837 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4838 @lilypond[relative 0, notime]
4839 \property Staff.TimeSignature \set #'transparent = ##t
4840 \clef "neo_mensural_c2" c
4844 @code{clefs-petrucci_c1}
4845 @code{clefs-petrucci_c2}
4846 @code{clefs-petrucci_c3}
4847 @code{clefs-petrucci_c4}
4848 @code{clefs-petrucci_c5}
4851 petrucci style mensural C clefs, for use on different stafflines
4852 (the examples shows the 2nd staffline C clef).
4862 @lilypond[relative 0, notime]
4863 \property Staff.TimeSignature \set #'transparent = ##t
4864 \clef "petrucci_c2" c
4868 @code{clefs-petrucci_f} @tab
4869 petrucci style mensural F clef @tab
4870 @code{petrucci_f} @tab
4871 @lilypond[relative 0, notime]
4872 \property Staff.TimeSignature \set #'transparent = ##t
4873 \clef "petrucci_f" c
4877 @code{clefs-petrucci_g} @tab
4878 petrucci style mensural G clef @tab
4879 @code{petrucci_g} @tab
4880 @lilypond[relative 0, notime]
4881 \property Staff.TimeSignature \set #'transparent = ##t
4882 \clef "petrucci_g" c
4886 @code{clefs-mensural_c} @tab
4887 historic style mensural C clef @tab
4888 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4889 @code{mensural_c4} @tab
4890 @lilypond[relative 0, notime]
4891 \property Staff.TimeSignature \set #'transparent = ##t
4892 \clef "mensural_c2" c
4896 @code{clefs-mensural_f} @tab
4897 historic style mensural F clef @tab
4898 @code{mensural_f} @tab
4899 @lilypond[relative 0, notime]
4900 \property Staff.TimeSignature \set #'transparent = ##t
4901 \clef "mensural_f" c
4905 @code{clefs-mensural_g} @tab
4906 historic style mensural G clef @tab
4907 @code{mensural_g} @tab
4908 @lilypond[relative 0, notime]
4909 \property Staff.TimeSignature \set #'transparent = ##t
4910 \clef "mensural_g" c
4914 @code{clefs-vaticana_do} @tab
4915 Editio Vaticana style do clef @tab
4916 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4917 @lilypond[relative 0, notime]
4918 \property Staff.StaffSymbol \set #'line-count = #4
4919 \property Staff.TimeSignature \set #'transparent = ##t
4920 \clef "vaticana_do2" c
4924 @code{clefs-vaticana_fa} @tab
4925 Editio Vaticana style fa clef @tab
4926 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4927 @lilypond[relative 0, notime]
4928 \property Staff.StaffSymbol \set #'line-count = #4
4929 \property Staff.TimeSignature \set #'transparent = ##t
4930 \clef "vaticana_fa2" c
4934 @code{clefs-medicaea_do} @tab
4935 Editio Medicaea style do clef @tab
4936 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4937 @lilypond[relative 0, notime]
4938 \property Staff.StaffSymbol \set #'line-count = #4
4939 \property Staff.TimeSignature \set #'transparent = ##t
4940 \clef "medicaea_do2" c
4944 @code{clefs-medicaea_fa} @tab
4945 Editio Medicaea style fa clef @tab
4946 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4947 @lilypond[relative 0, notime]
4948 \property Staff.StaffSymbol \set #'line-count = #4
4949 \property Staff.TimeSignature \set #'transparent = ##t
4950 \clef "medicaea_fa2" c
4954 @code{clefs-hufnagel_do} @tab
4955 historic style hufnagel do clef @tab
4956 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
4957 @lilypond[relative 0, notime]
4958 \property Staff.StaffSymbol \set #'line-count = #4
4959 \property Staff.TimeSignature \set #'transparent = ##t
4960 \clef "hufnagel_do2" c
4964 @code{clefs-hufnagel_fa} @tab
4965 historic style hufnagel fa clef @tab
4966 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
4967 @lilypond[relative 0, notime]
4968 \property Staff.StaffSymbol \set #'line-count = #4
4969 \property Staff.TimeSignature \set #'transparent = ##t
4970 \clef "hufnagel_fa2" c
4974 @code{clefs-hufnagel_do_fa} @tab
4975 historic style hufnagel combined do/fa clef @tab
4976 @code{hufnagel_do_fa} @tab
4977 @lilypond[relative 0, notime]
4978 \property Staff.TimeSignature \set #'transparent = ##t
4979 \clef "hufnagel_do_fa" c
4984 @c --- This should go somewhere else: ---
4985 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
4988 @c @code{percussion}
4990 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
4992 @c @item modern style tab clef (glyph: @code{clefs-tab})
4997 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
4999 @emph{Modern style} means ``as is typeset in contemporary editions of
5000 transcribed mensural music''.
5002 @emph{Petrucci style} means ``inspired by printings published by the
5003 famous engraver Petrucci (1466-1539)''.
5005 @emph{Historic style} means ``as was typeset or written in historic
5006 editions (other than those of Petrucci)''.
5008 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
5010 Petrucci used C clefs with differently balanced left-side vertical
5011 beams, depending on which staffline it is printed.
5015 For modern clefs, see @ref{Clef}. For the percussion clef, see
5016 @ref{Percussion staves}. For the @code{TAB} clef, see
5021 @subsection Ancient flags
5027 Use the @code{flag-style} property of grob @internalsref{Stem} to
5028 select ancient flags. Besides the @code{default} flag style,
5029 only @code{mensural} style is supported:
5031 @lilypond[fragment,singleline,verbatim]
5032 \property Voice.Stem \set #'flag-style = #'mensural
5033 \property Voice.Stem \set #'thickness = #1.0
5034 \property Voice.NoteHead \set #'style = #'mensural
5036 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
5037 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5040 Note that the innermost flare of each mensural flag always is
5041 vertically aligned with a staff line. If you do not like this
5042 behaviour, you can set the @code{adjust-if-on-staffline} property of
5043 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
5044 of the end of each flare is different between notes on staff lines and
5045 notes between staff lines:
5047 @lilypond[fragment,singleline]
5048 \property Voice.Stem \set #'flag-style = #'mensural
5049 \property Voice.Stem \set #'thickness = #1.0
5050 \property Voice.Stem \set #'adjust-if-on-staffline = ##f
5051 \property Voice.NoteHead \set #'style = #'mensural
5053 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
5054 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
5057 There is no particular flag style for neo-mensural notation. Hence,
5058 when typesetting e.g. the incipit of a transcibed piece of mensural
5059 music, the default flag style should be used. There are no flags in
5060 Gregorian Chant notation.
5063 @node Ancient time signatures
5064 @subsection Ancient time signatures
5066 @cindex time signatures
5070 There is limited support for mensural time signatures. The
5071 glyphs are hard-wired to particular time fractions. In other words,
5072 to get a particular mensural signature glyph with the @code{\time n/m}
5073 command, @code{n} and @code{m} have to be chosen according to the
5079 \property Score.timing = ##f
5080 \property Score.barAlways = ##t
5081 s_\markup { "$\\backslash$time 4/4" }
5082 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/4" }
5084 s_\markup { "$\\backslash$time 2/2" }
5085 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/2" }
5087 s_\markup { "$\\backslash$time 6/4" }
5088 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/4" }
5090 s_\markup { "$\\backslash$time 6/8" }
5091 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/8" }
5093 s_\markup { "$\\backslash$time 3/2" }
5094 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/2" }
5096 s_\markup { "$\\backslash$time 3/4" }
5097 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/4" }
5099 s_\markup { "$\\backslash$time 9/4" }
5100 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/4" }
5102 s_\markup { "$\\backslash$time 9/8" }
5103 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/8" }
5105 s_\markup { "$\\backslash$time 4/8" }
5106 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/8" }
5108 s_\markup { "$\\backslash$time 2/4" }
5109 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/4" }
5117 \remove Staff_symbol_engraver
5118 \remove Clef_engraver
5119 \remove Time_signature_engraver
5125 Use the @code{style} property of grob @internalsref{TimeSignature} to
5126 select ancient time signatures. Supported styles are
5127 @code{neo_mensural} and @code{mensural}. The above table uses the
5128 @code{neo_mensural} style. This style is appropriate e.g. for the
5129 incipit of transcriptions of mensural pieces. The @code{mensural}
5130 style mimicks the look of historical printings of the 16th century.
5132 @inputfileref{input/test,time.ly} gives an overview over all available
5133 ancient and modern styles.
5137 @ref{Time signature} gives a general introduction into the use of time
5142 Mensural signature glyphs are mapped to time fractions in a
5143 hard-wired way. This mapping is sensible, but still arbitrary: given
5144 a mensural time signature, the time fraction represents a modern meter
5145 that usually will be a good choice when transcribing a mensural piece
5146 of music. For a particular piece of mensural music, however, the
5147 mapping may be unsatisfactory. In particular, the mapping assumes a
5148 fixed transcription of durations (e.g. brevis = half note in 2/2,
5149 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
5150 are not at all accessible through the @code{\time} command.
5152 Mensural time signatures are supported typographically, but not yet
5153 musically. The internal representation of durations is
5154 based on a purely binary system; a ternary division such as 1 brevis =
5155 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
5156 prolatione maiori) is not correctly handled: event times in ternary
5157 modes will be badly computed, resulting e.g. in horizontally
5158 misaligned note heads, and bar checks are likely to erroneously fail.
5160 The syntax and semantics of the @code{\time} command for mensural
5161 music is subject to change.
5164 @subsection Custodes
5169 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5170 symbol that appears at the end of a staff. It anticipates the pitch
5171 of the first note(s) of the following line and thus helps the player
5172 or singer to manage line breaks during performance, thus enhancing
5173 readability of a score.
5175 Custodes were frequently used in music notation until the 17th
5176 century. Nowadays, they have survived only in a few particular forms
5177 of musical notation such as contemporary editions of Gregorian chant
5178 like the @emph{editio vaticana}. There are different custos glyphs
5179 used in different flavours of notational style.
5183 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5184 @internalsref{Staff} context when declaring the @code{\paper} block,
5185 as shown in the following example:
5191 \consists Custos_engraver
5192 Custos \override #'style = #'mensural
5197 The result looks like this:
5203 \property Staff.Custos \set #'style = #'mensural
5210 \consists Custos_engraver
5217 The custos glyph is selected by the @code{style} property. The styles
5218 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5219 @code{mensural}. They are demonstrated in the following fragment:
5229 { " " \musicglyph #"custodes-vaticana-u0" }
5233 { " " \musicglyph #"custodes-medicaea-u0" }
5237 { " " \musicglyph #"custodes-hufnagel-u0" }
5241 { " " \musicglyph #"custodes-mensural-u0" }
5250 \remove "Bar_number_engraver"
5254 \remove "Clef_engraver"
5255 \remove "Key_engraver"
5256 \remove "Time_signature_engraver"
5257 \remove "Staff_symbol_engraver"
5258 minimumVerticalExtent = ##f
5264 If the boolean property @code{adjust-if-on-staffline} is set to
5265 @code{#t} (which it is by default), lily typesets slightly different
5266 variants of the custos glyph, depending on whether the custos, is
5267 typeset on or between stafflines. The glyph will
5268 optically fit well into the staff, with the appendage on the right of
5269 the custos always ending at the same vertical position between two
5270 stafflines regardless of the pitch. If you set
5271 @code{adjust-if-on-staffline} to @code{#f}, then
5272 a compromise between both forms is used.
5274 Just like stems can be attached to noteheads in two directions
5275 @emph{up} and @emph{down}, each custos glyph is available with its
5276 appendage pointing either up or down. If the pitch of a custos is
5277 above a selectable position, the appendage will point downwards; if
5278 the pitch is below this position, the appendage will point upwards.
5279 Use property @code{neutral-position} to select this position. By
5280 default, it is set to @code{0}, such that the neutral position is the
5281 center of the staff. Use property @code{neutral-direction} to control
5282 what happens if a custos is typeset on the neutral position itself.
5283 By default, this property is set to @code{-1}, such that the appendage
5284 will point downwards. If set to @code{1}, the appendage will point
5285 upwards. Other values such as @code{0} are reserved for future
5286 extensions and should not be used.
5290 @internalsref{Custos} and @inputfileref{input/regression,custos.ly}.
5294 @subsection Divisiones
5300 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5301 `division') is a staff context symbol that is used to structure
5302 Gregorian music into phrases and sections. The musical meaning of
5303 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5304 can be characterized as short, medium and long pause, somewhat like
5305 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5306 a chant, but is also frequently used within a single
5307 antiphonal/responsorial chant to mark the end of each section.
5311 To use divisiones, include the file @code{gregorian-init.ly}. It
5312 contains definitions that you can apply by just inserting
5313 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5314 and @code{\finalis} at proper places in the input. Some editions use
5315 @emph{virgula} or @emph{caesura} instead of divisio minima.
5316 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5319 @lilypondfile[notexidoc]{divisiones.ly}
5323 @cindex @code{\virgula}
5325 @cindex @code{\caesura}
5327 @cindex @code{\divisioMinima}
5328 @code{\divisioMinima},
5329 @cindex @code{\divisioMaior}
5330 @code{\divisioMaior},
5331 @cindex @code{\divisioMaxima}
5332 @code{\divisioMaxima},
5333 @cindex @code{\finalis}
5338 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
5339 @inputfileref{input/test,divisiones.ly}, and @ref{Breath marks}.
5342 @subsection Ligatures
5346 @c TODO: Should double check if I recalled things correctly when I wrote
5347 @c down the following paragraph by heart.
5349 In musical terminology, a ligature is a coherent graphical symbol that
5350 represents at least two distinct notes. Ligatures originally appeared
5351 in the manuscripts of Gregorian chant notation roughly since the 9th
5352 century as an allusion to the accent symbols of greek lyric poetry to
5353 denote ascending or descending sequences of notes. Both, the shape
5354 and the exact meaning of ligatures changed tremendously during the
5355 following centuries: In early notation, ligatures were used for
5356 monophonic tunes (Gregorian chant) and very soon denoted also the way
5357 of performance in the sense of articulation. With upcoming
5358 multiphony, the need for a metric system arised, since multiple voices
5359 of a piece have to be synchronized some way. New notation systems
5360 were invented that used the manifold shapes of ligatures to now denote
5361 rhythmical patterns (e.g. black mensural notation, mannered notation,
5362 ars nova). With the invention of the metric system of the white
5363 mensural notation, the need for ligatures to denote such patterns
5364 disappeared. Nevertheless, ligatures were still in use in the
5365 mensural system for a couple of decades until they finally disappeared
5366 during the late 16th / early 17th century. Still, ligatures have
5367 survived in contemporary editions of Gregorian chant such as the
5368 Editio Vaticana from 1905/08.
5372 Syntactically, ligatures are simply enclosed by @code{\[} and
5373 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5374 additional input syntax specific for this particular type of ligature.
5375 By default, the @internalsref{LigatureBracket} engraver just puts a
5376 square bracket above the ligature:
5378 @lilypond[singleline,verbatim]
5380 \notes \transpose c c' {
5388 To select a specific style of ligatures, a proper ligature engraver
5389 has to be added to the @internalsref{Voice} context, as explained in
5390 the following subsections. Only white mensural ligatures
5391 are supported with certain limitations. Support for Editio Vaticana
5392 will be added in the future.
5395 * White mensural ligatures::
5396 * Gregorian square neumes ligatures::
5399 @node White mensural ligatures
5400 @subsubsection White mensural ligatures
5402 @cindex Mensural ligatures
5403 @cindex White mensural ligatures
5405 There is limited support for white mensural ligatures. The
5406 implementation is still experimental; it may output strange
5407 warnings or even crash in some cases or produce weird results on more
5412 To engrave white mensural ligatures, in the paper block the
5413 @internalsref{Mensural_ligature_engraver} has to be put into the
5414 @internalsref{Voice} context, and remove the
5415 @internalsref{Ligature_bracket_engraver}:
5421 \remove Ligature_bracket_engraver
5422 \consists Mensural_ligature_engraver
5427 There is no additional input language to describe the shape of a
5428 white mensural ligature. The shape is rather determined solely from
5429 the pitch and duration of the enclosed notes. While this approach may
5430 take a new user a while to get accustomed, it has the great advantage
5431 that the full musical information of the ligature is known internally.
5432 This is not only required for correct MIDI output, but also allows for
5433 automatic transcription of the ligatures.
5438 \property Score.timing = ##f
5439 \property Score.defaultBarType = "empty"
5440 \property Voice.NoteHead \set #'style = #'neo_mensural
5441 \property Staff.TimeSignature \set #'style = #'neo_mensural
5443 \[ g\longa c\breve a\breve f\breve d'\longa \]
5445 \[ e1 f1 a\breve g\longa \]
5447 @lilypond[singleline]
5449 \notes \transpose c c' {
5450 \property Score.timing = ##f
5451 \property Score.defaultBarType = "empty"
5452 \property Voice.NoteHead \set #'style = #'neo_mensural
5453 \property Staff.TimeSignature \set #'style = #'neo_mensural
5455 \[ g\longa c\breve a\breve f\breve d'\longa \]
5457 \[ e1 f1 a\breve g\longa \]
5462 \remove Ligature_bracket_engraver
5463 \consists Mensural_ligature_engraver
5469 Without replacing @internalsref{Ligature_bracket_engraver} with
5470 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5473 @lilypond[singleline]
5475 \notes \transpose c c' {
5476 \property Score.timing = ##f
5477 \property Score.defaultBarType = "empty"
5478 \property Voice.NoteHead \set #'style = #'neo_mensural
5479 \property Staff.TimeSignature \set #'style = #'neo_mensural
5481 \[ g\longa c\breve a\breve f\breve d'\longa \]
5483 \[ e1 f1 a\breve g\longa \]
5489 @node Gregorian square neumes ligatures
5490 @subsubsection Gregorian square neumes ligatures
5492 @cindex Square neumes ligatures
5493 @cindex Gregorian square neumes ligatures
5495 Gregorian square neumes notation (following the style of the Editio
5496 Vaticana) is under heavy development, but not yet really usable for
5497 production purposes. Core ligatures can already be typeset, but
5498 essential issues for serious typesetting are still under development,
5499 such as (among others) horizontal alignment of multiple ligatures,
5500 lyrics alignment and proper accidentals handling. Still, this section
5501 gives a sneak preview of what Gregorian chant may look like once it
5504 The following table contains the extended neumes table of the 2nd
5505 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5506 1983 by the monks of Solesmes.
5508 @multitable @columnfractions .4 .2 .2 .2
5511 @b{Neuma aut@*Neumarum Elementa} @tab
5512 @b{Figurae@*Rectae} @tab
5513 @b{Figurae@*Liquescentes Auctae} @tab
5514 @b{Figurae@*Liquescentes Deminutae}
5516 @c TODO: \paper block is identical in all of the below examples.
5517 @c Therefore, it should somehow be included rather than duplicated all
5520 @c why not make identifiers in ly/engraver-init.ly? --hwn
5522 @c Because it's just used to typeset plain notes without
5523 @c a staff for demonstration purposes rather than something
5524 @c special of Gregorian chant notation. --jr
5529 @lilypond[noindent, 26pt, nofragment, linewidth=1.5cm]
5530 \include "gregorian-init.ly"
5532 \notes \transpose c c' {
5535 \noBreak s^\markup {"a"} \noBreak
5537 % Punctum Inclinatum
5539 \noBreak s^\markup {"b"}
5545 \remove "Bar_number_engraver"
5549 \remove "Clef_engraver"
5550 \remove "Key_engraver"
5551 StaffSymbol \set #'transparent = ##t
5552 \remove "Time_signature_engraver"
5553 \remove "Bar_engraver"
5554 minimumVerticalExtent = ##f
5558 \remove Ligature_bracket_engraver
5559 \consists Vaticana_ligature_engraver
5560 NoteHead \set #'style = #'vaticana_punctum
5561 Stem \set #'transparent = ##t
5567 @lilypond[noindent, 26pt, nofragment, linewidth=2.5cm]
5568 \include "gregorian-init.ly"
5570 \notes \transpose c c' {
5571 % Punctum Auctum Ascendens
5572 \[ \auctum \ascendens b \]
5573 \noBreak s^\markup {"c"} \noBreak
5575 % Punctum Auctum Descendens
5576 \[ \auctum \descendens b \]
5577 \noBreak s^\markup {"d"} \noBreak
5579 % Punctum Inclinatum Auctum
5580 \[ \inclinatum \auctum b \]
5581 \noBreak s^\markup {"e"}
5587 \remove "Bar_number_engraver"
5591 \remove "Clef_engraver"
5592 \remove "Key_engraver"
5593 StaffSymbol \set #'transparent = ##t
5594 \remove "Time_signature_engraver"
5595 \remove "Bar_engraver"
5596 minimumVerticalExtent = ##f
5600 \remove Ligature_bracket_engraver
5601 \consists Vaticana_ligature_engraver
5602 NoteHead \set #'style = #'vaticana_punctum
5603 Stem \set #'transparent = ##t
5609 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5610 \include "gregorian-init.ly"
5612 \notes \transpose c c' {
5613 % Punctum Inclinatum Parvum
5614 \[ \inclinatum \deminutum b \]
5615 \noBreak s^\markup {"f"}
5621 \remove "Bar_number_engraver"
5625 \remove "Clef_engraver"
5626 \remove "Key_engraver"
5627 StaffSymbol \set #'transparent = ##t
5628 \remove "Time_signature_engraver"
5629 \remove "Bar_engraver"
5630 minimumVerticalExtent = ##f
5634 \remove Ligature_bracket_engraver
5635 \consists Vaticana_ligature_engraver
5636 NoteHead \set #'style = #'vaticana_punctum
5637 Stem \set #'transparent = ##t
5646 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5647 \include "gregorian-init.ly"
5649 \notes \transpose c c' {
5652 \noBreak s^\markup {"g"}
5658 \remove "Bar_number_engraver"
5662 \remove "Clef_engraver"
5663 \remove "Key_engraver"
5664 StaffSymbol \set #'transparent = ##t
5665 \remove "Time_signature_engraver"
5666 \remove "Bar_engraver"
5667 minimumVerticalExtent = ##f
5671 \remove Ligature_bracket_engraver
5672 \consists Vaticana_ligature_engraver
5673 NoteHead \set #'style = #'vaticana_punctum
5674 Stem \set #'transparent = ##t
5683 @code{3. Apostropha vel Stropha}
5685 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5686 \include "gregorian-init.ly"
5688 \notes \transpose c c' {
5691 \noBreak s^\markup {"h"}
5697 \remove "Bar_number_engraver"
5701 \remove "Clef_engraver"
5702 \remove "Key_engraver"
5703 StaffSymbol \set #'transparent = ##t
5704 \remove "Time_signature_engraver"
5705 \remove "Bar_engraver"
5706 minimumVerticalExtent = ##f
5710 \remove Ligature_bracket_engraver
5711 \consists Vaticana_ligature_engraver
5712 NoteHead \set #'style = #'vaticana_punctum
5713 Stem \set #'transparent = ##t
5719 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5720 \include "gregorian-init.ly"
5722 \notes \transpose c c' {
5724 \[ \stropha \auctum b \]
5725 \noBreak s^\markup {"i"}
5731 \remove "Bar_number_engraver"
5735 \remove "Clef_engraver"
5736 \remove "Key_engraver"
5737 StaffSymbol \set #'transparent = ##t
5738 \remove "Time_signature_engraver"
5739 \remove "Bar_engraver"
5740 minimumVerticalExtent = ##f
5744 \remove Ligature_bracket_engraver
5745 \consists Vaticana_ligature_engraver
5746 NoteHead \set #'style = #'vaticana_punctum
5747 Stem \set #'transparent = ##t
5757 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5758 \include "gregorian-init.ly"
5760 \notes \transpose c c' {
5763 \noBreak s^\markup {"j"}
5769 \remove "Bar_number_engraver"
5773 \remove "Clef_engraver"
5774 \remove "Key_engraver"
5775 StaffSymbol \set #'transparent = ##t
5776 \remove "Time_signature_engraver"
5777 \remove "Bar_engraver"
5778 minimumVerticalExtent = ##f
5782 \remove Ligature_bracket_engraver
5783 \consists Vaticana_ligature_engraver
5784 NoteHead \set #'style = #'vaticana_punctum
5785 Stem \set #'transparent = ##t
5794 @code{5. Clivis vel Flexa}
5796 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5797 \include "gregorian-init.ly"
5799 \notes \transpose c c' {
5808 \remove "Bar_number_engraver"
5812 \remove "Clef_engraver"
5813 \remove "Key_engraver"
5814 StaffSymbol \set #'transparent = ##t
5815 \remove "Time_signature_engraver"
5816 \remove "Bar_engraver"
5817 minimumVerticalExtent = ##f
5821 \remove Ligature_bracket_engraver
5822 \consists Vaticana_ligature_engraver
5823 NoteHead \set #'style = #'vaticana_punctum
5824 Stem \set #'transparent = ##t
5830 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5831 \include "gregorian-init.ly"
5833 \notes \transpose c c' {
5834 % Clivis Aucta Descendens
5835 \[ b \flexa \auctum \descendens g \]
5836 \noBreak s^\markup {"l"} \noBreak
5838 % Clivis Aucta Ascendens
5839 \[ b \flexa \auctum \ascendens g \]
5840 \noBreak s^\markup {"m"}
5846 \remove "Bar_number_engraver"
5850 \remove "Clef_engraver"
5851 \remove "Key_engraver"
5852 StaffSymbol \set #'transparent = ##t
5853 \remove "Time_signature_engraver"
5854 \remove "Bar_engraver"
5855 minimumVerticalExtent = ##f
5859 \remove Ligature_bracket_engraver
5860 \consists Vaticana_ligature_engraver
5861 NoteHead \set #'style = #'vaticana_punctum
5862 Stem \set #'transparent = ##t
5868 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5869 \include "gregorian-init.ly"
5871 \notes \transpose c c' {
5873 \[ b \flexa \deminutum g \]
5880 \remove "Bar_number_engraver"
5884 \remove "Clef_engraver"
5885 \remove "Key_engraver"
5886 StaffSymbol \set #'transparent = ##t
5887 \remove "Time_signature_engraver"
5888 \remove "Bar_engraver"
5889 minimumVerticalExtent = ##f
5893 \remove Ligature_bracket_engraver
5894 \consists Vaticana_ligature_engraver
5895 NoteHead \set #'style = #'vaticana_punctum
5896 Stem \set #'transparent = ##t
5903 @code{6. Podatus vel Pes}
5905 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5906 \include "gregorian-init.ly"
5908 \notes \transpose c c' {
5917 \remove "Bar_number_engraver"
5921 \remove "Clef_engraver"
5922 \remove "Key_engraver"
5923 StaffSymbol \set #'transparent = ##t
5924 \remove "Time_signature_engraver"
5925 \remove "Bar_engraver"
5926 minimumVerticalExtent = ##f
5930 \remove Ligature_bracket_engraver
5931 \consists Vaticana_ligature_engraver
5932 NoteHead \set #'style = #'vaticana_punctum
5933 Stem \set #'transparent = ##t
5939 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5940 \include "gregorian-init.ly"
5942 \notes \transpose c c' {
5943 % Pes Auctus Descendens
5944 \[ g \pes \auctum \descendens b \]
5945 \noBreak s^\markup {"p"} \noBreak
5947 % Pes Auctus Ascendens
5948 \[ g \pes \auctum \ascendens b \]
5949 \noBreak s^\markup {"q"}
5955 \remove "Bar_number_engraver"
5959 \remove "Clef_engraver"
5960 \remove "Key_engraver"
5961 StaffSymbol \set #'transparent = ##t
5962 \remove "Time_signature_engraver"
5963 \remove "Bar_engraver"
5964 minimumVerticalExtent = ##f
5968 \remove Ligature_bracket_engraver
5969 \consists Vaticana_ligature_engraver
5970 NoteHead \set #'style = #'vaticana_punctum
5971 Stem \set #'transparent = ##t
5977 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5978 \include "gregorian-init.ly"
5980 \notes \transpose c c' {
5982 \[ g \pes \deminutum b \]
5989 \remove "Bar_number_engraver"
5993 \remove "Clef_engraver"
5994 \remove "Key_engraver"
5995 StaffSymbol \set #'transparent = ##t
5996 \remove "Time_signature_engraver"
5997 \remove "Bar_engraver"
5998 minimumVerticalExtent = ##f
6002 \remove Ligature_bracket_engraver
6003 \consists Vaticana_ligature_engraver
6004 NoteHead \set #'style = #'vaticana_punctum
6005 Stem \set #'transparent = ##t
6012 @code{7. Pes Quassus}
6014 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6015 \include "gregorian-init.ly"
6017 \notes \transpose c c' {
6019 \[ \oriscus g \pes \virga b \]
6026 \remove "Bar_number_engraver"
6030 \remove "Clef_engraver"
6031 \remove "Key_engraver"
6032 StaffSymbol \set #'transparent = ##t
6033 \remove "Time_signature_engraver"
6034 \remove "Bar_engraver"
6035 minimumVerticalExtent = ##f
6039 \remove Ligature_bracket_engraver
6040 \consists Vaticana_ligature_engraver
6041 NoteHead \set #'style = #'vaticana_punctum
6042 Stem \set #'transparent = ##t
6048 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6049 \include "gregorian-init.ly"
6051 \notes \transpose c c' {
6052 % Pes Quassus Auctus Descendens
6053 \[ \oriscus g \pes \auctum \descendens b \]
6060 \remove "Bar_number_engraver"
6064 \remove "Clef_engraver"
6065 \remove "Key_engraver"
6066 StaffSymbol \set #'transparent = ##t
6067 \remove "Time_signature_engraver"
6068 \remove "Bar_engraver"
6069 minimumVerticalExtent = ##f
6073 \remove Ligature_bracket_engraver
6074 \consists Vaticana_ligature_engraver
6075 NoteHead \set #'style = #'vaticana_punctum
6076 Stem \set #'transparent = ##t
6084 @code{8. Quilisma Pes}
6086 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6087 \include "gregorian-init.ly"
6089 \notes \transpose c c' {
6091 \[ \quilisma g \pes b \]
6098 \remove "Bar_number_engraver"
6102 \remove "Clef_engraver"
6103 \remove "Key_engraver"
6104 StaffSymbol \set #'transparent = ##t
6105 \remove "Time_signature_engraver"
6106 \remove "Bar_engraver"
6107 minimumVerticalExtent = ##f
6111 \remove Ligature_bracket_engraver
6112 \consists Vaticana_ligature_engraver
6113 NoteHead \set #'style = #'vaticana_punctum
6114 Stem \set #'transparent = ##t
6120 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6121 \include "gregorian-init.ly"
6123 \notes \transpose c c' {
6124 % Quilisma Pes Auctus Descendens
6125 \[ \quilisma g \pes \auctum \descendens b \]
6132 \remove "Bar_number_engraver"
6136 \remove "Clef_engraver"
6137 \remove "Key_engraver"
6138 StaffSymbol \set #'transparent = ##t
6139 \remove "Time_signature_engraver"
6140 \remove "Bar_engraver"
6141 minimumVerticalExtent = ##f
6145 \remove Ligature_bracket_engraver
6146 \consists Vaticana_ligature_engraver
6147 NoteHead \set #'style = #'vaticana_punctum
6148 Stem \set #'transparent = ##t
6156 @code{9. Podatus Initio Debilis}
6158 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6159 \include "gregorian-init.ly"
6161 \notes \transpose c c' {
6162 % Pes Initio Debilis
6163 \[ \deminutum g \pes b \]
6170 \remove "Bar_number_engraver"
6174 \remove "Clef_engraver"
6175 \remove "Key_engraver"
6176 StaffSymbol \set #'transparent = ##t
6177 \remove "Time_signature_engraver"
6178 \remove "Bar_engraver"
6179 minimumVerticalExtent = ##f
6183 \remove Ligature_bracket_engraver
6184 \consists Vaticana_ligature_engraver
6185 NoteHead \set #'style = #'vaticana_punctum
6186 Stem \set #'transparent = ##t
6192 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6193 \include "gregorian-init.ly"
6195 \notes \transpose c c' {
6196 % Pes Auctus Descendens Initio Debilis
6197 \[ \deminutum g \pes \auctum \descendens b \]
6204 \remove "Bar_number_engraver"
6208 \remove "Clef_engraver"
6209 \remove "Key_engraver"
6210 StaffSymbol \set #'transparent = ##t
6211 \remove "Time_signature_engraver"
6212 \remove "Bar_engraver"
6213 minimumVerticalExtent = ##f
6217 \remove Ligature_bracket_engraver
6218 \consists Vaticana_ligature_engraver
6219 NoteHead \set #'style = #'vaticana_punctum
6220 Stem \set #'transparent = ##t
6230 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6231 \include "gregorian-init.ly"
6233 \notes \transpose c c' {
6235 \[ a \pes b \flexa g \]
6242 \remove "Bar_number_engraver"
6246 \remove "Clef_engraver"
6247 \remove "Key_engraver"
6248 StaffSymbol \set #'transparent = ##t
6249 \remove "Time_signature_engraver"
6250 \remove "Bar_engraver"
6251 minimumVerticalExtent = ##f
6255 \remove Ligature_bracket_engraver
6256 \consists Vaticana_ligature_engraver
6257 NoteHead \set #'style = #'vaticana_punctum
6258 Stem \set #'transparent = ##t
6264 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6265 \include "gregorian-init.ly"
6267 \notes \transpose c c' {
6268 % Torculus Auctus Descendens
6269 \[ a \pes b \flexa \auctum \descendens g \]
6276 \remove "Bar_number_engraver"
6280 \remove "Clef_engraver"
6281 \remove "Key_engraver"
6282 StaffSymbol \set #'transparent = ##t
6283 \remove "Time_signature_engraver"
6284 \remove "Bar_engraver"
6285 minimumVerticalExtent = ##f
6289 \remove Ligature_bracket_engraver
6290 \consists Vaticana_ligature_engraver
6291 NoteHead \set #'style = #'vaticana_punctum
6292 Stem \set #'transparent = ##t
6298 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6299 \include "gregorian-init.ly"
6301 \notes \transpose c c' {
6302 % Torculus Deminutus
6303 \[ a \pes b \flexa \deminutum g \]
6310 \remove "Bar_number_engraver"
6314 \remove "Clef_engraver"
6315 \remove "Key_engraver"
6316 StaffSymbol \set #'transparent = ##t
6317 \remove "Time_signature_engraver"
6318 \remove "Bar_engraver"
6319 minimumVerticalExtent = ##f
6323 \remove Ligature_bracket_engraver
6324 \consists Vaticana_ligature_engraver
6325 NoteHead \set #'style = #'vaticana_punctum
6326 Stem \set #'transparent = ##t
6333 @code{11. Torculus Initio Debilis}
6335 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6336 \include "gregorian-init.ly"
6338 \notes \transpose c c' {
6339 % Torculus Initio Debilis
6340 \[ \deminutum a \pes b \flexa g \]
6347 \remove "Bar_number_engraver"
6351 \remove "Clef_engraver"
6352 \remove "Key_engraver"
6353 StaffSymbol \set #'transparent = ##t
6354 \remove "Time_signature_engraver"
6355 \remove "Bar_engraver"
6356 minimumVerticalExtent = ##f
6360 \remove Ligature_bracket_engraver
6361 \consists Vaticana_ligature_engraver
6362 NoteHead \set #'style = #'vaticana_punctum
6363 Stem \set #'transparent = ##t
6369 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6370 \include "gregorian-init.ly"
6372 \notes \transpose c c' {
6373 % Torculus Auctus Descendens Initio Debilis
6374 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6381 \remove "Bar_number_engraver"
6385 \remove "Clef_engraver"
6386 \remove "Key_engraver"
6387 StaffSymbol \set #'transparent = ##t
6388 \remove "Time_signature_engraver"
6389 \remove "Bar_engraver"
6390 minimumVerticalExtent = ##f
6394 \remove Ligature_bracket_engraver
6395 \consists Vaticana_ligature_engraver
6396 NoteHead \set #'style = #'vaticana_punctum
6397 Stem \set #'transparent = ##t
6403 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6404 \include "gregorian-init.ly"
6406 \notes \transpose c c' {
6407 % Torculus Deminutus Initio Debilis
6408 \[ \deminutum a \pes b \flexa \deminutum g \]
6415 \remove "Bar_number_engraver"
6419 \remove "Clef_engraver"
6420 \remove "Key_engraver"
6421 StaffSymbol \set #'transparent = ##t
6422 \remove "Time_signature_engraver"
6423 \remove "Bar_engraver"
6424 minimumVerticalExtent = ##f
6428 \remove Ligature_bracket_engraver
6429 \consists Vaticana_ligature_engraver
6430 NoteHead \set #'style = #'vaticana_punctum
6431 Stem \set #'transparent = ##t
6438 @code{12. Porrectus}
6440 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6441 \include "gregorian-init.ly"
6443 \notes \transpose c c' {
6445 \[ a \flexa g \pes b \]
6452 \remove "Bar_number_engraver"
6456 \remove "Clef_engraver"
6457 \remove "Key_engraver"
6458 StaffSymbol \set #'transparent = ##t
6459 \remove "Time_signature_engraver"
6460 \remove "Bar_engraver"
6461 minimumVerticalExtent = ##f
6465 \remove Ligature_bracket_engraver
6466 \consists Vaticana_ligature_engraver
6467 NoteHead \set #'style = #'vaticana_punctum
6468 Stem \set #'transparent = ##t
6474 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6475 \include "gregorian-init.ly"
6477 \notes \transpose c c' {
6478 % Porrectus Auctus Descendens
6479 \[ a \flexa g \pes \auctum \descendens b \]
6486 \remove "Bar_number_engraver"
6490 \remove "Clef_engraver"
6491 \remove "Key_engraver"
6492 StaffSymbol \set #'transparent = ##t
6493 \remove "Time_signature_engraver"
6494 \remove "Bar_engraver"
6495 minimumVerticalExtent = ##f
6499 \remove Ligature_bracket_engraver
6500 \consists Vaticana_ligature_engraver
6501 NoteHead \set #'style = #'vaticana_punctum
6502 Stem \set #'transparent = ##t
6508 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6509 \include "gregorian-init.ly"
6511 \notes \transpose c c' {
6512 % Porrectus Deminutus
6513 \[ a \flexa g \pes \deminutum b \]
6520 \remove "Bar_number_engraver"
6524 \remove "Clef_engraver"
6525 \remove "Key_engraver"
6526 StaffSymbol \set #'transparent = ##t
6527 \remove "Time_signature_engraver"
6528 \remove "Bar_engraver"
6529 minimumVerticalExtent = ##f
6533 \remove Ligature_bracket_engraver
6534 \consists Vaticana_ligature_engraver
6535 NoteHead \set #'style = #'vaticana_punctum
6536 Stem \set #'transparent = ##t
6545 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6546 \include "gregorian-init.ly"
6548 \notes \transpose c c' {
6550 \[ \virga b \inclinatum a \inclinatum g \]
6557 \remove "Bar_number_engraver"
6561 \remove "Clef_engraver"
6562 \remove "Key_engraver"
6563 StaffSymbol \set #'transparent = ##t
6564 \remove "Time_signature_engraver"
6565 \remove "Bar_engraver"
6566 minimumVerticalExtent = ##f
6570 \remove Ligature_bracket_engraver
6571 \consists Vaticana_ligature_engraver
6572 NoteHead \set #'style = #'vaticana_punctum
6573 Stem \set #'transparent = ##t
6579 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6580 \include "gregorian-init.ly"
6582 \notes \transpose c c' {
6584 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6591 \remove "Bar_number_engraver"
6595 \remove "Clef_engraver"
6596 \remove "Key_engraver"
6597 StaffSymbol \set #'transparent = ##t
6598 \remove "Time_signature_engraver"
6599 \remove "Bar_engraver"
6600 minimumVerticalExtent = ##f
6604 \remove Ligature_bracket_engraver
6605 \consists Vaticana_ligature_engraver
6606 NoteHead \set #'style = #'vaticana_punctum
6607 Stem \set #'transparent = ##t
6613 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6614 \include "gregorian-init.ly"
6616 \notes \transpose c c' {
6617 % Climacus Deminutus
6618 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6625 \remove "Bar_number_engraver"
6629 \remove "Clef_engraver"
6630 \remove "Key_engraver"
6631 StaffSymbol \set #'transparent = ##t
6632 \remove "Time_signature_engraver"
6633 \remove "Bar_engraver"
6634 minimumVerticalExtent = ##f
6638 \remove Ligature_bracket_engraver
6639 \consists Vaticana_ligature_engraver
6640 NoteHead \set #'style = #'vaticana_punctum
6641 Stem \set #'transparent = ##t
6648 @code{14. Scandicus}
6650 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6651 \include "gregorian-init.ly"
6653 \notes \transpose c c' {
6655 \[ g \pes a \virga b \]
6662 \remove "Bar_number_engraver"
6666 \remove "Clef_engraver"
6667 \remove "Key_engraver"
6668 StaffSymbol \set #'transparent = ##t
6669 \remove "Time_signature_engraver"
6670 \remove "Bar_engraver"
6671 minimumVerticalExtent = ##f
6675 \remove Ligature_bracket_engraver
6676 \consists Vaticana_ligature_engraver
6677 NoteHead \set #'style = #'vaticana_punctum
6678 Stem \set #'transparent = ##t
6684 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6685 \include "gregorian-init.ly"
6687 \notes \transpose c c' {
6688 % Scandicus Auctus Descendens
6689 \[ g \pes a \pes \auctum \descendens b \]
6696 \remove "Bar_number_engraver"
6700 \remove "Clef_engraver"
6701 \remove "Key_engraver"
6702 StaffSymbol \set #'transparent = ##t
6703 \remove "Time_signature_engraver"
6704 \remove "Bar_engraver"
6705 minimumVerticalExtent = ##f
6709 \remove Ligature_bracket_engraver
6710 \consists Vaticana_ligature_engraver
6711 NoteHead \set #'style = #'vaticana_punctum
6712 Stem \set #'transparent = ##t
6718 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6719 \include "gregorian-init.ly"
6721 \notes \transpose c c' {
6722 % Scandicus Deminutus
6723 \[ g \pes a \pes \deminutum b \]
6730 \remove "Bar_number_engraver"
6734 \remove "Clef_engraver"
6735 \remove "Key_engraver"
6736 StaffSymbol \set #'transparent = ##t
6737 \remove "Time_signature_engraver"
6738 \remove "Bar_engraver"
6739 minimumVerticalExtent = ##f
6743 \remove Ligature_bracket_engraver
6744 \consists Vaticana_ligature_engraver
6745 NoteHead \set #'style = #'vaticana_punctum
6746 Stem \set #'transparent = ##t
6755 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6756 \include "gregorian-init.ly"
6758 \notes \transpose c c' {
6760 \[ g \oriscus a \pes \virga b \]
6767 \remove "Bar_number_engraver"
6771 \remove "Clef_engraver"
6772 \remove "Key_engraver"
6773 StaffSymbol \set #'transparent = ##t
6774 \remove "Time_signature_engraver"
6775 \remove "Bar_engraver"
6776 minimumVerticalExtent = ##f
6780 \remove Ligature_bracket_engraver
6781 \consists Vaticana_ligature_engraver
6782 NoteHead \set #'style = #'vaticana_punctum
6783 Stem \set #'transparent = ##t
6789 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6790 \include "gregorian-init.ly"
6792 \notes \transpose c c' {
6793 % Salicus Auctus Descendens
6794 \[ g \oriscus a \pes \auctum \descendens b \]
6801 \remove "Bar_number_engraver"
6805 \remove "Clef_engraver"
6806 \remove "Key_engraver"
6807 StaffSymbol \set #'transparent = ##t
6808 \remove "Time_signature_engraver"
6809 \remove "Bar_engraver"
6810 minimumVerticalExtent = ##f
6814 \remove Ligature_bracket_engraver
6815 \consists Vaticana_ligature_engraver
6816 NoteHead \set #'style = #'vaticana_punctum
6817 Stem \set #'transparent = ##t
6827 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6828 \include "gregorian-init.ly"
6830 \notes \transpose c c' {
6832 \[ \stropha b \stropha b \stropha a \]
6839 \remove "Bar_number_engraver"
6843 \remove "Clef_engraver"
6844 \remove "Key_engraver"
6845 StaffSymbol \set #'transparent = ##t
6846 \remove "Time_signature_engraver"
6847 \remove "Bar_engraver"
6848 minimumVerticalExtent = ##f
6852 \remove Ligature_bracket_engraver
6853 \consists Vaticana_ligature_engraver
6854 NoteHead \set #'style = #'vaticana_punctum
6855 Stem \set #'transparent = ##t
6867 Unlike most other neumes notation systems, the input language for
6868 neumes does not necessarily reflect directly the typographical
6869 appearance, but is designed to solely focuse on musical meaning. For
6870 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6871 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6872 a Porrectus with a curved flexa shape and only a single Punctum head.
6873 There is no command to explicitly typeset the curved flexa shape; the
6874 decision of when to typeset a curved flexa shape is purely taken from
6875 the musical input. The idea of this approach is to separate the
6876 musical aspects of the input from the notation style of the output.
6877 This way, the same input can be reused to typeset the same music in a
6878 different style of Gregorian chant notation such as Hufnagel (also
6879 known as German gothic neumes) or Medicaea (kind of a very simple
6880 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6881 engraver and Medicaea ligature engraver will have been implemented, it
6882 will be as simple as replacing the ligature engraver in the
6883 @internalsref{Voice} context to get the desired notation style from
6886 The following table shows the code fragments that produce the
6887 ligatures in the above neumes table. The letter in the first column
6888 in each line of the below table indicates to which ligature in the
6889 above table it refers. The second column gives the name of the
6890 ligature. The third column shows the code fragment that produces this
6891 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6893 @multitable @columnfractions .1 .4 .5
6907 Punctum Inclinatum @tab
6908 @code{\[ \inclinatum b \]}
6912 Punctum Auctum Ascendens @tab
6913 @code{\[ \auctum \ascendens b \]}
6917 Punctum Auctum Descendens @tab
6918 @code{\[ \auctum \descendens b \]}
6922 Punctum Inclinatum Auctum @tab
6923 @code{\[ \inclinatum \auctum b \]}
6927 Punctum Inclinatum Parvum @tab
6928 @code{\[ \inclinatum \deminutum b \]}
6933 @code{\[ \virga b \]}
6938 @code{\[ \stropha b \]}
6943 @code{\[ \stropha \auctum b \]}
6948 @code{\[ \oriscus b \]}
6952 Clivis vel Flexa @tab
6953 @code{\[ b \flexa g \]}
6957 Clivis Aucta Descendens @tab
6958 @code{\[ b \flexa \auctum \descendens g \]}
6962 Clivis Aucta Ascendens @tab
6963 @code{\[ b \flexa \auctum \ascendens g \]}
6968 @code{\[ b \flexa \deminutum g \]}
6972 Podatus vel Pes @tab
6973 @code{\[ g \pes b \]}
6977 Pes Auctus Descendens @tab
6978 @code{\[ g \pes \auctum \descendens b \]}
6982 Pes Auctus Ascendens @tab
6983 @code{\[ g \pes \auctum \ascendens b \]}
6988 @code{\[ g \pes \deminutum b \]}
6993 @code{\[ \oriscus g \pes \virga b \]}
6997 Pes Quassus Auctus Descendens @tab
6998 @code{\[ \oriscus g \pes \auctum \descendens b \]}
7003 @code{\[ \quilisma g \pes b \]}
7007 Quilisma Pes Auctus Descendens @tab
7008 @code{\[ \quilisma g \pes \auctum \descendens b \]}
7012 Pes Initio Debilis @tab
7013 @code{\[ \deminutum g \pes b \]}
7017 Pes Auctus Descendens Initio Debilis @tab
7018 @code{\[ \deminutum g \pes \auctum \descendens b \]}
7023 @code{\[ a \pes b \flexa g \]}
7027 Torculus Auctus Descendens @tab
7028 @code{\[ a \pes b \flexa \auctum \descendens g \]}
7032 Torculus Deminutus @tab
7033 @code{\[ a \pes b \flexa \deminutum g \]}
7037 Torculus Initio Debilis @tab
7038 @code{\[ \deminutum a \pes b \flexa g \]}
7042 Torculus Auctus Descendens Initio Debilis @tab
7043 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
7047 Torculus Deminutus Initio Debilis @tab
7048 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
7053 @code{\[ a \flexa g \pes b \]}
7057 Porrectus Auctus Descendens @tab
7058 @code{\[ a \flexa g \pes \auctum \descendens b \]}
7062 Porrectus Deminutus @tab
7063 @code{\[ a \flexa g \pes \deminutum b \]}
7068 @code{\[ \virga b \inclinatum a \inclinatum g \]}
7072 Climacus Auctus @tab
7073 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
7077 Climacus Deminutus @tab
7078 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
7083 @code{\[ g \pes a \virga b \]}
7087 Scandicus Auctus Descendens @tab
7088 @code{\[ g \pes a \pes \auctum \descendens b \]}
7092 Scandicus Deminutus @tab
7093 @code{\[ g \pes a \pes \deminutum b \]}
7098 @code{\[ g \oriscus a \pes \virga b \]}
7102 Salicus Auctus Descendens @tab
7103 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
7108 @code{\[ \stropha b \stropha b \stropha a \]}
7114 The following head prefixes are supported:
7116 @cindex @code{\virga}
7118 @cindex @code{\stropha}
7120 @cindex @code{\inclinatum}
7122 @cindex @code{\auctum}
7124 @cindex @code{\descendens}
7126 @cindex @code{\ascendens}
7128 @cindex @code{\oriscus}
7130 @cindex @code{\quilisma}
7132 @cindex @code{\deminutum}
7135 Head prefixes can be accumulated, though restrictions apply. For
7136 example, either @code{\descendens} or @code{\ascendens} can be applied
7137 to a head, but not both to the same head.
7140 @cindex @code{\flexa}
7141 Two adjacent heads can be tied together with the @code{\pes} and
7142 @code{\flexa} infix commands for a rising and falling line of melody,
7147 Trigonus: apply equal spacing, regardless of pitch.
7150 @subsection Figured bass
7152 @cindex Basso continuo
7154 @c TODO: musicological blurb about FB
7158 LilyPond has limited support for figured bass:
7160 @lilypond[verbatim,fragment]
7162 \context Voice \notes { \clef bass dis4 c d ais}
7163 \context FiguredBass
7165 < 6 >4 < 7 >8 < 6+ [_!] >
7171 The support for figured bass consists of two parts: there is an input
7172 mode, introduced by @code{\figures}, where you can enter bass figures
7173 as numbers, and there is a context called @internalsref{FiguredBass} that
7174 takes care of making @internalsref{BassFigure} objects.
7176 In figures input mode, a group of bass figures is delimited by
7177 @code{<} and @code{>}. The duration is entered after the @code{>>}:
7182 \context FiguredBass
7186 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7193 \context FiguredBass
7194 \figures { <4- 6+ 7!> }
7197 Spaces or dashes may be inserted by using @code{_}. Brackets are
7198 introduced with @code{[} and @code{]}:
7204 \context FiguredBass
7205 \figures { < [4 6] 8 [_! 12]> }
7208 Although the support for figured bass may superficially resemble chord
7209 support, it works much simpler. The @code{\figures} mode simply
7210 stores the numbers , and @internalsref{FiguredBass} context prints
7211 them as entered. There is no conversion to pitches, and no
7212 realizations of the bass are played in the MIDI file.
7214 Internally, the code produces markup texts. You can use any of the
7215 markup text properties to override formatting. For example, the
7216 vertical spacing of the figures may be set with @code{baseline-skip}.
7220 @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7221 and @internalsref{FiguredBass} context.
7225 Slash notation for alterations is not supported.
7228 @node Vaticana style contexts
7229 @subsection Vaticana style contexts
7231 @cindex VaticanaVoiceContext
7232 @cindex VaticanaStaffContext
7234 The predefined @code{VaticanaVoiceContext} and
7235 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7236 Gregorian Chant in the style of the Editio Vaticana. These contexts
7237 initialize all relevant context properties and grob properties to
7238 proper values. With these contexts, you can immediately go ahead
7239 entering the chant, as the following short excerpt demonstrates:
7241 @lilypond[raggedright,verbatim,noindent]
7242 \include "gregorian-init.ly"
7245 \context VaticanaVoice {
7246 \property Score.BarNumber \set #'transparent = ##t
7248 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7249 \[ f( \pes a c' c' \pes d') \] c' \divisioMinima \break
7250 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7253 \context Lyrics \lyrics {
7254 San- ctus, San- ctus, San- ctus
7259 @node Contemporary notation
7260 @section Contemporary notation
7262 In the 20th century, composers have greatly expanded the musical
7263 vocabulary. With this expansion, many innovations in musical notation
7264 have been tried. The book by Stone (1980) gives a comprehensive
7265 overview (see @ref{Literature list}). In general, the use of new,
7266 innovative notation makes a piece harder to understand and perform and
7267 its use should therefore be avoided if possible. For this reason,
7268 support for contemporary notation in LilyPond is limited.
7277 @subsection Clusters
7281 In musical terminology, a @emph{cluster} denotes a range of
7282 simultaneously sounding pitches that may change over time. The set of
7283 available pitches to apply usually depends on the accoustic source.
7284 Thus, in piano music, a cluster typically consists of a continous range
7285 of the semitones as provided by the piano's fixed set of a chromatic
7286 scale. In choral music, each singer of the choir typically may sing an
7287 arbitrary pitch within the cluster's range that is not bound to any
7288 diatonic, chromatic or other scale. In electronic music, a cluster
7289 (theoretically) may even cover a continuous range of pitches, thus
7290 resulting in coloured noise, such as pink noise.
7292 Clusters can be denoted in the context of ordinary staff notation by
7293 engraving simple geometrical shapes that replace ordinary notation of
7294 notes. Ordinary notes as musical events specify starting time and
7295 duration of pitches; however, the duration of a note is expressed by the
7296 shape of the note head rather than by the horizontal graphical extent of
7297 the note symbol. In contrast, the shape of a cluster geometrically
7298 describes the development of a range of pitches (vertical extent) over
7299 time (horizontal extent). Still, the geometrical shape of a cluster
7300 covers the area in wich any single pitch contained in the cluster would
7301 be notated as an ordinary note. From this point of view, it is
7302 reasonable to specify a cluster as the envelope of a set of notes.
7306 A cluster is engraved as the envelope of a set of
7307 cluster-notes. Cluster notes are created by applying the function
7308 @code{notes-to-clusters} to a sequence of chords, e.g.
7310 @lilypond[relative 1,verbatim]
7311 \apply #notes-to-clusters { <c e > <b f'> }
7314 The following example (from
7315 @inputfileref{input/regression,cluster.ly}) shows what the result
7318 @lilypondfile[notexidoc]{cluster.ly}
7320 By default, @internalsref{Cluster_spanner_engraver} is in the
7321 @internalsref{Voice} context. This allows putting ordinary notes and
7322 clusters together in the same staff, even simultaneously. In such a
7323 case no attempt is made to automatically avoid collisions between
7324 ordinary notes and clusters.
7328 @internalsref{ClusterSpanner}, @internalsref{ClusterSpannerBeacon},
7329 @inputfileref{input/regression,cluster.ly},
7330 @internalsref{Cluster_spanner_engraver}, and @internalsref{ClusterNoteEvent}.
7334 Music expressions like @code{<< @{ g8 e8 @} a4 >>} are not printed
7335 accurately. Use @code{<g a>8 <e a>8} instead.
7340 @subsection Fermatas
7346 Contemporary music notation frequently uses special fermata symbols to
7347 indicate fermatas of differing lengths.
7351 The following are supported
7353 @lilypond[singleline]
7355 << \addlyrics \notes {
7375 \context Lyrics \lyrics {
7376 "shortfermata" "fermata" "longfermata" "verylongfermata"
7381 See @ref{Articulations} for general instructions how to apply scripts
7382 such as fermatas to a @code{\notes@{@}} block.
7385 @section Tuning output
7387 There are situations where default layout decisions are not
7388 sufficient. In this section we discuss ways to override these
7391 Formatting is internally done by manipulating so called objects
7392 (graphic objects). Each object carries with it a set of properties
7393 (object or layout properties) specific to that object. For example, a
7394 stem object has properties that specify its direction, length and
7397 The most direct way of tuning the output is by altering the values of
7398 these properties. There are two ways of doing that: first, you can
7399 temporarily change the definition of one type of object, thus
7400 affecting a whole set of objects. Second, you can select one specific
7401 object, and set a layout property in that object.
7403 Do not confuse layout properties with translation
7404 properties. Translation properties always use a mixed caps style
7405 naming, and are manipulated using @code{\property}:
7407 \property Context.propertyName = @var{value}
7409 Layout properties are use Scheme style variable naming, i.e. lower
7410 case words separated with dashes. They are symbols, and should always
7411 be quoted using @code{#'}. For example, this could be an imaginary
7412 layout property name:
7414 #'layout-property-name
7419 * Constructing a tweak::
7427 @node Tuning objects
7428 @subsection Tuning objects
7430 @cindex object description
7432 The definition of an object is a list of default object
7433 properties. For example, the definition of the Stem object (available
7434 in @file{scm/define-grobs.scm}), includes the following definitions
7435 for @internalsref{Stem}:
7439 (beamed-lengths . (0.0 2.5 2.0 1.5))
7440 (Y-extent-callback . ,Stem::height)
7445 Adding variables on top of this existing definition overrides the
7446 system default, and alters the resulting appearance of the layout
7452 Changing a variable for only one object is commonly achieved with
7456 \once \property @var{context}.@var{objectname}
7457 \override @var{symbol} = @var{value}
7459 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7460 and @var{objectname} is a string and @var{value} is a Scheme expression.
7461 This command applies a setting only during one moment in the score.
7463 In the following example, only one @internalsref{Stem} object is
7464 changed from its original setting:
7466 @lilypond[verbatim, fragment, relative=1]
7468 \once \property Voice.Stem \set #'thickness = #4
7472 @cindex @code{\once}
7474 For changing more objects, the same command, without @code{\once} can
7477 \property @var{context}.@var{objectname} \override @var{symbol} = @var{value}
7479 This command adds @code{@var{symbol} = @var{value}} to the definition
7480 of @var{objectname} in the context @var{context}, and this definition
7481 stays in place until it is removed.
7483 An existing definition may be removed by the following command:
7486 \property @var{context}.@var{objectname} \revert @var{symbol}
7489 All @code{\override} and @code{\revert} commands should be balanced.
7490 The @code{\set} shorthand performs a revert followed by an override,
7491 and is often more convenient to use
7494 \property @var{context}.@var{objectname} \set @var{symbol} = @var{value}
7498 @lilypond[verbatim,quote]
7499 c'4 \property Voice.Stem \override #'thickness = #4.0
7501 c'4 \property Voice.Stem \revert #'thickness
7505 The following example gives exactly the same result as the previous
7506 one (assuming the system default for stem thickness is 1.3):
7508 @lilypond[verbatim,quote]
7509 c'4 \property Voice.Stem \set #'thickness = #4.0
7511 c'4 \property Voice.Stem \set #'thickness = #1.3
7515 Reverting a setting which was not set in the first place has no
7516 effect. However, if the setting was set as a system default, this may
7517 remove the default value, and this may give surprising results,
7518 including crashes. In other words, @code{\override} and
7519 @code{\revert} must be carefully balanced. The following are examples
7520 of correct nesting of @code{\override}, @code{\set}, @code{\revert}:
7524 a clumsy but correct form:
7526 \override \revert \override \revert \override \revert
7530 shorter version of the same:
7532 \override \set \set \revert
7536 a short form, using only @code{\set}. This requires you to know the
7539 \set \set \set \set @var{to default value}
7543 if there is no default (i.e. by default, the object property is unset),
7546 \set \set \set \revert
7550 The object description is an Scheme association list. Since a Scheme
7551 list is a singly linked list, we can treat it as a stack, and
7552 @code{\override} and @code{\revert} are push and pop operations. The
7553 association list is stored in a normal context property, hence
7555 \property Voice.NoteHead = #'()
7557 will effectively erase @internalsref{NoteHead}s from the current
7558 @internalsref{Voice}. Typically, this will blank the object. However,
7559 this mechanism should not be used: it may cause crashes or other
7564 @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7565 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7566 @internalsref{All-layout-objects}.
7571 The backend is not very strict in type-checking object properties.
7572 Cyclic references in Scheme values for properties cause hangs and/or
7573 crashes. Reverting properties that are system defaults may also lead
7576 A property tweak of modifies a local copy of the object definition.
7577 After such a tweak, the definition is independent of the objects in
7578 enclosing contexts. For example
7581 \property Voice.Stem \set #'neutral-direction = #1
7583 \property Staff.Stem \set #'thickness = #4.0
7588 In this fragment, @code{neutral-direction} is tweaked. As a result,
7589 the current @internalsref{Voice} gets a private version of the
7590 @internalsref{Stem} object. The following tweak modifies the
7591 definition at @internalsref{Staff} level. Since it a different
7592 definition, the thickness of the @code{b'16} is unaffected. For the
7593 third note, a new Voice is created, which inherits the new definition,
7594 including the changed thickness, but excluding the new neutral
7600 * Constructing a tweak::
7606 @node Constructing a tweak
7607 @subsection Constructing a tweak
7610 @cindex internal documentation
7611 @cindex finding graphical objects
7612 @cindex graphical object descriptions
7614 @cindex @code{\override}
7616 @cindex internal documentation
7620 Three pieces of information are required to use @code{\override} and
7621 @code{\set}: the name of the layout object, the context and the name
7622 of the property. We demonstrate how to glean this information from
7623 the notation manual and the generated documentation.
7625 The generated documentation is a set of HTML pages which should be
7626 included if you installed a binary distribution, typically in
7627 @file{/usr/share/doc/lilypond}. They are also available on the web:
7628 go to the @uref{http://lilypond.org,LilyPond website}, click
7629 ``Documentation'', select the correct version, and click then
7630 ``Program reference.'' It is advisable to bookmark the local HTML
7631 files. They will load faster than the ones on the web. If you use the
7632 version from the web, you must check whether the documentation matches
7633 the program version: it is generated from the definitions that the
7634 program uses, and therefore it is strongly tied to the LilyPond
7638 @c [TODO: revise for new site.]
7640 Suppose we want to move the fingering indication in the fragment below:
7642 @lilypond[relative=2,verbatim]
7648 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7649 instructions}), you will notice that there is written:
7654 @internalsref{FingerEvent} and @internalsref{Fingering}.
7661 In other words, the fingerings once entered, are internally stored as
7662 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7663 layout object is created for every @code{FingerEvent}.
7665 The Fingering object has a number of different functions, and each of
7666 those is captured in an interface. The interfaces are listed under
7667 @internalsref{Fingering} in the program reference.
7671 The @code{Fingering} object has a fixed size
7672 (@internalsref{item-interface}), the symbol is a piece of text
7673 (@internalsref{text-interface}), whose font can be set
7674 (@internalsref{font-interface}). It is centered horizontally
7675 (@internalsref{self-alignment-interface}), it is placed next to other
7676 objects (@internalsref{side-position-interface}) vertically, and its
7677 placement is coordinated with other scripts
7678 (@internalsref{text-script-interface}). It also has the standard
7679 @internalsref{grob-interface} (grob stands for Graphical object)
7681 @cindex graphical object
7682 @cindex layout object
7683 @cindex object, layout
7684 with all the variables that come with
7685 it. Finally, it denotes a fingering instruction, so it has
7686 @internalsref{finger-interface}.
7688 For the vertical placement, we have to look under
7689 @code{side-position-interface}:
7691 @code{side-position-interface}
7693 Position a victim object (this one) next to other objects (the
7694 support). In this case, the property @code{direction} signifies where to put the
7695 victim object relative to the support (left or right, up or down?)
7700 below this description, the variable @code{padding} is described as
7704 (dimension, in staff space)
7706 add this much extra space between objects that are next to each
7707 other. Default value: @code{0.6}
7711 By increasing the value of @code{padding}, we can move away the
7712 fingering. The following command inserts 3 staff spaces of white
7713 between the note and the fingering:
7715 \once \property Voice.Fingering \set #'padding = #3
7718 Inserting this command before the Fingering object is created,
7719 i.e. before @code{c2}, yields the following result:
7721 @lilypond[relative=2,fragment,verbatim]
7722 \once \property Voice.Fingering
7729 The context name @code{Voice} in the example above can be determined
7730 as follows. In the documentation for @internalsref{Fingering}, it says
7732 Fingering grobs are created by: @internalsref{Fingering_engraver}
7735 Clicking @code{Fingering_engraver} shows the documentation of
7736 the module responsible for interpreting the fingering instructions and
7737 translating them to a @code{Fingering} object. Such a module is called
7738 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7741 Fingering_engraver is part of contexts: Voice
7743 so tuning the settings for Fingering should be done with
7745 \property Voice.Fingering \set @dots{}
7748 Of course, the tweak may also done in a larger context than
7749 @code{Voice}, for example, @internalsref{Staff} or
7750 @internalsref{Score}.
7754 The program reference also contains alphabetical lists of
7755 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7756 @internalsref{Music-expressions}, so you can also find which objects to
7757 tweak by browsing the internals document.
7761 @subsection Applyoutput
7763 The most versatile way of tuning an object is @code{\applyoutput}. Its
7766 \applyoutput @var{proc}
7770 where @var{proc} is a Scheme function, taking three arguments.
7772 When interpreted, the function @var{proc} is called for every layout
7773 object found in the context, with the following arguments:
7775 @item the layout object itself,
7776 @item the context where the layout object was created, and
7777 @item the context where @code{\applyoutput} is processed.
7781 In addition, the cause of the layout object, i.e. the music
7782 expression or object that was responsible for creating it, is in the
7783 object property @code{cause}. For example, for a note head, this is a
7784 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7785 this is a @internalsref{NoteHead} object.
7787 Here is a simple example of @code{\applyoutput}; it blanks note-heads on the
7790 (define (blanker grob grob-origin context)
7791 (if (and (memq (ly:get-grob-property grob 'interfaces)
7792 note-head-interface)
7793 (eq? (ly:get-grob-property grob 'staff-position) 0))
7795 (ly:set-grob-property! grob 'transparent #t)))
7800 @node Font selection
7801 @subsection Font selection
7803 The most common thing to change about the appearance of fonts is their
7804 size. The font size of any context can be easily changed by setting
7805 the @code{fontSize} property for that context. Its value is a number:
7806 negative numbers make the font smaller, positive numbers larger. An
7807 example is given below:
7809 @lilypond[fragment,relative=1,verbatim,quote]
7810 c4 c4 \property Voice.fontSize = #-1
7813 This command will set @code{font-size} (see below), and does
7814 not change the size of variable symbols, such as beams or slurs.
7816 One of the uses of @code{fontSize} is to get smaller symbols for cue
7817 notes. An elaborate example of those is in
7818 @inputfileref{input/test,cue-notes.ly}.
7820 @cindex magnification
7823 The font used for printing a object can be selected by setting
7824 @code{font-name}, e.g.
7826 \property Staff.TimeSignature
7827 \set #'font-name = #"cmr17"
7831 Any font can be used, as long as it is available to @TeX{}. Possible
7832 fonts include foreign fonts or fonts that do not belong to the
7833 Computer Modern font family. The size of fonts selected in this way
7834 can be changed with the @code{font-magnification} property. For
7835 example, @code{2.0} blows up all letters by a factor 2 in both
7839 @cindex font magnification
7841 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7842 can also be adjusted with a more fine-grained mechanism. By setting
7843 the object properties described below, you can select a different font;
7844 all three mechanisms work for every object that supports
7845 @code{font-interface}:
7850 is a symbol indicating the general class of the typeface. Supported are
7851 @code{roman} (Computer Modern), @code{braces} (for piano staff
7852 braces), @code{music} (the standard music font, including ancient
7853 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7856 is a symbol indicating the shape of the font, there are typically several
7857 font shapes available for each font family. Choices are @code{italic},
7858 @code{caps} and @code{upright}.
7861 is a symbol indicating the series of the font. There are typically several
7862 font series for each font family and shape. Choices are @code{medium}
7867 For any of these properties, the value @code{*} (i.e. the symbol
7868 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
7869 to override default setting, which are always present. For example:
7871 \property Lyrics . LyricText \override #'font-series = #'bold
7872 \property Lyrics . LyricText \override #'font-family = #'typewriter
7873 \property Lyrics . LyricText \override #'font-shape = #'*
7876 @cindex @code{font-style}
7878 The font size is set by modifying the @code{font-size} property. Its
7879 value is a number indicating the size relative to the standard size.
7880 Each step up is an increase of approximately 12% of the font size. Six
7881 steps is exactly a factor two. The Scheme function @code{magstep}
7882 converts a @code{font-size} number to a scaling factor.
7884 LilyPond has fonts in different design sizes: the music fonts for
7885 smaller sizes are chubbier, while the text fonts are relatively wider.
7886 Font size changes are achieved by scaling the design size that is
7887 closest to the desired size.
7889 The @code{font-size} mechanism does not work for fonts selected
7890 through @code{font-name}. These may be scaled with
7891 @code{font-magnification}.
7895 The following commands set @code{fontSize} for the current voice.
7897 @cindex @code{\tiny}
7899 @cindex @code{\small}
7901 @cindex @code{\normalsize}
7906 @file{ly/paper20.ly} contains hints how new fonts may be added to
7911 There is no style sheet provided for other fonts besides the @TeX{}
7914 @cindex font selection
7915 @cindex font magnification
7916 @cindex @code{font-interface}
7920 @subsection Text markup
7925 @cindex typeset text
7927 LilyPond has an internal mechanism to typeset texts. You can access it
7928 with the keyword @code{\markup}. Within markup mode, you can enter texts
7929 similar to lyrics: simply enter them, surrounded by spaces:
7932 @lilypond[verbatim,fragment,relative=1]
7933 c1^\markup { hello }
7934 c1_\markup { hi there }
7935 c1^\markup { hi \bold there, is \italic anyone home? }
7938 @cindex font switching
7940 The markup in the example demonstrates font switching commands. The
7941 command @code{\bold} and @code{\italic} only apply to the first
7942 following word; enclose a set of texts with braces to apply a command
7945 \markup @{ \bold @{ hi there @} @}
7949 For clarity, you can also do this for single arguments, e.g.
7951 \markup @{ is \italic @{ anyone @} home @}
7954 @cindex font size, texts
7956 The following size commands set absolute sizes:
7958 @cindex @code{\teeny}
7959 @cindex @code{\tiny}
7960 @cindex @code{\small}
7961 @cindex @code{\large}
7962 @cindex @code{\huge}
7972 You can also make letter larger or smaller relative to their neighbors,
7973 with the commands @code{\larger} and @code{\smaller}.
7977 @cindex font style, for texts
7978 @cindex @code{\bold}
7979 @cindex @code{\dynamic}
7980 @cindex @code{\number}
7981 @cindex @code{\italic}
7983 The following font change commands are defined:
7986 changes to the font used in dynamic signs. This font does not
7987 contain all characters of the alphabet, so when producing ``piu f'',
7988 the ``piu'' should be done in a different font.
7992 changes to the font used in time signatures. It only contains
7993 numbers and a few punctuation marks.
7995 changes @code{font-shape} to @code{italic}.
7997 changes @code{font-series} to @code{bold}.
8000 @cindex raising text
8001 @cindex lowering text
8003 @cindex translating text
8006 @cindex @code{\super}
8008 Raising and lowering texts can be done with @code{\super} and
8011 @lilypond[verbatim,fragment,relative=1]
8012 c1^\markup { E "=" mc \super "2" }
8015 @cindex @code{\raise}
8017 If you want to give an explicit amount for lowering or raising, use
8018 @code{\raise}. This command takes a Scheme valued first argument, and
8019 a markup object as second argument:
8021 @lilypond[verbatim,fragment,relative=1,quote]
8022 c1^\markup { C \small \raise #1.0 \bold { "9/7+" }}
8024 The argument to @code{\raise} is the vertical displacement amount,
8025 measured in (global) staff spaces. @code{\raise} and @code{\super}
8026 raise objects in relation to their surrounding markups. They cannot be
8027 used to move a single text up or down, when it is above or below a
8028 note, since the mechanism that positions it next to the note cancels
8029 any vertical shift. For vertical positioning, use the @code{padding}
8030 and/or @code{extra-offset} properties.
8032 Other commands taking single arguments include
8035 @item \bracket, \hbracket
8036 Bracket the argument markup with normal and horizontal brackets
8040 @cindex @code{\musicglyph}
8041 This is converted to a musical symbol, e.g. @code{\musicglyph
8042 #"accidentals-0"} will select the natural sign from the music font.
8043 See @ref{The Feta font} for a complete listing of the possible glyphs.
8045 This produces a single character, e.g. @code{\char #65} produces the
8048 @item \note @var{log} @var{dots} @var{dir}
8049 @cindex @code{\note}
8051 This produces a note with a stem pointing in @var{dir} direction, with
8052 duration log @var{log} and @var{dots} augmentation dots. The duration
8053 log is the negative 2-logarithm of the duration denominator. For
8054 example, a quarter note has log 2, an eighth note 3 and a breve has
8057 @item \hspace #@var{amount}
8058 @cindex @code{\hspace}
8059 This produces a invisible object taking horizontal space.
8061 \markup @{ A \hspace #2.0 B @}
8063 will put extra space between A and B, on top of the space that is
8064 normally inserted before elements on a line.
8066 @item \fontsize #@var{size}
8067 @cindex @code{\fontsize}
8068 This sets the relative font size, eg.
8070 A \fontsize #2 @{ B C @} D
8074 This will enlarge the B and the C by two steps.
8075 @item \translate #(cons @var{x} @var{y})
8077 This translates an object. Its first argument is a cons of numbers
8079 A \translate #(cons 2 -3) @{ B C @} D
8081 This moves `B C' 2 spaces to the right, and 3 down, relative to its
8082 surroundings. This command cannot be used to move isolated scripts
8083 vertically, for the same reason that @code{\raise} cannot be used for
8086 @item \magnify #@var{mag}
8087 @cindex @code{\magnify}
8088 This sets the font magnification for the its argument. In the following
8089 example, the middle A will be 10% larger:
8091 A \magnify #1.1 @{ A @} A
8095 @item \override #(@var{key} . @var{value})
8096 @cindex @code{\override}
8097 This overrides a formatting property for its argument. The argument
8098 should be a key/value pair, e.g.
8100 m \override #'(font-family . math) m m
8104 In markup mode you can compose expressions, similar to mathematical
8105 expressions, XML documents and music expressions. The braces group
8106 notes into horizontal lines. Other types of lists also exist: you can
8107 stack expressions grouped with @code{<}, and @code{>} vertically with
8108 the command @code{\column}. Similarly, @code{\center} aligns texts by
8111 @lilypond[verbatim,fragment,relative=1]
8112 c1^\markup { \column < a bbbb c > }
8113 c1^\markup { \center < a bbbb c > }
8114 c1^\markup { \line < a b c > }
8117 Markups can be stored in variables, and these variables
8118 may be attached to notes, like
8120 allegro = \markup { \bold \large { Allegro } }
8121 \notes { a^\allegro b c d }
8124 The markup mechanism is extensible. Refer to
8125 @file{scm/new-markup.scm} for more information.
8130 @internalsref{Markup-functions}, and @file{scm/new-markup.scm}.
8137 Text layout is ultimately done by @TeX{}, which does kerning of
8138 letters. LilyPond does not account for kerning, so texts will be
8139 spaced slightly too wide.
8141 Syntax errors for markup mode are confusing.
8143 Markup texts cannot be used in the titling of the @code{\header}
8144 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
8151 @section Global layout
8153 The global layout determined by three factors: the page layout, the
8154 line breaks and the spacing. These all influence each other. The
8155 choice of spacing determines how densely each system of music is set,
8156 which influences where line breaks breaks are chosen, and thus
8157 ultimately how many pages a piece of music takes. This section
8158 explains how to tune the algorithm for spacing.
8160 Globally spoken, this procedure happens in three steps: first,
8161 flexible distances (``springs'') are chosen, based on durations. All
8162 possible line breaking combination are tried, and the one with the
8163 best results---a layout that has uniform density and requires as
8164 little stretching or cramping as possible---is chosen. When the score
8165 is processed by @TeX{}, each page is filled with systems, and page breaks
8166 are chosen whenever the page gets full.
8171 * Vertical spacing::
8172 * Horizontal spacing::
8179 @node Vertical spacing
8180 @subsection Vertical spacing
8182 @cindex vertical spacing
8183 @cindex distance between staves
8184 @cindex staff distance
8185 @cindex between staves, distance
8186 @cindex staffs per page
8187 @cindex space between staves
8189 The height of each system is determined automatically by LilyPond, to
8190 keep systems from bumping into each other, some minimum distances are
8191 set. By changing these, you can put staves closer together, and thus
8192 put more systems onto one page.
8194 Normally staves are stacked vertically. To make
8195 staves maintain a distance, their vertical size is padded. This is
8196 done with the property @code{minimumVerticalExtent}. It takes a pair
8197 of numbers, so if you want to make it smaller from its, then you could
8200 \property Staff.minimumVerticalExtent = #'(-4 . 4)
8202 This sets the vertical size of the current staff to 4 staff spaces on
8203 either side of the center staff line. The argument of
8204 @code{minimumVerticalExtent} is interpreted as an interval, where the
8205 center line is the 0, so the first number is generally negative. The
8206 staff can be made larger at the bottom by setting it to @code{(-6
8209 The piano staves are handled a little differently: to make cross-staff
8210 beaming work correctly, it is necessary that the distance between staves
8211 is fixed beforehand. This is also done with a
8212 @internalsref{VerticalAlignment} object, created in
8213 @internalsref{PianoStaff}. In this object the distance between the
8214 staves is fixed by setting @code{forced-distance}. If you want to
8215 override this, use a @code{\translator} block as follows:
8219 VerticalAlignment \override #'forced-distance = #9
8222 This would bring the staves together at a distance of 9 staff spaces,
8223 measured from the center line of each staff.
8227 Vertical alignment of staves is handled by the
8228 @internalsref{VerticalAlignment} object.
8232 @node Horizontal spacing
8233 @subsection Horizontal Spacing
8235 The spacing engine translates differences in durations into
8236 stretchable distances (``springs'') of differing lengths. Longer
8237 durations get more space, shorter durations get less. The shortest
8238 durations get a fixed amount of space (which is controlled by
8239 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8240 /The longer the duration, the more space it gets: doubling a
8241 duration adds a fixed amount (this amount is controlled by
8242 @code{spacing-increment}) of space to the note.
8244 For example, the following piece contains lots of half, quarter and
8245 8th notes, the eighth note is followed by 1 note head width (NHW).
8246 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8247 @lilypond[fragment, verbatim, relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8251 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8252 width of a note head, and @code{shortest-duration-space} is set to
8253 2.0, meaning that the shortest note gets 2 NHW (2 times
8254 @code{shortest-duration-space}) of space. For normal notes, this space
8255 is always counted from the left edge of the symbol, so the shortest
8256 notes are generally followed by one NHW of space.
8258 If one would follow the above procedure exactly, then adding a single
8259 32th note to a score that uses 8th and 16th notes, would widen up the
8260 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8261 thus adding 1 NHW to every note. To prevent this, the
8262 shortest duration for spacing is not the shortest note in the score,
8263 but the most commonly found shortest note. Notes that are even
8264 shorter this are followed by a space that is proportional to their
8265 duration relative to the common shortest note. So if we were to add
8266 only a few 16th notes to the example above, they would be followed by
8269 @lilypond[fragment, verbatim, relative=2]
8270 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8273 The most common shortest duration is determined as follows: in every
8274 measure, the shortest duration is determined. The most common short
8275 duration, is taken as the basis for the spacing, with the stipulation
8276 that this shortest duration should always be equal to or shorter than
8277 1/8th note. The shortest duration is printed when you run lilypond
8278 with @code{--verbose}. These durations may also be customized. If you
8279 set the @code{common-shortest-duration} in
8280 @internalsref{SpacingSpanner}, then this sets the base duration for
8281 spacing. The maximum duration for this base (normally 1/8th), is set
8282 through @code{base-shortest-duration}.
8284 @cindex @code{common-shortest-duration}
8285 @cindex @code{base-shortest-duration}
8286 @cindex @code{stem-spacing-correction}
8287 @cindex @code{spacing}
8289 In the introduction it was explained that stem directions influence
8290 spacing. This is controlled with @code{stem-spacing-correction}
8291 property in @internalsref{NoteSpacing}, which are generated for every
8292 @internalsref{Voice} context. The @code{StaffSpacing} object
8293 (generated at @internalsref{Staff} context) contains the same property
8294 for controlling the stem/barline spacing. The following example
8295 shows these corrections, once with default settings, and once with
8296 exaggerated corrections:
8302 \property Staff.NoteSpacing \override #'stem-spacing-correction
8304 \property Staff.StaffSpacing \override #'stem-spacing-correction
8309 \paper { raggedright = ##t } }
8312 @cindex SpacingSpanner, overriding properties
8314 Properties of the @internalsref{SpacingSpanner} must be overridden
8315 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8316 created before any @code{\property} statements are interpreted.
8318 \paper @{ \translator @{
8320 SpacingSpanner \override #'spacing-increment = #3.0
8327 @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8328 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8329 @internalsref{SeparatingGroupSpanner}.
8333 Spacing is determined on a score wide basis. If you have a score that
8334 changes its character (measured in durations) halfway during the
8335 score, the part containing the longer durations will be spaced too
8338 There is no convenient mechanism to manually override spacing.
8343 @subsection Font size
8344 @cindex font size, setting
8345 @cindex staff size, setting
8346 @cindex @code{paper} file
8348 The Feta font provides musical symbols at seven different sizes.
8349 These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
8350 26 point. The point size of a font is the height of the corresponding
8351 staff (excluding line thicknesses).
8353 Definitions for these sizes are the files @file{paperSZ.ly}, where
8354 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include any
8355 of these files, the variables @code{paperEleven},
8356 @code{paperThirteen}, @code{paperSixteen},
8357 @code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
8358 are defined respectively. The default @code{\paper} block is also
8359 set. These files should be imported at toplevel, i.e.
8361 \include "paper26.ly"
8365 The default font size settings for each staff heights are generated
8366 from the 20pt style sheet. For more details, see the file
8367 @file{scm/font.scm}.
8371 @subsection Line breaking
8374 @cindex breaking lines
8376 Line breaks are normally computed automatically. They are chosen such
8377 that lines look neither cramped nor loose, and that consecutive lines
8378 have similar density.
8380 Occasionally you might want to override the automatic breaks; you can
8381 do this by specifying @code{\break}. This will force a line break at
8382 this point. Line breaks can only occur at places where there are bar
8383 lines. If you want to have a line break where there is no bar line,
8384 you can force an invisible bar line by entering @code{\bar
8385 ""}. Similarly, @code{\noBreak} forbids a line break at a
8389 @cindex regular line breaks
8390 @cindex four bar music.
8392 For linebreaks at regular intervals use @code{\break} separated by
8393 skips and repeated with @code{\repeat}:
8395 << \repeat unfold 7 @{ s1 * 4 \break @}
8396 @emph{the real music}
8401 This makes the following 28 measures (assuming 4/4 time) be broken every
8406 @internalsref{BreakEvent}.
8410 @subsection Page layout
8413 @cindex breaking pages
8415 @cindex @code{indent}
8416 @cindex @code{linewidth}
8418 The most basic settings influencing the spacing are @code{indent} and
8419 @code{linewidth}. They are set in the @code{\paper} block. They
8420 control the indentation of the first line of music, and the lengths of
8423 If @code{raggedright} is set to true in the @code{\paper}
8424 block, then the lines are justified at their natural length. This
8425 useful for short fragments, and for checking how tight the natural
8429 @cindex vertical spacing
8431 The page layout process happens outside the LilyPond formatting
8432 engine: variables controlling page layout are passed to the output,
8433 and are further interpreted by @code{lilypond} wrapper program. It
8434 responds to the following variables in the @code{\paper} block. The
8435 variable @code{textheight} sets the total height of the music on each
8436 page. The spacing between systems is controlled with
8437 @code{interscoreline}, its default is 16pt. The distance between the
8438 score lines will stretch in order to fill the full page
8439 @code{interscorelinefill} is set to a positive number. In that case
8440 @code{interscoreline} specifies the minimum spacing.
8442 @cindex @code{textheight}
8443 @cindex @code{interscoreline}
8444 @cindex @code{interscorelinefill}
8446 If the variable @code{lastpagefill} is defined,
8447 @c fixme: this should only be done if lastpagefill == #t
8448 systems are evenly distributed vertically on the last page. This
8449 might produce ugly results in case there are not enough systems on the
8450 last page. The @command{lilypond-book} command ignores
8451 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8454 @cindex @code{lastpagefill}
8456 Page breaks are normally computed by @TeX{}, so they are not under
8457 direct control of LilyPond. However, you can insert a commands into
8458 the @file{.tex} output to instruct @TeX{} where to break pages. This
8459 is done by setting the @code{between-systems-strings} on the
8460 @internalsref{NonMusicalPaperColumn} where the system is broken.
8461 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8462 The predefined command @code{\newpage} also does this.
8466 @cindex @code{papersize}
8468 To change the paper size, you must first set the @code{papersize} paper
8469 variable variable as in the example below. Set it to
8470 the strings @code{a4}, @code{letter}, or @code{legal}. After this
8471 specification, you must set the font as described above. If you want
8472 the default font, then use the 20 point font.
8475 \paper@{ papersize = "a4" @}
8476 \include "paper16.ly"
8479 The file @code{paper16.ly} will now include a file named @file{a4.ly}, which
8480 will set the paper variables @code{hsize} and @code{vsize} (used by
8481 @code{lilypond-book} and @code{lilypond}).
8486 @cindex @code{\newpage}
8492 @ref{Invoking lilypond},
8493 @inputfileref{input/regression,between-systems.ly}, and
8494 @internalsref{NonMusicalPaperColumn}.
8498 LilyPond has no concept of page layout, which makes it difficult to
8499 reliably choose page breaks in longer pieces.
8508 Entered music can also be converted to MIDI output. The performance
8509 is good enough for proof-hearing the music for errors.
8511 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8512 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8513 marks translate to a fixed fraction of the available MIDI volume
8514 range, crescendi and decrescendi make the volume vary linearly between
8515 their two extremities. The fractions can be adjusted by
8516 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8517 For each type of MIDI instrument, a volume range can be defined. This
8518 gives a basic equalizer control, which can enhance the quality of
8519 the MIDI output remarkably. The equalizer can be controlled by
8520 setting @code{instrumentEqualizer}.
8524 Many musically interesting effects, such as swing, articulation,
8525 slurring, etc., are not translated to MIDI.
8530 * MIDI instrument names::
8535 @subsection MIDI block
8539 The MIDI block is analogous to the paper block, but it is somewhat
8540 simpler. The @code{\midi} block can contain:
8544 @item a @code{\tempo} definition, and
8545 @item context definitions.
8548 Assignments in the @code{\midi} block are not allowed.
8550 A number followed by a period is interpreted as a real number, so
8551 for setting the tempo for dotted notes, an extra space should be
8552 inserted, for example:
8555 \midi @{ \tempo 4 . = 120 @}
8559 @cindex context definition
8561 Context definitions follow precisely the same syntax as within the
8562 \paper block. Translation modules for sound are called performers.
8563 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8566 @node MIDI instrument names
8567 @subsection MIDI instrument names
8569 @cindex instrument names
8570 @cindex @code{Staff.midiInstrument}
8572 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8573 property. The instrument name should be chosen from the list in
8574 @ref{MIDI instruments}.
8578 If the selected string does not exactly match, then the default is
8579 used, which is the Grand Piano.