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
15 * Easier music entry::
22 * Fingering instructions::
31 * Contemporary notation::
37 @c FIXME: Note entry vs Music entry at top level menu is confusing.
43 This chapter describes all the different types of notation supported
44 by LilyPond. It is intended as a reference for users that are already
45 somewhat familiar with using LilyPond.
51 * Chromatic alterations::
59 * Easy Notation note heads ::
67 A note is printed by specifying its pitch and then its duration:
68 @footnote{Notes constitute the most basic elements of LilyPond input,
69 but they do not form valid input on their own without a @code{\score}
70 block. However, for the sake of brevity and simplicity we will
71 generally omit @code{\score} blocks and @code{\paper} declarations in
74 @lilypond[fragment,verbatim]
83 @cindex Note specification
85 @cindex entering notes
87 The most common syntax for pitch entry is used in @code{\chords} and
88 @code{\notes} mode. In Note and Chord mode, pitches may be designated
89 by names. The notes are specified by the letters @code{a} through
90 @code{g}, while the octave is formed with notes ranging from @code{c}
91 to @code{b}. The pitch @code{c} is an octave below middle C and the
92 letters span the octave above that C:
94 @lilypond[fragment,verbatim]
96 a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
99 @cindex note names, Dutch
101 A sharp is formed by adding @code{-is} to the end of a pitch name and
102 a flat is formed by adding @code{-es}. Double sharps and double flats
103 are obtained by adding @code{-isis} or @code{-eses}. These
104 names are the Dutch note names. In Dutch, @code{aes} is contracted to
105 @code{as} in Dutch, but both forms are accepted. Similarly, both
106 @code{es} and @code{ees} are accepted.
108 There are predefined sets of note names for various other languages.
109 To use them, include the language specific init file. For
110 example: @code{\include "english.ly"}. The available language files
111 and the note names they define are:
116 Note Names sharp flat
117 nederlands.ly c d e f g a bes b -is -es
118 english.ly c d e f g a bf b -s/-sharp -f/-flat
119 deutsch.ly c d e f g a b h -is -es
120 norsk.ly c d e f g a b h -iss/-is -ess/-es
121 svenska.ly c d e f g a b h -iss -ess
122 italiano.ly do re mi fa sol la sib si -d -b
123 catalan.ly do re mi fa sol la sib si -d/-s -b
124 espanol.ly do re mi fa sol la sib si -s -b
133 The optional octave specification takes the form of a series of
134 single quote (`@code{'}') characters or a series of comma
135 (`@code{,}') characters. Each @code{'} raises the pitch by one
136 octave; each @code{,} lowers the pitch by an octave:
138 @lilypond[fragment,verbatim,center]
139 c' c'' es' g' as' gisis' ais'
143 There is also a verbose syntax for pitch specification:
146 @cindex @code{\pitch}
148 \pitch @var{scmpitch}
152 where @var{scmpitch} is a Scheme object of the @code{Pitch} type.
156 Notes can be hidden and unhidden with the following commands:
158 @cindex @code{\hideNotes}
160 @cindex @code{\unHideNotes}
167 @internalsref{NoteEvent}, and @internalsref{NoteHead}.
169 @node Chromatic alterations
170 @subsection Chromatic alterations
172 Normally accidentals are printed automatically, but you may also
173 print them manually. A reminder accidental
174 @cindex reminder accidental
176 can be forced by adding an exclamation mark @code{!}
177 after the pitch. A cautionary accidental
178 @cindex cautionary accidental
179 @cindex parenthesized accidental
180 (an accidental within parentheses) can be obtained by adding the
181 question mark `@code{?}' after the pitch:
183 @lilypond[fragment,verbatim]
184 cis' cis' cis'! cis'?
188 The automatic production of accidentals can be tuned in many
189 ways. For more information, refer to @ref{Accidentals}.
194 A chord is formed by a enclosing a set of pitches in @code{<<} and
195 @code{>>}. A chord may be followed by a duration, and a set of
196 articulations, just like simple notes.
206 Rests are entered like notes, with the note name @code{r}:
208 @lilypond[singleline,verbatim]
212 Whole bar rests, centered in middle of the bar,
213 must be done with multi measure rests. They are discussed in
214 @ref{Multi measure rests}.
217 A rest's vertical position may be explicitly specified by entering a
218 note with the @code{\rest} keyword appended. This makes manual
219 formatting in polyphonic music easier. Rest collision testing will
220 leave these rests alone:
222 @lilypond[singleline,verbatim]
228 @internalsref{RestEvent}, and @internalsref{Rest}.
235 @cindex Invisible rest
238 An invisible rest (also called a `skip') can be entered like a note
239 with note name `@code{s}' or with @code{\skip @var{duration}}:
241 @lilypond[singleline,verbatim]
245 The @code{s} syntax is only available in Note mode and Chord mode. In
246 other situations, you should use the @code{\skip} command:
248 @lilypond[singleline,verbatim]
251 { \time 4/8 \skip 2 \time 4/4 }
252 \notes\relative c'' { a2 a1 }
257 The skip command is merely an empty musical placeholder. It does not
258 produce any output, not even transparent output.
262 @internalsref{SkipEvent}.
267 @subsection Durations
271 @cindex @code{\duration}
274 In Note, Chord, and Lyrics mode, durations are designated by numbers
275 and dots: durations are entered as their reciprocal values. For example,
276 a quarter note is entered using a @code{4} (since it is a 1/4 note), while
277 a half note is entered using a @code{2} (since it is a 1/2 note). For notes
278 longer than a whole you must use variables:
280 @c FIXME: what is an identifier? I do not think it's been introduced yet.
281 @c and if it has, I obviously skipped that part. - Graham
285 c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
287 r1 r2 r4 r8 r16 r32 r64 r64
292 \notes \relative c'' {
294 a1 a2 a4 a8 a16 a32 a64 a64
296 r1 r2 r4 r8 r16 r32 r64 r64
301 \remove "Clef_engraver"
302 \remove "Staff_symbol_engraver"
303 \remove "Time_signature_engraver"
304 \consists "Pitch_squash_engraver"
311 If the duration is omitted then it is set to the previously entered
312 duration. The default for the first note is a quarter note. The duration
313 can be followed by dots (`@code{.}') in order to obtain dotted note
317 @lilypond[fragment,verbatim,center]
318 a' b' c''8 b' a'4 a'4. b'4.. c'8.
323 You can alter the length of duration by a fraction @var{N/M}
324 appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
325 will not affect the appearance of the notes or rests produced.
326 In the following example, the first three notes take up exactly two
328 @lilypond[fragment,relative 2,verbatim]
330 a4*2/3 gis4*2/3 a4*2/3
334 Durations can also be produced using the verbose syntax
335 @code{\duration @var{Scheme object}}:
336 @lilypond[verbatim,fragment]
337 c'\duration #(ly:make-duration 4 1)
344 Dots are normally moved up to avoid staff lines, except in polyphonic
345 situations. The following commands may be used to force a particular
348 @cindex @code{\dotsUp}
350 @cindex @code{\dotsDown}
352 @cindex @code{\dotsBoth}
357 @internalsref{Dots}, and @internalsref{DotColumn}.
361 In dense chords, dots can overlap.
366 Whenever a note is found, a
367 @internalsref{Stem} object is created automatically. For whole notes
368 and rests, stem objects are also created, but in those cases, the stem
373 @cindex @code{\stemUp}
375 @cindex @code{\stemDown}
377 @cindex @code{\stemBoth}
388 A tie connects two adjacent note heads of the same pitch. The tie in
389 effect extends the length of a note. Ties should not be confused with
390 slurs, which indicate articulation, or phrasing slurs, which indicate
391 musical phrasing. A tie is entered using the tilde symbol `@code{~}':
393 @lilypond[fragment,verbatim,center]
394 e' ~ e' <<c' e' g'>> ~ <<c' e' g'>>
397 When a tie is applied to a chord, all note heads whose pitches match
398 are connected. When no note heads match, no ties will be created.
400 In its meaning a tie is just a way of extending a note duration, similar
401 to the augmentation dot; in the following example there are two ways of
402 notating exactly the same concept:
404 @lilypond[fragment, singleline,quote]
405 \time 3/4 c'2. c'2 ~ c'4
407 If you need to tie a lot of notes over bars, it may be easier to use automatic
408 note splitting (See @ref{Automatic note splitting}).
413 @cindex @code{\tieUp}
415 @cindex @code{\tieDown}
417 @cindex @code{\tieBoth}
419 @cindex @code{\tieDotted}
421 @cindex @code{\tieSolid}
426 @internalsref{TieEvent}, @internalsref{NewTieEvent},
427 @internalsref{Tie}, and @ref{Automatic note splitting}.
430 ties created for a chord, see @inputfileref{input/test,tie-sparse.ly}.
434 Tieing only a subset of the note heads of a pair of chords is not
435 supported in a simple way. It can be achieved by moving the
436 tie-engraver into the @internalsref{Thread} context and turning on and
437 off ties per @internalsref{Thread}.
439 Switching staves when a tie is active, will not produce a slanted tie.
441 Formatting of ties is a difficult subject. The results are often not
451 @cindex @code{\times}
453 Tuplets are made out of a music expression by multiplying all durations
456 @cindex @code{\times}
458 \times @var{fraction} @var{musicexpr}
461 The duration of @var{musicexpr} will be multiplied by the fraction.
462 In the sheet music, the fraction's denominator will be printed over
463 the notes, optionally with a bracket. The most common tuplet is the
464 triplet in which 3 notes have the length of 2, so the notes are 2/3
465 of their written length:
467 @lilypond[fragment,verbatim,center]
468 g'4 \times 2/3 {c'4 c' c'} d'4 d'4
471 The property @code{tupletSpannerDuration} specifies how long each
472 bracket should last. With this, you can make lots of tuplets while
473 typing @code{\times} only once, saving lots of typing. In the next
474 example, there are two triplets shown, while @code{\times} was only
477 @lilypond[fragment, relative, singleline, verbatim]
478 \property Voice.tupletSpannerDuration = #(ly:make-moment 1 4)
479 \times 2/3 { c'8 c c c c c }
482 The format of the number is determined by the property
483 @code{tupletNumberFormatFunction}. The default prints only the
484 denominator, but if it is set to the Scheme function
485 @code{fraction-tuplet-formatter}, @var{num}:@var{den} will be printed
489 @cindex @code{tupletNumberFormatFunction}
490 @cindex tuplet formatting
495 @cindex @code{\tupletUp}
497 @cindex @code{\tupletDown}
499 @cindex @code{\tupletBoth}
504 @internalsref{TupletBracket}, and @internalsref{TimeScaledMusic}.
508 Nested tuplets are not formatted automatically. In this case, outer
509 tuplet brackets should be moved manually.
511 @node Easy Notation note heads
512 @subsection Easy Notation note heads
514 @cindex easy notation
517 The `easy play' note head includes a note name inside the head. It is
518 used in music aimed at beginners:
520 @lilypond[singleline,verbatim,26pt]
522 \notes { c'2 e'4 f' | g'1 }
523 \paper { \translator { \EasyNotation } }
527 The @code{EasyNotation} variable overrides a @internalsref{Score} context.
528 You probably will want to print it with magnification or a
529 large font size to make it more readable. To print with
530 magnification, you must create a DVI file (with @file{ly2dvi}) and
531 then enlarge it with something like @file{dvips -x 2000 file.dvi}.
532 See the @code{dvips} documentation for more details. To print with a
533 larger font, see @ref{Font Size}.
539 If you view the result with Xdvi, then staff lines will show through
540 the letters. Printing the PostScript file obtained with ly2dvi does
541 produce the correct result.
544 @node Easier music entry
545 @section Easier music entry
548 When entering music it is easy to introduce errors. This section deals
549 with tricks and features of the input language that help when entering
550 music, and find and correct mistakes. Some features of the input
551 language ease entering music, but also have other applications. They
552 are not described in this section.
554 It is also possible to use external programs, for example GUI
555 interfaces, or MIDI transcription programs, to enter or edit
556 music. Refer to the website for more information. Finally, there are
557 tools make debugging easier, by linking the input file and the output
558 shown on screen. See @ref{Point and click} for more information.
565 * Skipping corrected music::
566 * Automatic note splitting ::
572 @node Relative octaves
573 @subsection Relative octaves
575 @cindex relative octave specification
577 Octaves are specified by adding @code{'} and @code{,} to pitch names.
578 When you copy existing music, it is easy to accidentally put a pitch
579 in the wrong octave and hard to find such an error. The relative
580 octave mode prevents these errors: a single error puts the rest of the
581 piece off by one octave:
583 @cindex @code{\relative}
585 \relative @var{startpitch} @var{musicexpr}
588 The octave of notes that appear in @var{musicexpr} are calculated as
589 follows: If no octave changing marks are used, the basic interval
590 between this and the last note is always taken to be a fourth or less
591 (; this distance is determined without regarding alterations: a
592 @code{fisis} following a @code{ceses} will be put above the
595 The octave changing marks @code{'} and @code{,} can be added to raise
596 or lower the pitch by an extra octave. Upon entering relative mode,
597 an absolute starting pitch must be specified that will act as the
598 predecessor of the first note of @var{musicexpr}.
600 Here is the relative mode shown in action:
601 @lilypond[fragment,singleline,verbatim,center]
607 Octave changing marks are used for intervals greater than a fourth:
608 @lilypond[fragment,verbatim,center]
613 If the preceding item is a chord, the first note of the chord is used
614 to determine the first note of the next chord:
616 @lilypond[fragment,verbatim,center]
623 @cindex @code{\notes}
625 The pitch after the @code{\relative} contains a note name. To parse
626 the pitch as a note name, you have to be in note mode, so there must
627 be a surrounding @code{\notes} keyword (which is not
630 The relative conversion will not affect @code{\transpose},
631 @code{\chords} or @code{\relative} sections in its argument. If you
632 want to use relative within transposed music, you must place an
633 additional @code{\relative} inside the @code{\transpose}.
636 @subsection Octave check
639 Octave checks make octave errors easier to correct.
645 This checks that @var{pitch} (without octave) yields @var{pitch} (with
646 octave) in \relative mode. If not, a warning is printed, and the
647 octave is corrected, for example, the first check is passed
648 successfully. The second check fails with an error message. The
649 octave is adjusted so the following notes are in the correct octave
660 The octave of a note following an octave check is determined with
661 respect to the note preceding it. In the next fragment, the last note
662 is a @code{a'}, above central C. Hence, the @code{\octave} check may
663 be deleted without changing the meaning of the piece.
665 @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 |
697 @cindex skipTypesetting
699 Failed bar checks are caused by entering incorrect
700 durations. Incorrect durations often completely garble up the score,
701 especially if it is polyphonic, so you should start correcting the
702 score by scanning for failed bar checks and incorrect durations. To
703 speed up this process, you can use @code{skipTypesetting}, described
706 @node Skipping corrected music
707 @subsection Skipping corrected music
709 The property @code{Score.skipTypesetting} can be used to switch on and
710 off typesetting completely during the interpretation phase. When
711 typesetting is switched off, the music is processed much more quickly.
712 This can be used to skip over the parts of a score that have already
713 been checked for errors:
715 @lilypond[fragment,singleline,verbatim]
717 \property Score.skipTypesetting = ##t
719 \property Score.skipTypesetting = ##f
723 @node Automatic note splitting
724 @subsection Automatic note splitting
726 Long notes can be converted automatically to tied notes. This is done
727 by replacing the @internalsref{Note_heads_engraver} by the
728 @internalsref{Completion_heads_engraver}:
731 \paper @{ \translator @{
733 \remove "Note_heads_engraver"
734 \consists "Completion_heads_engraver"
738 which will make long notes tied in the following example:
741 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
748 c2. c8 d4 e f g a b c8 c2 b4 a g16 f4 e d c8. c2
750 \paper { \translator {
752 \remove "Note_heads_engraver"
753 \consists "Completion_heads_engraver"
758 This engraver splits all running notes at the bar line, and inserts
759 ties. One of its uses is to debug complex scores: if the measures are
760 not entirely filled, then the ties exactly show how much each measure
765 Not all durations (especially those containing tuplets) can be
766 represented exactly; the engraver will not insert tuplets.
772 @section Staff notation
774 This section describes music notation that occurs on staff level,
775 such as keys, clefs and time signatures.
777 @cindex Staff notation
791 @subsection Staff symbol
793 @cindex adjusting staff symbol
794 @cindex StaffSymbol, using \property
795 @cindex staff lines, setting number of
797 Notes, dynamic signs, etc. are grouped
798 with a set of horizontal lines, into a staff (plural `staves'). In our
799 system, these lines are drawn using a separate layout object called
802 This object is created whenever a @internalsref{Staff} context is
803 created. The appearance of the staff symbol cannot be changed by
804 using @code{\override} or @code{\set}. At the moment that
805 @code{\property Staff} is interpreted, a @internalsref{Staff} context
806 is made, and the @internalsref{StaffSymbol} is created before any
807 @code{\override} is effective. Properties can be changed in a
808 @code{\translator} definition, or by using @code{\outputproperty}.
812 If a staff is ended halfway a piece, the staff symbol may not end
813 exactly on the barline.
817 @subsection Key signature
818 @cindex Key signature
822 The key signature indicates the scale in which a piece is played. It
823 is denoted by a set of alterations (flats or sharps) at the start of
828 Setting or changing the key signature is done with the @code{\key}
831 @code{\key} @var{pitch} @var{type}
834 @cindex @code{\minor}
835 @cindex @code{\major}
836 @cindex @code{\minor}
837 @cindex @code{\ionian}
838 @cindex @code{\locrian}
839 @cindex @code{\aeolian}
840 @cindex @code{\mixolydian}
841 @cindex @code{\lydian}
842 @cindex @code{\phrygian}
843 @cindex @code{\dorian}
845 Here, @var{type} should be @code{\major} or @code{\minor} to get
846 @var{pitch}-major or @var{pitch}-minor, respectively.
847 The standard mode names @code{\ionian},
848 @code{\locrian}, @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
849 @code{\phrygian}, and @code{\dorian} are also defined.
851 This command sets the context property
852 @internalsref{Staff}.@code{keySignature}. Non-standard key signatures
853 can be specified by setting this property directly.
857 The ordering of a key cancellation is wrong when it is combined with
858 repeat bar lines. The cancellation is also printed after a line break.
862 @internalsref{KeyChangeEvent}, and @internalsref{KeySignature}.
864 @cindex @code{keySignature}
871 The clef indicates which lines of the staff correspond to which
876 The clef can be set or changed with the @code{\clef} command:
877 @lilypond[fragment,verbatim]
878 \key f\major c''2 \clef alto g'2
881 Supported clef-names include:
882 @c Moved standard clefs to the top /MB
884 @item treble, violin, G, G2
893 G clef on 1st line, so-called French violin clef
908 By adding @code{_8} or @code{^8} to the clef name, the clef is
909 transposed one octave down or up, respectively. Argument @var{clefname}
910 must be enclosed in quotes when it contains underscores or digits. For
916 This command is equivalent to setting @code{clefGlyph},
917 @code{clefPosition} (which controls the Y position of the clef),
918 @code{centralCPosition} and @code{clefOctavation}. A clef is printed
919 when any of these properties are changed.
923 The object for this symbol is @internalsref{Clef}.
927 @node Ottava brackets
928 @subsection Ottava brackets
930 ``Ottava'' brackets introduce an extra transposition of an octave for
931 the staff. They are created by invoking the function
932 @code{set-octavation}:
938 @lilypond[verbatim,fragment]
947 Internally the @code{set-octavation} function sets the properties
948 @code{ottavation} (eg. to @code{"8va"}) and @code{centralCPosition}.
952 @internalsref{OttavaSpanner}.
956 @code{set-octavation} will get confused when clef changes happen
957 during an octavation bracket.
960 @subsection Time signature
961 @cindex Time signature
965 Time signature indicates the metrum of a piece: a regular pattern of
966 strong and weak beats. It is denoted by a fraction at the start of the
971 The time signature is set or changed by the @code{\time}
973 @lilypond[fragment,verbatim]
974 \time 2/4 c'2 \time 3/4 c'2.
977 The symbol that is printed can be customized with the @code{style}
978 property. Setting it to @code{#'()} uses fraction style for 4/4 and
979 2/2 time. There are many more options for its layout. See
980 @inputfileref{input/test,time.ly} for more examples.
983 This command sets the property @code{timeSignatureFraction},
984 @code{beatLength} and @code{measureLength} in the @code{Timing}
985 context, which is normally aliased to @internalsref{Score}. The
986 property @code{measureLength} determines where bar lines should be
987 inserted, and how automatic beams should be generated. Changing the
988 value of @code{timeSignatureFraction} also causes the symbol to be
991 More options are available through the Scheme function
992 @code{set-time-signature}. In combination with the
993 @internalsref{Measure_grouping_engraver}, it will create
994 @internalsref{MeasureGrouping} signs. Such signs ease reading
995 rhythmically complex modern music. In the following example, the 9/8
996 measure is subdivided in 2, 2, 2 and 3. This is passed to
997 @code{set-time-signature} as the third argument @code{(2 2 2 3)}:
1000 \score { \notes \relative c'' {
1001 #(set-time-signature 9 8 '(2 2 2 3))
1002 g8[ g] d[ d] g[ g] a8[( bes g]) |
1003 #(set-time-signature 5 8 '(3 2))
1008 \translator { \StaffContext
1009 \consists "Measure_grouping_engraver"
1015 @internalsref{TimeSignature}, and @internalsref{Timing_engraver}.
1020 Automatic beaming does not use measure grouping specified with
1021 @code{set-time-signature}.
1023 @node Partial measures
1024 @subsection Partial measures
1027 @cindex partial measure
1028 @cindex measure, partial
1029 @cindex shorten measures
1030 @cindex @code{\partial}
1032 Partial measures, for example in upsteps, are entered using the
1033 @code{\partial} command:
1034 @lilypond[fragment,verbatim]
1035 \partial 16*5 c'16 c4 | a'2. ~ a'8. a'16 | g'1
1038 The syntax for this command is
1040 \partial @var{duration}
1042 This is internally translated into
1044 \property Timing.measurePosition = -@var{length of duration}
1047 The property @code{measurePosition} contains a rational number
1048 indicating how much of the measure has passed at this point.
1050 @node Unmetered music
1051 @subsection Unmetered music
1053 Bar lines and bar numbers are calculated automatically. For unmetered
1054 music (e.g. cadenzas), this is not desirable. By setting
1055 @code{Score.timing} to false, this automatic timing can be switched
1061 @cindex @code{\cadenzaOn}
1063 @cindex @code{\cadenzaOff}
1067 @subsection Bar lines
1071 @cindex measure lines
1075 Bar lines delimit measures, but are also used to indicate repeats.
1076 Normally, they are inserted automatically. Line breaks may only
1082 of barlines can be forced with the @code{\bar} command:
1083 @lilypond[relative=1,fragment,verbatim]
1087 The following bar types are available:
1088 @lilypond[fragment, relative, singleline, verbatim]
1100 In scores with many staves, a @code{\bar} command in one staff is
1101 automatically applied to all staves. The resulting bar lines are
1102 connected between different staves of a @internalsref{StaffGroup}:
1104 @lilypond[fragment, verbatim]
1105 < \context StaffGroup <
1106 \context Staff = up { e'4 d'
1109 \context Staff = down { \clef bass c4 g e g } >
1110 \context Staff = pedal { \clef bass c2 c2 } >
1114 The command @code{\bar @var{bartype}} is a short cut for doing
1115 @code{\property Score.whichBar = @var{bartype}} Whenever
1116 @code{whichBar} is set to a string, a bar line of that type is
1117 created. At the start of a measure it is set to
1118 @code{defaultBarType}. The contents of @code{repeatCommands} are used
1119 to override default measure bars.
1121 Property @code{whichBar} can also be set directly, using @code{\property}
1122 or @code{\bar}. These settings take precedence over the automatic
1123 @code{whichBar} settings.
1126 @cindex repeatCommands
1127 @cindex defaultBarType
1129 You are encouraged to use @code{\repeat} for repetitions. See
1139 The bar line objects that are created at @internalsref{Staff} level
1140 are called @internalsref{BarLine}, the bar lines that span staves are
1141 @internalsref{SpanBar}s.
1143 @cindex bar lines at start of system
1144 @cindex start of system
1146 The barlines at the start of each system are
1147 @internalsref{SystemStartBar}, @internalsref{SystemStartBrace}, and
1148 @internalsref{SystemStartBracket}. They are spanner objects and
1149 typically must be tuned from a @code{\translator} block.
1156 The easiest way to enter fragments with more than one voice on a staff
1157 is to split chords using the separator @code{\\}. You can use it for
1158 small, short-lived voices or for single chords:
1160 @lilypond[verbatim,fragment]
1161 \context Voice = VA \relative c'' {
1162 c4 < { f d e } \\ { b c2 } > c4 < g' \\ b, \\ f' \\ d >
1166 The separator causes @internalsref{Voice} contexts to be
1168 bear the names @code{"1"}, @code{"2"}, etc. In each of these
1169 contexts, vertical direction of slurs, stems, etc. is set
1172 This can also be done by instantiating @internalsref{Voice} contexts
1173 by hand, and using @code{\voiceOne}, up to @code{\voiceFour} to assign
1174 a stem directions and horizontal shift for each part:
1177 @lilypond[singleline, verbatim]
1179 \context Staff < \context Voice = VA { \voiceOne cis2 b }
1180 \context Voice = VB { \voiceThree b4 ais ~ ais4 gis4 }
1181 \context Voice = VC { \voiceTwo fis4~ fis4 f ~ f } >
1184 Normally, note heads with a different number of dots are not merged, but
1185 when the object property @code{merge-differently-dotted} is set in
1186 the @internalsref{NoteCollision} object, they are merged:
1187 @lilypond[verbatim,fragment,singleline]
1188 \relative c'' \context Voice < {
1190 \property Staff.NoteCollision \override
1191 #'merge-differently-dotted = ##t
1193 } \\ { g8.[ f16] g8.[ f16] }
1197 Similarly, you can merge half note heads with eighth notes, by setting
1198 @code{merge-differently-headed}:
1199 @lilypond[fragment, relative=2,verbatim]
1202 \property Staff.NoteCollision
1203 \override #'merge-differently-headed = ##t
1204 c8 c4. } \\ { c2 c2 } >
1207 LilyPond also vertically shifts rests that are opposite of a stem:
1210 @lilypond[singleline,fragment,verbatim]
1211 \context Voice < c''4 \\ r4 >
1219 @cindex @code{\oneVoice}
1221 @cindex @code{\voiceOne}
1223 @cindex @code{\voiceTwo}
1225 @cindex @code{\voiceThree}
1227 @cindex @code{\voiceFour}
1230 The following commands specify in what chords of the current voice
1231 should be shifted: the outer voice has @code{\shiftOff}, and the inner
1232 voices have @code{\shiftOn}, @code{\shiftOnn}, etc.
1235 @cindex @code{\shiftOn}
1237 @cindex @code{\shiftOnn}
1239 @cindex @code{\shiftOnnn}
1241 @cindex @code{\shiftOff}
1248 The objects responsible for resolving collisions are
1249 @internalsref{NoteCollision} and @internalsref{RestCollision}. See
1250 also example files @inputfileref{input/regression,collision-dots.ly},
1251 @inputfileref{input/regression,collision-head-chords.ly},
1252 @inputfileref{input/regression,collision-heads.ly},
1253 @inputfileref{input/regression,collision-mesh.ly}, and
1254 @inputfileref{input/regression,collisions.ly}.
1259 Resolving collisions is a intricate subject, and only a few situations
1260 are handled. When LilyPond cannot cope, the @code{force-hshift}
1261 property of the @internalsref{NoteColumn} object and pitched rests can
1262 be used to override typesetting decisions.
1264 When using @code{merge-differently-headed} with an upstem 8th or a shorter
1265 note, and a downstem half note, the 8th note gets the wrong offset.
1270 Beams are used to group short notes into chunks that are aligned with
1271 the metrum. They are inserted automatically in most cases:
1273 @lilypond[fragment,verbatim, relative=2]
1274 \time 2/4 c8 c c c \time 6/8 c c c c8. c16 c8
1277 When these automatic decisions are not good enough, beaming can be
1278 entered explicitly. It is also possible to define beaming patterns
1279 that differ from the defaults.
1283 @internalsref{Beam}.
1286 @cindex Automatic beams
1287 @subsection Manual beams
1288 @cindex beams, manual
1292 In some cases it may be necessary to override the automatic beaming
1293 algorithm. For example, the auto beamer will not put beams over rests
1294 or bar lines. Such beams are specified by manually: the begin and end
1295 point are marked with @code{[} and @code{]}:
1297 @lilypond[fragment,relative,verbatim]
1299 r4 r8[ g' a r8] r8 g[ | a] r8
1303 @cindex @code{stemLeftBeamCount}
1305 Normally, beaming patterns within a beam are determined automatically.
1306 When this mechanism fouls up, the properties
1307 @code{Voice.stemLeftBeamCount} and @code{Voice.stemRightBeamCount} can
1308 be used to control the beam subdivision on a stem. If either property
1309 is set, its value will be used only once, and then it is erased.
1311 @lilypond[fragment,relative,verbatim]
1314 f8[ r16 \property Voice.stemLeftBeamCount = #1 f g a]
1317 @cindex @code{stemRightBeamCount}
1320 The property @code{subdivideBeams} can be set in order to subdivide
1321 all 16th or shorter beams at beat positions, as defined by the
1322 @code{beatLength} property . This accomplishes the same effect as
1323 twiddling with @code{stemLeftBeamCount} and @code{stemRightBeamCount},
1324 but it take less typing:
1327 @lilypond[relative=1,verbatim,noindent]
1329 \property Voice.subdivideBeams = ##t
1331 \property Score.beatLength = #(ly:make-moment 1 8)
1334 @cindex subdivideBeams
1336 Kneed beams are inserted automatically, when a large gap is detected
1337 between the note heads. This behavior can be tuned through the object
1338 property @code{auto-knee-gap}.
1340 Normally, line breaks are forbidden when beams cross bar lines. This
1341 behavior can be changed by setting @code{allowBeamBreak}.
1343 @cindex @code{allowBeamBreak}
1344 @cindex beams and line breaks
1346 @cindex beams, kneed
1348 @cindex auto-knee-gap
1354 @cindex Frenched staves
1356 Automatically kneed beams cannot be used together with hidden staves.
1361 * Setting automatic beam behavior ::
1365 @no de Beam typography
1366 @sub section Beam typography
1368 One of the strong points of LilyPond is how beams are formatted. Beams
1369 are quantized, meaning that the left and right endpoints beams start
1370 exactly on staff lines. Without quantization, small wedges of white
1371 space appear between the beam and staff line, and this looks untidy.
1373 Beams are also slope-damped: melodies that go up or down should also
1374 have beams that go up or down, but the slope of the beams should be
1375 less than the slope of the notes themselves.
1377 Some beams should be horizontal. These are so-called concave beams.
1379 [TODO: some pictures.]
1383 @node Setting automatic beam behavior
1384 @subsection Setting automatic beam behavior
1386 @cindex @code{autoBeamSettings}
1387 @cindex @code{(end * * * *)}
1388 @cindex @code{(begin * * * *)}
1389 @cindex automatic beams, tuning
1390 @cindex tuning automatic beaming
1392 @c [TODO: use \applycontext]
1394 In normal time signatures, automatic beams can start on any note but can
1395 only end in a few positions within the measure: beams can end on a beat,
1396 or at durations specified by the properties in
1397 @code{Voice.autoBeamSettings}. The defaults for @code{autoBeamSettings}
1398 are defined in @file{scm/auto-beam.scm}.
1400 The value of @code{autoBeamSettings} is changed using
1401 @code{\override} and restored with @code{\revert}:
1403 \property Voice.autoBeamSettings \override #'(@var{BE} @var{P} @var{Q} @var{N} @var{M}) = @var{dur}
1404 \property Voice.autoBeamSettings \revert #'(@var{BE} @var{P} @var{Q} @var{N} @var{M})
1406 Here, @var{BE} is the symbol @code{begin} or @code{end}. It determines
1407 whether the rule applies to begin or end-points. The quantity
1408 @var{P}/@var{Q} refers to the length of the beamed notes (and `@code{*
1409 *}' designates notes of any length), @var{N}/@var{M} refers to a time
1410 signature (wildcards, `@code{* *}' may be entered to designate all time
1413 For example, if automatic beams should end on every quarter note, use
1416 \property Voice.autoBeamSettings \override
1417 #'(end * * * *) = #(ly:make-moment 1 4)
1419 Since the duration of a quarter note is 1/4 of a whole note, it is
1420 entered as @code{(ly:make-moment 1 4)}.
1422 The same syntax can be used to specify beam starting points. In this
1423 example, automatic beams can only end on a dotted quarter note:
1425 \property Voice.autoBeamSettings \override
1426 #'(end * * * *) = #(ly:make-moment 3 8)
1428 In 4/4 time signature, this means that automatic beams could end only on
1429 3/8 and on the fourth beat of the measure (after 3/4, that is 2 times
1430 3/8 has passed within the measure).
1432 Rules can also be restricted to specific time signatures. A rule that
1433 should only be applied in @var{N}/@var{M} time signature is formed by
1434 replacing the second asterisks by @var{N} and @var{M}. For example, a
1435 rule for 6/8 time exclusively looks like
1437 \property Voice.autoBeamSettings \override
1438 #'(begin * * 6 8) = ...
1441 If a rule should be to applied only to certain types of beams, use the
1442 first pair of asterisks. Beams are classified according to the
1443 shortest note they contain. For a beam ending rule that only applies
1444 to beams with 32nd notes (and no shorter notes), use @code{(end 1 32 *
1447 If a score ends while an automatic beam has not been ended and is still
1448 accepting notes, this last beam will not be typeset at all.
1450 @cindex automatic beam generation
1452 @cindex @code{Voice.autoBeaming}
1455 For melodies that have lyrics, you may want to switch off
1456 automatic beaming. This is done by setting @code{Voice.autoBeaming} to
1461 @cindex @code{\autoBeamOff}
1462 @code{\autoBeamOff},
1463 @cindex @code{\autoBeamOn}
1469 The rules for ending a beam depend on the shortest note in a beam.
1470 So, while it is possible to have different ending rules for eight
1471 beams and sixteenth beams, a beam that contains both eight and
1472 sixteenth notes will use the rules for the sixteenth beam.
1474 In the example below, the autobeamer makes eight beams and sixteenth
1475 end at 3 eights; the third beam can only be corrected by specifying
1478 @lilypond[singleline,fragment,relative,noverbatim,quote]
1479 \property Voice.autoBeamSettings
1480 \override #'(end * * * *) = #(ly:make-moment 3 8)
1481 % rather show case where it goes wrong
1482 %\time 12/8 c'8 c c c16 c c c c c c[ c c c] c8[ c] c4
1483 \time 12/8 c'8 c c c16 c c c c c c c c c c8 c c4
1485 It is not possible to specify beaming parameters that act differently in
1486 different parts of a measure. This means that it is not possible to use
1487 automatic beaming in irregular meters such as @code{5/8}.
1490 @section Accidentals
1493 This section describes how to change the way that accidentals are
1494 inserted automatically before the running notes.
1498 * Using the predefined accidental variables::
1499 * Customized accidental rules::
1502 @node Using the predefined accidental variables
1503 @subsection Using the predefined accidental variables
1505 The constructs for describing the accidental typesetting rules are
1506 quite hairy, so non-experts should stick to the variables
1507 defined in @file{ly/property-init.ly}.
1508 @cindex @file{property-init.ly}
1510 The variables set properties in the ``@code{Current}'' context (see
1511 @ref{Context properties}). This means that the variables should
1512 normally be added right after the creation of the context in which the
1513 accidental typesetting described by the variable is to take
1514 effect. For example, if you want to use piano-accidentals in a piano
1515 staff then issue @code{\pianoAccidentals} first thing after the
1516 creation of the piano staff:
1519 \notes \relative c'' <
1520 \context Staff = sa @{ cis4 d e2 @}
1521 \context GrandStaff <
1523 \context Staff = sb @{ cis4 d e2 @}
1524 \context Staff = sc @{ es2 c @}
1526 \context Staff = sd @{ es2 c @}
1530 @lilypond[singleline]
1532 \notes \relative c'' <
1533 \context Staff = sa { cis4 d e2 }
1534 \context GrandStaff <
1536 \context Staff = sb { cis4 d e2 }
1537 \context Staff = sc { es2 c }
1539 \context Staff = sd { es2 c }
1544 minimumVerticalExtent = #'(-4.0 . 4.0)
1552 @item \defaultAccidentals
1553 @cindex @code{\defaultAccidentals}
1554 This is the default typesetting behaviour. It should correspond
1555 to 18th century common practice: Accidentals are
1556 remembered to the end of the measure in which they occur and
1557 only on their own octave.
1559 @item \voiceAccidentals
1560 @cindex @code{\voiceAccidentals}
1562 The normal behaviour is to
1563 remember the accidentals on Staff-level. This variable, however,
1564 typesets accidentals individually for each voice. Apart from that the
1565 rule is similar to @code{\defaultAccidentals}.
1567 This leads to some weird and often unwanted results
1568 because accidentals from one voice do not get cancelled in other
1570 @lilypond[singleline,relative,fragment,verbatim,quote]
1578 Hence you should only use @code{\voiceAccidentals} if the voices
1579 are to be read solely by individual musicians. If the staff is to be
1580 used by one musician (e.g. a conductor) then you use
1581 @code{\modernVoiceAccidentals} or @code{\modernVoiceCautionaries}
1584 @item \modernAccidentals
1585 @cindex @code{\modernAccidentals}
1586 This rule corresponds to the common practice in the 20th
1588 The rule is more complex than @code{\defaultAccidentals}.
1589 You get all the same accidentals, but temporary
1590 accidentals also get cancelled in other octaves. Furthermore,
1591 in the same octave, they also get cancelled in the following measure:
1592 @lilypond[singleline,fragment,verbatim]
1594 cis' c'' cis'2 | c'' c'
1597 @item \modernCautionaries
1598 @cindex @code{\modernCautionaries}
1599 This rule is similar to @code{\modernAccidentals}, but the
1600 ``extra'' accidentals (the ones not typeset by
1601 @code{\defaultAccidentals}) are typeset as cautionary accidentals.
1602 They are printed in reduced size or with parentheses:
1603 @lilypond[singleline,fragment,verbatim]
1605 cis' c'' cis'2 | c'' c'
1608 @cindex @code{\modernVoiceAccidentals}
1609 @item \modernVoiceAccidentals
1610 is used for multivoice accidentals to be read both by musicians
1611 playing one voice and musicians playing all voices. Accidentals are
1612 typeset for each voice, but they @emph{are} cancelled across voices in
1613 the same @internalsref{Staff}.
1615 @cindex @code{\modernVoiceCautionaries}
1616 @item \modernVoiceCautionaries
1617 is the same as @code{\modernVoiceAccidentals}, but with the extra
1618 accidentals (the ones not typeset by @code{\voiceAccidentals}) typeset
1619 as cautionaries. Even though all accidentals typeset by
1620 @code{\defaultAccidentals} @emph{are} typeset by this variable then
1621 some of them are typeset as cautionaries.
1623 @item \pianoAccidentals
1624 @cindex @code{\pianoAccidentals}
1625 20th century practice for piano notation. Very similar to
1626 @code{\modernAccidentals} but accidentals also get cancelled
1627 across the staves in the same @internalsref{GrandStaff} or
1628 @internalsref{PianoStaff}.
1630 @item \pianoCautionaries
1631 @cindex @code{\pianoCautionaries}
1632 As @code{\pianoAccidentals} but with the extra accidentals
1633 typeset as cautionaries.
1636 @cindex @code{\noResetKey}
1637 Same as @code{\defaultAccidentals} but with accidentals lasting
1638 ``forever'' and not only until the next measure:
1639 @lilypond[singleline,fragment,verbatim,relative]
1644 @item \forgetAccidentals
1645 @cindex @code{\forgetAccidentals}
1646 This is sort of the opposite of @code{\noResetKey}: Accidentals
1647 are not remembered at all---and hence all accidentals are
1648 typeset relative to the key signature, regardless of what was
1649 before in the music:
1650 @lilypond[singleline,fragment,verbatim,relative]
1652 \key d\major c4 c cis cis d d dis dis
1656 @node Customized accidental rules
1657 @subsection Customized accidental rules
1659 This section must be considered gurus-only, and hence it must be
1660 sufficient with a short description of the system and a reference to
1661 the internal documentation.
1663 The algorithm tries several different rules, and uses the rule
1664 that gives the highest number of accidentals. Each rule consists of
1667 In which context is the rule applied. For example, if
1668 @var{context} is @internalsref{Score} then all staves share
1669 accidentals, and if @var{context} is @internalsref{Staff} then all
1670 voices in the same staff share accidentals, but staves do not.
1672 Whether the accidental changes all octaves or only the current
1675 Over how many barlines the accidental lasts.
1676 If @var{lazyness} is @code{-1} then the accidental is forget
1677 immediately, and if @var{lazyness} is @code{#t} then the accidental
1680 @c [TODO: should use +infinity for this case?]
1686 @cindex @code{\defaultAccidentals}
1687 @code{\defaultAccidentals},
1688 @cindex @code{\voiceAccidentals}
1689 @code{\voiceAccidentals},
1690 @cindex @code{\modernAccidentals}
1691 @code{\modernAccidentals},
1692 @cindex @code{\modernCautionaries}
1693 @code{\modernCautionaries},
1694 @cindex @code{\modernVoiceAccidentals}
1695 @code{\modernVoiceAccidentals},
1696 @cindex @code{\modernVoiceCautionaries}
1697 @code{\modernVoiceCautionaries},
1698 @cindex @code{\pianoAccidentals}
1699 @code{\pianoAccidentals},
1700 @cindex @code{\pianoCautionaries}
1701 @code{\pianoCautionaries},
1702 @cindex @code{\noResetKey}
1704 @cindex @code{\forgetAccidentals}
1705 @code{\forgetAccidentals}.
1709 @internalsref{Accidental_engraver}, @internalsref{Accidental}, and
1710 @internalsref{AccidentalPlacement}.
1715 Currently the simultaneous notes are considered to be entered in
1716 sequential mode. This means that in a chord the accidentals are
1717 typeset as if the notes in the chord happened once at a time - in the
1718 order in which they appear in the input file.
1720 This is only a problem when there are simultaneous notes whose
1721 accidentals depend on each other. The problem only occurs when using
1722 non-default accidentals. In the default scheme, accidentals only
1723 depend on other accidentals with the same pitch on the same staff, so
1724 no conflicts possible.
1726 This example shows two examples of the same music giving different
1727 accidentals depending on the order in which the notes occur in the
1730 @lilypond[singleline,fragment,verbatim]
1731 \property Staff.autoAccidentals = #'( Staff (any-octave . 0) )
1732 cis'4 <<c'' c'>> r2 | cis'4 <<c' c''>> r2
1733 | <<cis' c''>> r | <<c'' cis'>> r |
1736 This problem can be solved by manually inserting @code{!} and @code{?}
1737 for the problematic notes.
1739 @node Expressive marks
1740 @section Expressive marks
1748 * Analysis brackets::
1755 A slur indicates that notes are to be played bound or @emph{legato}.
1759 They are entered using parentheses:
1760 @lilypond[fragment,verbatim,center]
1761 f'( g')( a') a'8[ b'(] a'4 g'2 f'4)
1762 <<c' e'>>2( <<b d'>>2)
1766 @c TODO: should explain that ^( and _( set directions
1767 @c should set attachments with ^ and _ ?
1769 Slurs avoid crossing stems, and are generally attached to note heads.
1770 However, in some situations with beams, slurs may be attached to stem
1771 ends. If you want to override this layout you can do this through the
1772 object property @code{attachment} of @internalsref{Slur} in
1773 @internalsref{Voice} context. Its value is a pair of symbols, specifying
1774 the attachment type of the left and right end points:
1776 @lilypond[fragment,relative,verbatim]
1778 \property Voice.Stem \set #'length = #5.5
1780 \property Voice.Slur \set #'attachment = #'(stem . stem)
1784 If a slur would strike through a stem or beam, the slur will be moved
1785 away upward or downward. If this happens, attaching the slur to the
1786 stems might look better:
1788 @lilypond[fragment,relative,verbatim]
1791 \property Voice.Slur \set #'attachment = #'(stem . stem)
1798 @cindex @code{\slurUp}
1800 @cindex @code{\slurDown}
1802 @cindex @code{\slurBoth}
1804 @cindex @code{\slurDotted}
1806 @cindex @code{\slurSolid}
1811 @seeinternals{Slur}, and @internalsref{SlurEvent}.
1816 Producing nice slurs is a difficult problem, and LilyPond currently
1817 uses a simple, empiric method to produce slurs. In some cases, its
1821 @cindex Adjusting slurs
1823 @node Phrasing slurs
1824 @subsection Phrasing slurs
1826 @cindex phrasing slurs
1827 @cindex phrasing marks
1829 A phrasing slur (or phrasing mark) connects chords and is used to
1830 indicate a musical sentence. It is started using @code{\(} and @code{\)}
1833 @lilypond[fragment,verbatim,center,relative]
1834 \time 6/4 c'\( d( e) f( e) d\)
1837 Typographically, the phrasing slur behaves almost exactly like a
1838 normal slur. However, they are treated as different objects. A
1839 @code{\slurUp} will have no effect on a phrasing slur; instead, you
1840 should use @code{\phrasingSlurUp}, @code{\phrasingSlurDown}, and
1841 @code{\phrasingSlurBoth}.
1843 The commands @code{\slurUp}, @code{\slurDown}, and @code{\slurBoth}
1844 will only affect normal slurs and not phrasing slurs.
1848 @cindex @code{\phrasingSlurUp}
1849 @code{\phrasingSlurUp},
1850 @cindex @code{\phrasingSlurDown}
1851 @code{\phrasingSlurDown},
1852 @cindex @code{\phrasingSlurBoth}
1853 @code{\phrasingSlurBoth},
1857 See also @internalsref{PhrasingSlur}, and
1858 @internalsref{PhrasingSlurEvent}.
1862 Phrasing slurs have the same limitations in their formatting as normal
1863 slurs. Putting phrasing slurs over rests leads to spurious warnings.
1866 @subsection Breath marks
1868 Breath marks are entered using @code{\breathe}:
1871 @lilypond[fragment,relative,verbatim]
1875 The glyph of the breath mark can be tweaked by overriding the
1876 @code{text} property of the @code{BreathingSign} layout object with the name of
1877 any glyph of @ref{The Feta font}. For example,
1878 @lilypond[fragment,verbatim,relative]
1880 \property Voice.BreathingSign \override #'text = #"scripts-rvarcomma"
1887 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent}, and
1888 @inputfileref{input/regression,breathing-sign.ly}.
1891 @node Metronome marks
1892 @subsection Metronome marks
1895 @cindex beats per minute
1896 @cindex metronome marking
1898 Metronome settings can be entered as follows:
1900 \tempo @var{duration} = @var{perminute}
1903 In the MIDI output, they are interpreted as a tempo change, and in the
1904 paper output, a metronome marking is printed:
1905 @cindex @code{\tempo}
1906 @lilypond[fragment,verbatim]
1912 @internalsref{MetronomeChangeEvent}.
1917 @subsection Text spanners
1918 @cindex Text spanners
1920 Some performance indications, e.g. @i{rallentando} or @i{accelerando},
1921 are written as texts, and extended over many measures with dotted
1922 lines. You can create such texts using text spanners: attach
1923 @code{\startTextSpan} and @code{\stopTextSpan} to the
1924 start and ending note of the spanner.
1926 The string to be printed, as well as the style, is set through object
1929 @lilypond[fragment,relative,verbatim]
1931 \property Voice.TextSpanner \set #'direction = #-1
1932 \property Voice.TextSpanner \set #'edge-text = #'("rall " . "")
1933 c2\startTextSpan b c\stopTextSpan a }
1939 @internalsref{TextSpanEvent},
1940 @internalsref{TextSpanner}, and
1941 @inputfileref{input/regression,text-spanner.ly}.
1944 @node Analysis brackets
1945 @subsection Analysis brackets
1947 @cindex phrasing brackets
1948 @cindex musicological analysis
1949 @cindex note grouping bracket
1951 Brackets are used in musical analysis to indicate structure in musical
1952 pieces. LilyPond supports a simple form of nested horizontal brackets.
1953 To use this, add the @internalsref{Horizontal_bracket_engraver} to
1954 @internalsref{Staff} context. A bracket is started with
1955 @code{\startGroup} and closed with @code{\stopGroup}:
1957 @lilypond[singleline,verbatim]
1958 \score { \notes \relative c'' {
1959 c4\startGroup\startGroup
1962 c4\stopGroup\stopGroup
1964 \paper { \translator {
1965 \StaffContext \consists "Horizontal_bracket_engraver"
1971 @internalsref{HorizontalBracket}, @internalsref{NoteGroupingEvent}, and
1972 @inputfileref{input/regression,note-group-bracket.ly}.
1976 @section Articulations
1977 @cindex Articulations
1979 @cindex articulations
1983 A variety of symbols can appear above and below notes to indicate
1984 different characteristics of the performance. They are added to a note
1985 by adding a dash and the character signifying the
1986 articulation. They are demonstrated here:
1988 @lilypondfile[notexidoc]{script-abbreviations.ly}
1990 The meanings of these shorthands can be changed: see
1991 @file{ly/script-init.ly} for examples.
1994 The script is automatically placed, but if you need to force
1995 directions, you can use @code{_} to force them down, or @code{^} to
1997 @lilypond[fragment, verbatim]
2001 Other symbols can be added using the syntax
2002 @var{note}@code{\}@var{name}, e.g. @code{c4\fermata}. Again, they
2003 can be forced up or down using @code{^} and @code{_},
2006 @lilypond[verbatim,fragment,relative 2]
2007 c\fermata c^\fermata c_\fermata
2014 @cindex staccatissimo
2023 @cindex organ pedal marks
2032 @cindex prallmordent
2036 @cindex thumb marking
2041 @lilypondfile[notexidoc]{script-chart.ly}
2046 @cindex @code{\scriptUp}
2048 @cindex @code{\scriptDown}
2050 @cindex @code{\scriptBoth}
2055 @internalsref{ScriptEvent}, and @internalsref{Script}.
2059 All of these note ornaments appear in the printed output but have no
2060 effect on the MIDI rendering of the music.
2063 @node Fingering instructions
2064 @section Fingering instructions
2068 Fingering instructions can be entered using
2070 @var{note}-@var{digit}
2072 For finger changes, use markup texts:
2074 @lilypond[verbatim, singleline, fragment]
2075 c'4-1 c'4-2 c'4-3 c'4-4
2076 c'^\markup { \fontsize #-3 \number "2-3" }
2079 @cindex finger change
2084 You can use the thumb-script to indicate that a note should be
2085 played with your thumb (used in cello music):
2087 @lilypond[verbatim, singleline, fragment]
2088 <<a' a''-3>>8(_\thumb[ <<b' b''-3>>)_\thumb
2089 <<c'' c'''-3>>(_\thumb <<d'' d'''-3>>)_\thumb]
2092 Fingerings for chords can also be added to individual notes
2093 of the chord by adding them after the pitches:
2094 @lilypond[verbatim,singleline,fragment,relative=1]
2095 << c-1 e-2 g-3 b-5 >> 4
2098 Setting @code{fingerHorizontalDirection} will put the fingerings next
2101 @lilypond[verbatim,singleline,fragment,relative=1]
2102 \property Voice.fingerHorizontalDirection = #LEFT
2103 << c-1 es-2 g-4 bes-5 >> 4
2104 \property Voice.fingerHorizontalDirection = #RIGHT
2105 << c-1 es-2 g-4 bes-5 >> 4
2110 @internalsref{FingerEvent}, and @internalsref{Fingering}.
2121 @subsection Text scripts
2122 @cindex Text scripts
2124 It is possible to place arbitrary strings of text or markup text (see
2125 @ref{Text markup}) above or below notes by using a string:
2126 @code{c^"text"}. By default, these indications do not influence the
2127 note spacing, but by using the command @code{\fatText}, the widths
2128 will be taken into account:
2130 @lilypond[fragment,singleline,verbatim] \relative c' {
2131 c4^"longtext" \fatText c4_"longlongtext" c4 }
2134 It is possible to use @TeX{} commands in the strings, but this should
2135 be avoided because the exact dimensions of the string can then no
2141 @internalsref{TextScriptEvent}, @internalsref{TextScript}, and
2147 @subsection Grace notes
2150 @c should have blurb about accaciatura / appogiatura
2152 @cindex @code{\grace}
2156 Grace notes are ornaments that are written out, like accaciatura and
2158 @lilypond[relative=2,verbatim,fragment]
2159 c4 \grace c16 c4 \grace {
2163 From the point of view of typesetting, their characteristic is that
2164 grace notes take up take up no logical time in a measure. Internally,
2165 timing for grace notes is done using a second time. Every point in
2166 musical time consists of two rational numbers: one denotes the logical
2167 time, one denotes the grace timing. The above example is shown here
2171 \score { \notes \relative c''{
2172 c4^"(0,0)" \grace c16_" "_"(1/4,-1/16)" c4^"(1/4,0)" \grace {
2173 c16_"(2/4,-1/8)"[ d16^"(2/4,-1/16)" ] } c4_" "_"(2/4,0)"
2175 \paper { linewidth = 12.\cm }
2180 The placement of grace notes is synchronized between different staves.
2181 In the following example, there are two sixteenth graces notes for
2182 every eighth grace note:
2184 @lilypond[relative=2,verbatim,fragment]
2185 < \context Staff = SA { e4 \grace { c16[ d e f] } e4 }
2186 \context Staff = SB { c'4 \grace { g8[ b] } c4 } >
2190 Unbeamed eighth notes and shorter by default have a slash through the
2191 stem. These notes are called accaciaturas, and should generally be
2192 played as short as possible. An appogiatura takes a fixed fraction of
2193 the main note, is and denoted without a slash.
2195 Such slashless notes are obtained by setting the object property
2196 @code{stroke-style} of the @internalsref{Stem} object. For proper
2197 matching of override and reverts of such properties, it is necessary
2198 to use a Scheme function.
2200 The following fragment overrides the default formatting Grace style stems:
2202 #(add-to-grace-init "Voice" 'Stem 'stroke-style '())
2205 The @code{\override} is carefully matched with a @code{\revert}:
2210 @lilypond[fragment,verbatim]
2211 \relative c'' \context Voice {
2212 \grace c8 c4 \grace { c16[ c16] } c4
2214 \property Voice.Stem \override #'stroke-style = #'()
2216 \property Voice.Stem \revert #'stroke-style
2221 If you want to end a note with a grace note, then the standard trick
2222 is to put the grace notes before a phantom ``space note'', e.g.
2223 @lilypond[fragment,verbatim, relative=2]
2226 { s2 \grace { c16[ d] } } >
2232 By adjusting the duration of the skip note (here it is a half-note),
2233 the space between the main-note and the grace is adjusted.
2235 A @code{\grace} section has some default values, and LilyPond will
2236 use those default values unless you specify otherwise inside the
2237 @code{\grace} section. For example, if you specify \slurUp
2238 @emph{before} your @code{\grace} section, a slur which starts inside
2239 the @code{\grace} will not be forced up, even if the slur ends outside
2240 of the @code{\grace}. Note the difference between the first and
2241 second bars in this example:
2243 @lilypond[fragment,verbatim]
2244 \relative c'' \context Voice {
2262 @internalsref{GraceMusic}.
2266 Grace notes cannot be used in the smallest size (@file{paper11.ly}).
2268 A score that starts with an @code{\grace} section needs an explicit
2269 @code{\context Voice} declaration, otherwise the main note and grace
2270 note end up on different staves.
2272 Grace note synchronization can also lead to surprises. Staff notation,
2273 such as key signatures, barlines, etc. are also synchronized. Take
2274 care when you mix staves with grace notes and staves without, for example,
2276 @lilypond[relative=2,verbatim,fragment]
2277 < \context Staff = SA { e4 \bar "|:" \grace c16 d4 }
2278 \context Staff = SB { c4 \bar "|:" d4 } >
2281 Grace sections should only be used within sequential music
2282 expressions. Nesting or juxtaposing grace sections is not supported,
2283 and might produce crashes or other errors.
2285 Overriding settings for grace music globally cannot be done in a
2286 modular way. A kludge (@code{add-to-grace-init}) is defined in
2287 @file{ly/grace-init.ly}.
2291 @subsection Glissando
2294 @cindex @code{\glissando}
2296 A glissando is a smooth change in pitch. It is denoted by a line or a
2297 wavy line between two notes.
2301 A glissando line can be requested by attaching a @code{\glissando} to
2304 @lilypond[fragment,relative,verbatim]
2310 @internalsref{Glissando}, and @internalsref{GlissandoEvent}.
2315 Additional texts (such as @emph{gliss.}) is not supported.
2319 @subsection Dynamics
2332 @cindex @code{\ffff}
2342 Absolute dynamic marks are specified using an variable after a
2343 note: @code{c4-\ff}. The available dynamic marks are @code{\ppp},
2344 @code{\pp}, @code{\p}, @code{\mp}, @code{\mf}, @code{\f}, @code{\ff},
2345 @code{\fff}, @code{\fff}, @code{\fp}, @code{\sf}, @code{\sff},
2346 @code{\sp}, @code{\spp}, @code{\sfz}, and @code{\rfz}:
2348 @lilypond[verbatim,singleline,fragment,relative]
2349 c'-\ppp c-\pp c -\p c-\mp c-\mf c-\f c-\ff c-\fff
2355 @cindex @code{\decr}
2356 @cindex @code{\rced}
2363 A crescendo mark is started with @code{\<} and terminated with
2364 @code{\!}. A decrescendo is started with @code{\>} and also terminated
2365 with @code{\!}. Because these marks are bound to notes, if you must
2366 use spacer notes if multiple marks during one note are needed:
2368 @lilypond[fragment,verbatim,center,quote]
2369 c''-\< c''-\! d''-\decr e''-\rced
2370 < f''1 { s4 s4-\< s4-\! \> s4-\! } >
2372 This may give rise to very short hairpins. Use @code{minimum-length}
2373 in @internalsref{Voice}.@internalsref{Hairpin} to lengthen them, for
2377 \property Staff.Hairpin \override #'minimum-length = #5
2380 You can also use a text saying @emph{cresc.} instead of hairpins. Here
2381 is an example how to do it:
2383 @lilypond[fragment,relative=2,verbatim]
2384 c4 \cresc c4 c c c \endcresc c4
2390 You can also supply your own texts:
2391 @lilypond[fragment,relative,verbatim]
2393 \property Voice.crescendoText = \markup { \italic "cresc. poco" }
2394 \property Voice.crescendoSpanner = #'dashed-line
2404 @cindex @code{\dynamicUp}
2406 @cindex @code{\dynamicDown}
2407 @code{\dynamicDown},
2408 @cindex @code{\dynamicBoth}
2409 @code{\dynamicBoth}.
2411 @cindex direction, of dynamics
2415 @internalsref{CrescendoEvent}, @internalsref{DecrescendoEvent}, and
2416 @internalsref{AbsoluteDynamicEvent}.
2418 Dynamics are objects of @internalsref{DynamicText} and
2419 @internalsref{Hairpin}. Vertical positioning of these symbols is
2420 handled by the @internalsref{DynamicLineSpanner} object.
2422 If you want to adjust padding or vertical direction of the dynamics, you
2423 must set properties for the @internalsref{DynamicLineSpanner} object.
2431 @cindex @code{\repeat}
2434 Repetition is a central concept in music, and multiple notations exist
2435 for repetitions. In LilyPond, most of these notations can be captured
2436 in a uniform syntax. One of the advantages is, all these repetitions
2437 can be rendered in MIDI accurately.
2439 The following types of repetition are supported:
2443 Repeated music is fully written (played) out. Useful for MIDI
2444 output, and entering repetitive music.
2447 This is the normal notation: Repeats are not written out, but
2448 alternative endings (voltas) are printed, left to right.
2452 Alternative endings are written stacked. This has limited use but may be
2453 used to typeset two lines of lyrics in songs with repeats, see
2454 @inputfileref{input,star-spangled-banner.ly}.
2461 Make beat or measure repeats. These look like percent signs.
2467 * Repeats and MIDI::
2468 * Manual repeat commands::
2470 * Tremolo subdivisions::
2475 @subsection Repeat syntax
2479 LilyPond has one syntactic construct for specifying different types of
2480 repeats. The syntax is
2483 \repeat @var{variant} @var{repeatcount} @var{repeatbody}
2486 If you have alternative endings, you may add
2487 @cindex @code{\alternative}
2489 \alternative @code{@{} @var{alternative1}
2491 @var{alternative3} @dots{} @code{@}}
2493 where each @var{alternative} is a music expression. If you do not
2494 give enough alternatives for all of the repeats, then the first
2495 alternative is assumed to be played more than once.
2497 Normal notation repeats are used like this:
2498 @lilypond[fragment,verbatim]
2500 \repeat volta 2 { c'4 d' e' f' }
2501 \repeat volta 2 { f' e' d' c' }
2504 With alternative endings:
2505 @lilypond[fragment,verbatim]
2507 \repeat volta 2 {c'4 d' e' f'}
2508 \alternative { {d'2 d'} {f' f} }
2512 @lilypond[fragment,verbatim]
2516 \repeat volta 4 { e | c2 d2 | e2 f2 | }
2517 \alternative { { g4 g g } { a | a a a a | b2. } }
2524 If you do a nested repeat like
2533 then it is ambiguous to which @code{\repeat} the @code{\alternative}
2534 belongs. This ambiguity is resolved by always having the
2535 @code{\alternative} belong to the inner @code{\repeat}. For clarity,
2536 it is advisable to use braces in such situations.
2539 @node Repeats and MIDI
2540 @subsection Repeats and MIDI
2542 @cindex expanding repeats
2544 For instructions on how to unfold repeats for MIDI output, see the
2545 example file @inputfileref{input/test,unfold-all-repeats.ly}.
2550 Timing information is not remembered at the start of an alternative,
2551 so after a repeat timing information must be reset by hand, for
2552 example by setting @code{Score.measurePosition} or entering
2553 @code{\partial}. Similarly, slurs or ties are also not repeated.
2556 @node Manual repeat commands
2557 @subsection Manual repeat commands
2559 @cindex @code{repeatCommands}
2561 The property @code{repeatCommands} can be used to control the layout of
2562 repeats. Its value is a Scheme list of repeat commands, where each repeat
2566 @item the symbol @code{start-repeat},
2567 which prints a @code{|:} bar line,
2568 @item the symbol @code{end-repeat},
2569 which prints a @code{:|} bar line,
2570 @item the list @code{(volta @var{text})},
2571 which prints a volta bracket saying @var{text}: The text can be specified as
2572 a text string or as a markup text, see @ref{Text markup}. Do not
2573 forget to change the font, as the default number font does not contain
2574 alphabetic characters. Or,
2575 @item the list @code{(volta #f)}, which
2576 stops a running volta bracket:
2579 @lilypond[verbatim, fragment]
2581 \property Score.repeatCommands = #'((volta "93") end-repeat)
2583 \property Score.repeatCommands = #'((volta #f))
2590 @internalsref{VoltaBracket}, @internalsref{RepeatedMusic},
2591 @internalsref{VoltaRepeatedMusic},
2592 @internalsref{UnfoldedRepeatedMusic}, and
2593 @internalsref{FoldedRepeatedMusic}.
2595 @node Tremolo repeats
2596 @subsection Tremolo repeats
2597 @cindex tremolo beams
2599 To place tremolo marks between notes, use @code{\repeat} with tremolo
2601 @lilypond[verbatim,center,singleline]
2603 \context Voice \notes\relative c' {
2604 \repeat "tremolo" 8 { c16 d16 }
2605 \repeat "tremolo" 4 { c16 d16 }
2606 \repeat "tremolo" 2 { c16 d16 }
2607 \repeat "tremolo" 4 c16
2614 Tremolo beams are @internalsref{Beam} objects. Single stem tremolos
2615 are @internalsref{StemTremolo}s. The music expression is
2616 @internalsref{TremoloEvent}.
2621 The single stem tremolo must be entered without @code{@{} and
2624 @node Tremolo subdivisions
2625 @subsection Tremolo subdivisions
2626 @cindex tremolo marks
2627 @cindex @code{tremoloFlags}
2629 Tremolo marks can be printed on a single note by adding
2630 `@code{:}[@var{length}]' after the note. The length must be at least 8.
2631 A @var{length} value of 8 gives one line across the note stem. If the
2632 length is omitted, then then the last value (stored in
2633 @code{Voice.tremoloFlags}) is used:
2635 @lilypond[verbatim,fragment,center]
2636 c'2:8 c':32 | c': c': |
2639 @c [TODO : stok is te kort bij 32en]
2643 Tremolos in this style do not carry over into the MIDI output.
2646 @node Measure repeats
2647 @subsection Measure repeats
2649 @cindex percent repeats
2650 @cindex measure repeats
2652 In the @code{percent} style, a note pattern can be repeated. It is
2653 printed once, and then the pattern is replaced with a special sign.
2654 Patterns of a one and two measures are replaced by percent-like signs,
2655 patterns that divide the measure length are replaced by slashes:
2657 @lilypond[verbatim,singleline]
2658 \context Voice { \repeat "percent" 4 { c'4 }
2659 \repeat "percent" 2 { c'2 es'2 f'4 fis'4 g'4 c''4 }
2665 @internalsref{RepeatSlash}, @internalsref{PercentRepeat},
2666 @internalsref{PercentRepeatedMusic}, and
2667 @internalsref{DoublePercentRepeat}.
2671 @node Rhythmic music
2672 @section Rhythmic music
2674 Sometimes you might want to show only the rhythm of a melody. This
2675 can be done with the rhythmic staff. All pitches of notes on such a
2676 staff are squashed, and the staff itself has a single line:
2678 @lilypond[fragment,relative,verbatim]
2679 \context RhythmicStaff {
2681 c4 e8 f g2 | r4 g r2 | g1:32 | r1 |
2686 * Percussion staves::
2687 * Percussion MIDI output::
2690 @node Percussion staves
2691 @subsection Percussion staves
2695 A percussion part for more than one instrument typically uses a
2696 multiline staff where each position in the staff refers to one piece
2701 Percussion staves are typeset with help of a set of Scheme
2702 functions. The system is based on the general MIDI drum-pitches.
2703 Include @file{drumpitch-init.ly} to use drum pitches. This file
2704 defines the pitches from the Scheme variable @code{drum-pitch-names},
2705 the definition of which can be read in @file{scm/drums.scm}. Each
2706 piece of percussion has a full name and an abbreviated name, and either
2707 the full name or the abbreviation may be used in input files.
2709 To typeset the music on a staff apply the function @code{drums->paper}
2710 to the percussion music. This function takes a list of percussion
2711 instrument names, notehead scripts and staff positions (that is:
2712 pitches relative to the C-clef) and transforms the input
2713 music by moving the pitch, changing the notehead and (optionally)
2716 @lilypond[singleline,verbatim,quote]
2717 \include "drumpitch-init.ly"
2718 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2719 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2721 \apply #(drums->paper 'drums) \context Staff <
2723 \context Voice = up { \voiceOne \up }
2724 \context Voice = down { \voiceTwo \down }
2729 In the above example the music was transformed using the list @code{'drums}.
2730 Currently the following lists are defined in @file{scm/drums.scm}:
2733 to typeset a typical drum kit on a five-line staff:
2736 \include "drumpitch-init.ly"
2737 nam = \lyrics { cymc cyms cymr hh hhc hho hhho hhp cb hc
2738 bd sn ss tomh tommh tomml toml tomfh tomfl }
2739 mus = \notes { cymc cyms cymr hh hhc hho hhho hhp cb hc
2740 bd sn ss tomh tommh tomml toml tomfh tomfl s16 }
2743 \apply #(drums->paper 'drums) \context Staff <
2747 \context Lyrics \nam
2750 linewidth = 100.0\mm
2753 \remove Bar_engraver
2754 \remove Time_signature_engraver
2755 minimumVerticalExtent = #'(-4.0 . 5.0)
2759 \remove Stem_engraver
2765 The drum scheme supports six different toms. When there fewer toms, simply
2766 select the toms that produce the desired result, i.e. to get toms on
2767 the three middle lines you use @code{tommh}, @code{tomml} and
2770 Because general MIDI does not contain rimshots the sidestick is used
2771 for this purpose instead.
2773 to typeset timbales on a two line staff:
2775 @lilypond[singleline]
2776 \include "drumpitch-init.ly"
2777 nam = \lyrics { timh ssh timl ssl cb }
2778 mus = \notes { timh ssh timl ssl cb s16 }
2781 \apply #(drums->paper 'timbales) \context Staff <
2785 \context Lyrics \nam
2790 \remove Bar_engraver
2791 \remove Time_signature_engraver
2792 StaffSymbol \override #'line-count = #2
2793 StaffSymbol \override #'staff-space = #2
2794 minimumVerticalExtent = #'(-3.0 . 4.0)
2798 \remove Stem_engraver
2805 to typeset congas on a two line staff:
2807 @lilypond[singleline]
2808 \include "drumpitch-init.ly"
2809 nam = \lyrics { cgh cgho cghm ssh cgl cglo cglm ssl }
2810 mus = \notes { cgh cgho cghm ssh cgl cglo cglm ssl s16 }
2813 \apply #(drums->paper 'congas) \context Staff <
2817 \context Lyrics \nam
2822 \remove Bar_engraver
2823 \remove Time_signature_engraver
2824 StaffSymbol \override #'line-count = #2
2825 StaffSymbol \override #'staff-space = #2
2826 minimumVerticalExtent = #'(-3.0 . 4.0)
2830 \remove Stem_engraver
2836 to typeset bongos on a two line staff:
2838 @lilypond[singleline]
2839 \include "drumpitch-init.ly"
2840 nam = \lyrics { boh boho bohm ssh bol bolo bolm ssl }
2841 mus = \notes { boh boho bohm ssh bol bolo bolm ssl s16 }
2844 \apply #(drums->paper 'bongos) \context Staff <
2848 \context Lyrics \nam
2853 \remove Bar_engraver
2854 \remove Time_signature_engraver
2855 StaffSymbol \override #'line-count = #2
2856 StaffSymbol \override #'staff-space = #2
2857 minimumVerticalExtent = #'(-3.0 . 4.0)
2861 \remove Stem_engraver
2867 to typeset all kinds of simple percussion on one line staves:
2868 @lilypond[singleline]
2869 \include "drumpitch-init.ly"
2870 nam = \lyrics { tri trio trim gui guis guil cb cl tamb cab mar hc }
2871 mus = \notes { tri trio trim gui guis guil cb cl tamb cab mar hc s16 }
2874 \apply #(drums->paper 'percussion) \context Staff <
2878 \context Lyrics \nam
2883 \remove Bar_engraver
2884 \remove Time_signature_engraver
2885 StaffSymbol \override #'line-count = #1
2886 minimumVerticalExtent = #'(-2.0 . 3.0)
2890 \remove Stem_engraver
2897 If you do not like any of the predefined lists you can define your own
2898 list at the top of your file:
2900 @lilypond[singleline, verbatim]
2901 #(set-drum-kit 'mydrums `(
2902 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2903 (snare default #f ,(ly:make-pitch 0 1 0))
2904 (hihat cross #f ,(ly:make-pitch 0 5 0))
2905 (pedalhihat xcircle "stopped" ,(ly:make-pitch 0 5 0))
2906 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2908 \include "drumpitch-init.ly"
2909 up = \notes { hh8 hh hh hh hhp4 hhp }
2910 down = \notes { bd4 sn bd toml8 toml }
2912 \apply #(drums->paper 'mydrums) \context Staff <
2914 \context Voice = up { \voiceOne \up }
2915 \context Voice = down { \voiceTwo \down }
2920 To use a modified existing list, one can prepend modifications to the
2924 #(set-drum-kit 'mydrums (append `(
2925 (bassdrum default #f ,(ly:make-pitch -1 2 0))
2926 (lowtom diamond #f ,(ly:make-pitch -1 6 0))
2927 ) (get-drum-kit 'drums)))
2930 You can easily combine percussion notation with pitched notation.
2931 Indeed, the file @file{drumpitch-init.ly} replaces the normal pitch
2932 names, so you will have to reinclude @file{nederlands.ly} after the
2933 drum-pattern-definitions to enter normal notes:
2935 @lilypond[singleline,verbatim]
2936 \include "drumpitch-init.ly"
2937 up = \notes { crashcymbal4 hihat8 halfopenhihat hh hh hh openhihat }
2938 down = \notes { bassdrum4 snare8 bd r bd sn4 }
2939 \include "nederlands.ly"
2940 bass = \notes \transpose c c,, { a4. e8 r e g e }
2943 \apply #(drums->paper 'drums) \context Staff = drums <
2945 \context Voice = up { \voiceOne \up }
2946 \context Voice = down { \voiceTwo \down }
2948 \context Staff = bass { \clef "F_8" \bass }
2953 @node Percussion MIDI output
2954 @subsection Percussion MIDI output
2956 In order to produce correct MIDI output you need to produce two score
2957 blocks---one for the paper and one for the MIDI output. To use the
2958 percussion channel you set the property @code{instrument} to
2959 @code{'drums}. Because the drum-pitches themselves are similar to the
2960 general MIDI pitches all you have to do is to insert the voices with
2961 none of the scheme functions to get the correct MIDI output:
2965 \apply #(drums->paper 'mydrums) \context Staff <
2974 \property Staff.instrument = #'drums
2983 This scheme is a temporary implementation.
2987 @section Piano music
2989 Piano staves are two normal staves coupled with a brace. The staves
2990 are largely independent, but sometimes voices can cross between the
2991 two staves. The same notation is also used for harps and other key
2992 instruments. The @internalsref{PianoStaff} is especially built to
2993 handle this cross-staffing behavior. In this section we discuss the
2994 @internalsref{PianoStaff} and some other pianistic peculiarities.
2998 * Automatic staff changes::
2999 * Manual staff switches::
3002 * Staff switch lines::
3007 There is no support for putting chords across staves. You can get
3008 this result by increasing the length of the stem in the lower stave so
3009 it reaches the stem in the upper stave, or vice versa. An example is
3010 included with the distribution as @inputfileref{input/test,stem-cross-staff.ly}.
3012 Dynamics are not centered, but kludges do exist. See
3013 @inputfileref{input/template,piano-dynamics.ly}.
3015 @cindex cross staff stem
3016 @cindex stem, cross staff
3019 @c fixme: should have hyperlinks as well.
3025 @node Automatic staff changes
3026 @subsection Automatic staff changes
3027 @cindex Automatic staff changes
3029 Voices can switch automatically between the top and the bottom
3030 staff. The syntax for this is
3032 \autochange Staff \context Voice @{ @dots{}@var{music}@dots{} @}
3034 The autochanger switches on basis of pitch (central C is the turning
3035 point), and it looks ahead skipping over rests to switch in
3036 advance. Here is a practical example:
3038 @lilypond[verbatim,singleline,quote]
3039 \score { \notes \context PianoStaff <
3040 \context Staff = "up" {
3041 \autochange Staff \context Voice = VA < \relative c' {
3042 g4 a b c d r4 a g } > }
3043 \context Staff = "down" {
3050 In this example, spacer rests are used to prevent the bottom staff from
3051 terminating too soon.
3056 @internalsref{AutoChangeMusic}.
3060 The staff switches often do not end up in optimal places. For high
3061 quality output staff switches should be specified manually.
3065 @node Manual staff switches
3066 @subsection Manual staff switches
3068 @cindex manual staff switches
3069 @cindex staff switch, manual
3071 Voices can be switched between staves manually, using the following command:
3073 \translator Staff = @var{staffname} @var{music}
3077 The string @var{staffname} is the name of the staff. It switches the
3078 current voice from its current staff to the Staff called
3079 @var{staffname}. Typically @var{staffname} is @code{"up"} or
3087 Pianos have pedals that alter the way sound are produced. Generally, a
3088 piano has three pedals, sustain, una corda, and sostenuto.
3092 Piano pedal instruction can be expressed by attaching
3093 @code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
3094 @code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp} to a
3097 @lilypond[fragment,verbatim]
3098 c'4-\sustainDown c'4-\sustainUp
3101 What is printed can be modified by setting @code{pedal@var{X}Strings},
3102 where @var{X} is one of the pedal types: @code{Sustain},
3103 @code{Sostenuto} or @code{UnaCorda}. Refer to the generated
3104 documentation of @internalsref{SustainPedal} for more information.
3106 Pedals can also be indicated by a sequence of brackets, by setting the
3107 @code{pedalSustainStyle} property to @code{bracket} objects:
3109 @lilypond[fragment,verbatim]
3110 \property Staff.pedalSustainStyle = #'bracket
3111 c''4-\sustainDown d''4 e''4
3112 a'4-\sustainUp-\sustainDown
3113 f'4 g'4 a'4-\sustainUp
3116 A third style of pedal notation is a mixture of text and brackets,
3117 obtained by setting @code{pedal-type} to @code{mixed}:
3119 @lilypond[fragment,verbatim]
3120 \property Staff.pedalSustainStyle = #'mixed
3121 c''4-\sustainDown d''4 e''4
3122 c'4-\sustainUp-\sustainDown
3123 f'4 g'4 a'4-\sustainUp
3126 The default `*Ped' style for sustain and damper pedals corresponds to
3127 @code{\pedal-type = #'text}. However, @code{mixed} is the default style
3128 for a sostenuto pedal:
3130 @lilypond[fragment,verbatim]
3131 c''4-\sostenutoDown d''4 e''4 c'4 f'4 g'4 a'4-\sostenutoUp
3134 For fine-tuning of the appearance of a pedal bracket, the properties
3135 @code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
3136 @code{PianoPedalBracket} objects (, see the detailed documentation of
3137 @internalsref{PianoPedalBracket},) can be modified. For example, the bracket
3138 may be extended to the end of the note head:
3140 @lilypond[fragment,verbatim]
3141 \property Staff.PianoPedalBracket \override
3142 #'shorten-pair = #'(0 . -1.0)
3143 c''4-\sostenutoDown d''4 e''4 c'4
3144 f'4 g'4 a'4-\sostenutoUp
3148 @subsection Arpeggio
3151 @cindex broken arpeggio
3152 @cindex @code{\arpeggio}
3154 You can specify an arpeggio sign on a chord by attaching an
3155 @code{\arpeggio} to a chord:
3158 @lilypond[fragment,relative,verbatim]
3159 <<c e g c>>-\arpeggio
3162 When an arpeggio crosses staves, you attach an arpeggio to the chords
3163 in both staves, and set
3164 @internalsref{PianoStaff}.@code{connectArpeggios}:
3166 @lilypond[fragment,relative,verbatim]
3167 \context PianoStaff <
3168 \property PianoStaff.connectArpeggios = ##t
3169 \context Voice = one { <<c' e g c>>-\arpeggio }
3170 \context Voice = other { \clef bass <<c,, e g>>-\arpeggio }
3174 The direction of the arpeggio is sometimes denoted by adding an
3175 arrowhead to the wiggly line. This can be typeset by setting
3176 @code{arpeggio-direction}:
3178 @lilypond[fragment,relative,verbatim]
3180 \property Voice.Arpeggio \set #'arpeggio-direction = #1
3181 <<c e g c>>-\arpeggio
3182 \property Voice.Arpeggio \set #'arpeggio-direction = #-1
3183 <<c e g c>>-\arpeggio
3187 A square bracket on the left indicates that the player should not
3188 arpeggiate the chord. To draw these brackets, set the
3189 @code{molecule-callback} property of @code{Arpeggio} or
3190 @code{PianoStaff.Arpeggio} objects to @code{\arpeggioBracket}, and use
3191 @code{\arpeggio} statements within the chords as before:
3193 @lilypond[fragment,relative,verbatim]
3194 \property PianoStaff.Arpeggio \override
3195 #'molecule-callback = \arpeggioBracket
3196 <<c' e g c>>-\arpeggio
3201 @cindex @code{\arpeggioBracket}
3202 @code{\arpeggioBracket},
3203 @cindex @code{\arpeggio}
3208 @internalsref{ArpeggioEvent} expression lead to
3209 @internalsref{Arpeggio} objects. Cross staff arpeggios are
3210 @internalsref{PianoStaff}.@internalsref{Arpeggio}.
3214 It is not possible to mix connected arpeggios and unconnected
3215 arpeggios in one @internalsref{PianoStaff} at the same time.
3217 @node Staff switch lines
3218 @subsection Staff switch lines
3221 @cindex follow voice
3222 @cindex staff switching
3225 @cindex @code{followVoice}
3227 Whenever a voice switches to another staff a line connecting the notes
3228 can be printed automatically. This is enabled if the property
3229 @code{PianoStaff.followVoice} is set to true:
3231 @lilypond[fragment,relative,verbatim]
3232 \context PianoStaff <
3233 \property PianoStaff.followVoice = ##t
3234 \context Staff \context Voice {
3236 \translator Staff=two
3239 \context Staff=two { \clef bass \skip 1*2 }
3243 The associated object is @internalsref{VoiceFollower}.
3247 @cindex @code{\showStaffSwitch}
3248 @code{\showStaffSwitch},
3249 @cindex @code{\hideStaffSwitch}
3250 @code{\hideStaffSwitch}.
3254 @section Vocal music
3256 This section discusses how to enter and print lyrics.
3260 * The Lyrics context::
3265 @node Entering lyrics
3266 @subsection Entering lyrics
3270 @cindex @code{\lyrics}
3273 Lyrics are entered in a special input mode. This mode is is introduced
3274 by the keyword @code{\lyrics}. In this mode you can enter lyrics, with
3275 punctuation and accents without any hassle. Syllables are entered like
3276 notes, but with pitches replaced by text. For example,
3278 \lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
3281 A word in Lyrics mode begins with: an alphabetic character, @code{_},
3282 @code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
3283 through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
3284 any 8-bit character with ASCII code over 127, or a two-character
3285 combination of a backslash followed by one of @code{`}, @code{'},
3286 @code{"}, or @code{^}.
3288 Subsequent characters of a word can be any character that is not a digit
3289 and not white space. One important consequence of this is that a word
3290 can end with @code{@}}. The following example is usually a bug. The
3291 syllable includes a @code{@}}, and hence the opening brace is not balanced:
3293 \lyrics @{ twinkle@}
3296 @cindex @code{\property}, in @code{\lyrics}
3297 Similarly, a period following a alphabetic sequence, is included in the
3298 resulting string. As a consequence, spaces must be inserted around
3299 @code{\property} commands:
3301 \property Lyrics . LyricText \set #'font-shape = #'italic
3305 @cindex spaces, in lyrics
3306 @cindex quotes, in lyrics
3308 Any @code{_} character which appears in an unquoted word is converted
3309 to a space. This provides a mechanism for introducing spaces into words
3310 without using quotes. Quoted words can also be used in Lyrics mode to
3311 specify words that cannot be written with the above rules:
3314 \lyrics @{ He said: "\"Let" my peo ple "go\"" @}
3318 Hyphens can be entered as ordinary hyphens at the end of a syllable, i.e.
3323 These will be attached to the end of the first syllable.
3325 Centered hyphens are entered using the special `@code{-}@code{-}' lyric
3326 as a separate word between syllables. The hyphen will have variable
3327 length depending on the space between the syllables and it will be
3328 centered between the syllables.
3333 When a lyric is sung over many notes (this is called a melisma), this is
3334 indicated with a horizontal line centered between a syllable and the
3335 next one. Such a line is called an extender line, and it is entered as
3340 @internalsref{LyricEvent}, @internalsref{HyphenEvent}, and
3341 @internalsref{ExtenderEvent}.
3345 The definition of lyrics mode is too complex.
3347 @node The Lyrics context
3348 @subsection The Lyrics context
3350 Lyrics are printed by interpreting them in @internalsref{Lyrics} context:
3352 \context Lyrics \lyrics @dots{}
3355 @cindex automatic syllable durations
3356 @cindex @code{\addlyrics}
3357 @cindex lyrics and melodies
3359 This will place the lyrics according to the durations that were
3360 entered. The lyrics can also be aligned under a given melody
3361 automatically. In this case, it is no longer necessary to enter the
3362 correct duration for each syllable. This is achieved by combining the
3363 melody and the lyrics with the @code{\addlyrics} expression:
3367 \context Lyrics @dots{}
3370 @cindex staff order, with @code{\addlyrics}
3372 Normally, this will put the lyrics below the staff. For different or
3373 more complex orderings, the best way is to setup the hierarchy of
3374 staves and lyrics first, e.g.
3376 \context ChoirStaff \notes <
3377 \context Lyrics = LA @{ s1 @}
3378 \context Staff = SA @{ s1 @}
3379 \context Lyrics = LB @{ s1 @}
3380 \context Staff = SB @{ s1 @}
3383 and then combine the appropriate melodies and lyric lines:
3386 \context Staff = SA @emph{the music}
3387 \context Lyrics = LA @emph{the lyrics}
3390 putting both together, you would get
3392 \context ChoirStaff \notes <
3393 \context Lyrics = LA @dots{}
3394 \context Staff = SB @dots{}
3400 @cindex choral score
3402 A complete example of a SATB score setup is in the file
3403 @inputfileref{input/template,satb.ly}.
3407 @internalsref{LyricCombineMusic}, @internalsref{Lyrics}, and
3408 @inputfileref{input/template,satb.ly}.
3412 @code{\addlyrics} is not automatic enough: melismata are not detected
3413 automatically, and melismata are not stopped when they hit a rest. A
3414 melisma on the last note in a melody is not printed.
3418 @subsection More stanzas
3421 @cindex phrasing, in lyrics
3423 When multiple stanzas are printed underneath each other, the vertical
3424 groups of syllables should be aligned around punctuation. This can be
3425 done automatically when corresponding lyric lines and melodies are
3428 To this end, give the @internalsref{Voice} context an identity:
3430 \context Voice = duet @{
3435 Then set the @internalsref{LyricsVoice} contexts to names starting with
3436 that identity followed by a dash. In the preceding example, the
3437 @internalsref{Voice} identity is @code{duet}, so the identities of the
3438 @internalsref{LyricsVoice}s are marked @code{duet-1} and @code{duet-2}:
3440 \context LyricsVoice = "duet-1" @{
3441 Hi, my name is bert. @}
3442 \context LyricsVoice = "duet-2" @{
3443 Ooooo, ch\'e -- ri, je t'aime. @}
3445 The convention for naming @internalsref{LyricsVoice} and
3446 @internalsref{Voice} must also be used to get melismata correct in
3447 conjunction with rests.
3449 The complete example is shown here:
3450 @lilypond[singleline,verbatim]
3453 \notes \relative c'' \context Voice = duet { \time 3/4
3455 \lyrics \context Lyrics <
3456 \context LyricsVoice = "duet-1" {
3457 \property LyricsVoice . stanza = "Bert"
3458 Hi, my name is bert. }
3459 \context LyricsVoice = "duet-2" {
3460 \property LyricsVoice . stanza = "Ernie"
3461 Ooooo, ch\'e -- ri, je t'aime. }
3466 Stanza numbers, or the names of the singers can be added by setting
3467 @code{LyricsVoice.Stanza} (for the first system) and
3468 @code{LyricsVoice.stz} for the following systems. Notice how dots are
3469 surrounded with spaces in @code{\lyrics} mode:
3472 \property LyricsVoice . stanza = "Bert"
3474 \property LyricsVoice . stanza = "Ernie"
3477 To make empty spaces in lyrics, use @code{\skip}.
3485 Input for lyrics introduces a syntactical ambiguity:
3492 is interpreted as assigning a string identifier @code{\foo} such that
3493 it contains @code{"bar"}. However, it could also be interpreted as
3494 making or a music identifier @code{\foo} containing the syllable
3495 `bar'. The force the latter interpretation, use
3505 The term @emph{ambitus} denotes a range of pitches for a given voice in
3506 a part of music. It also may denote the pitch range that a musical
3507 instrument is capable of playing. Most musical instruments have their
3508 ambitus standardized (or at least there is agreement upon the minimal
3509 ambitus of a particular type of instrument), such that a composer or
3510 arranger of a piece of music can easily meet the ambitus constraints of
3511 the targeted instrument. However, the ambitus of the human voice
3512 depends on individual physiological state, including education and
3513 training of the voice. Therefore, a singer potentially has to check for
3514 each piece of music if the ambitus of that piece meets his individual
3515 capabilities. This is why the ambitus of a piece may be of particular
3516 value to vocal performers.
3518 The ambitus is typically notated on a per-voice basis at the very
3519 beginning of a piece, e.g. nearby the initial clef or time signature of
3520 each staff. The range is graphically specified by two noteheads, that
3521 represent the minimum and maximum pitch. Some publishers use a textual
3522 notation: they put the range in words in front of the corresponding
3523 staff. LilyPond currently only supports the graphical ambitus notation.
3525 To apply, add the @internalsref{Ambitus_engraver} to the
3526 @internalsref{Voice} context, i.e.
3529 \paper @{ \translator @{
3531 \consists Ambitus_engraver
3537 @lilypond[singleline]
3538 upper = \notes \relative c {
3541 as'' c e2 bes f cis d4 e f2 g
3543 lower = \notes \relative c {
3546 e'4 b g a c es fis a cis b a g f e d2
3549 \context ChoirStaff {
3551 \context Staff = one { \upper }
3552 \context Staff = three { \lower }
3558 \consists Ambitus_engraver
3567 @internalsref{Ambitus}, and @inputfileref{input/regression,ambitus.ly}.
3572 Tablature notation is used for notating music for plucked string
3573 instruments. It notates pitches not by using note heads, but by
3574 indicating on which string and fret a note must be played. LilyPond
3575 offers limited support for tablature.
3578 * Tablatures basic::
3579 * Non-guitar tablatures::
3582 @node Tablatures basic
3583 @subsection Tablatures basic
3584 @cindex Tablatures basic
3586 The string number associated to a note is given as a backslash
3587 followed by a number, e.g. @code{c4\3} for a C quarter on the third
3588 string. By default, string 1 is the highest one, and the tuning
3589 defaults to the standard guitar tuning (with 6 strings). The notes
3590 are printed as tablature, by using @internalsref{TabStaff} and
3591 @internalsref{TabVoice} contexts:
3593 @lilypond[fragment,verbatim]
3594 \notes \context TabStaff {
3600 When no string is specified, the first string that does not give a
3601 fret number less than @code{minimumFret} is selected. The default
3602 value for @code{minimumFret} is 0:
3606 e8 fis gis a b cis' dis' e'
3607 \property TabStaff.minimumFret = #8
3608 e8 fis gis a b cis' dis' e'
3613 e8 fis gis a b cis' dis' e'
3614 \property TabStaff.minimumFret = #8
3615 e8 fis gis a b cis' dis' e'
3618 \context StaffGroup <
3619 \context Staff { \clef "G_8" \frag }
3620 \context TabStaff { \frag }
3627 @internalsref{TabStaff}, @internalsref{TabVoice}, and
3628 @internalsref{StringNumberEvent}.
3632 Chords are not handled in a special way, and hence the automatic
3633 string selector may easily select the same string to two notes in a
3637 @node Non-guitar tablatures
3638 @subsection Non-guitar tablatures
3639 @cindex Non-guitar tablatures
3641 You can change the number of strings, by setting the number of lines
3642 in the @internalsref{TabStaff} (the @code{line-count} property of
3643 @internalsref{TabStaff} can only be changed using
3644 @code{\outputproperty}, for more information, see @ref{Tuning
3647 You can change the tuning of the strings. A string tuning is given as
3648 a Scheme list with one integer number for each string, the number
3649 being the pitch (measured in semitones relative to central C) of an
3650 open string. The numbers specified for @code{stringTuning} are the
3651 numbers of semitones to subtract or add, starting the specified pitch
3652 by default middle C, in string order. Thus, the notes are e, a, d, and
3655 @lilypond[fragment,verbatim]
3658 \outputproperty #(make-type-checker 'staff-symbol-interface)
3660 \property TabStaff.stringTunings = #'(-5 -10 -15 -20)
3663 a,4 c' a e' e c' a e'
3668 It is possible to change the Scheme function to format the tablature
3669 note text. The default is @code{fret-number-tablature-format}, which
3670 uses the fret number. For instruments that do not use this notation,
3671 you can create a special tablature formatting function. This function
3672 takes three argument: string number, string tuning and note pitch.
3676 Most of the guitar special effects such as bend have not been
3682 @section Chord names
3685 LilyPond has support for both printing chord names. Chords may be
3686 entered in musical chord notation, i.e. @code{<< .. >>}, but they can
3687 also be entered by name. Internally, the chords are represented as a
3688 set of pitches, so they can be transposed:
3691 @lilypond[verbatim,singleline]
3692 twoWays = \notes \transpose c c' {
3702 < \context ChordNames \twoWays
3703 \context Voice \twoWays > }
3706 This example also shows that the chord printing routines do not try to
3707 be intelligent. The last chord (@code{f bes d}) is not interpreted as
3713 * Printing chord names::
3718 @subsection Chords mode
3721 Chord mode is a mode where you can input sets of pitches using common
3722 names. It is introduced by the keyword @code{\chords}.
3723 In chords mode, a chord is entered by the root, which is entered
3724 like a common pitch:
3725 @lilypond[fragment,verbatim,quote, relative=1]
3726 \chords { es4. d8 c2 }
3731 Other chords may be entered by suffixing a colon, and introducing a
3732 modifier, and optionally, a number:
3734 @lilypond[fragment,verbatim,quote]
3735 \chords { e1:m e1:7 e1:m7 }
3737 The first number following the root is taken to be the `type' of the
3738 chord, thirds are added to the root until it reaches the specified
3740 @lilypond[fragment,verbatim]
3741 \chords { c:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
3744 @cindex root of chord
3745 @cindex additions, in chords
3746 @cindex removals, in chords
3748 More complex chords may also be constructed adding separate steps
3749 to a chord. Additions are added after the number following
3750 the colon, and are separated by dots:
3752 @lilypond[verbatim,fragment,quote]
3753 \chords { c:5.6 c:3.7.8 c:3.6.13 }
3755 Chord steps can be altered by suffixing a @code{-} or @code{+} sign
3757 @lilypond[verbatim,fragment,quote]
3758 \chords { c:7+ c:5+.3- c:3-.5-.7- }
3760 Removals are specified similarly, and are introduced by a caret. They
3761 must come after the additions:
3762 @lilypond[verbatim,fragment]
3763 \chords { c^3 c:7^5 c:9^3.5 }
3766 Modifiers can be used to change pitches. The following modifiers are
3770 is the minor chord. This modifier lowers the 3rd and (if present) the 7th step.
3772 is the diminished chord. This modifier lowers the 3rd, 5th and (if present)
3775 is the augmented chord. This modifier raises the 5th step.
3777 is the major 7th chord. This modifier raises the 7th step if present.
3779 is the suspended 4th or 2nd. This modifier removes the 3rd
3780 step. Append either @code{2} or @code{4} to add the 2nd or 4th step to
3783 Modifiers can be mixed with additions:
3784 @lilypond[verbatim,fragment]
3785 \chords { c:sus4 c:7sus4 c:dim7 c:m6 }
3788 @cindex modifiers, in chords.
3795 Since an unaltered 11 does not sound good when combined with an
3796 unaltered 13, the 11 is removed in this case (, unless it is added
3798 @lilypond[fragment,verbatim]
3799 \chords { c:13 c:13.11 c:m13 }
3804 An inversion (putting one pitch of the chord on the bottom), as well
3805 as bass notes, can be specified by appending
3806 @code{/}@var{pitch} to the chord:
3807 @lilypond[fragment,verbatim,center]
3808 \chords { c1 c/g c/f }
3812 A bass note can be added instead of transposed out of the chord,
3813 by using @code{/+}@var{pitch}.
3815 @lilypond[fragment,verbatim,center]
3816 \chords { c1 c/+g c/+f }
3819 Chords is a mode similar to @code{\lyrics}, @code{\notes} etc. Most
3820 of the commands continue to work, for example, @code{r} and
3821 @code{\skip} can be used to insert rests and spaces, and
3822 @code{\property} may be used to change various settings.
3828 Each step can only be present in a chord once. The following
3829 simply produces the augmented chord, since @code{5+} is interpreted
3832 @lilypond[verbatim,fragment]
3833 \chords { c:5.5-.5+ }
3837 @node Printing chord names
3838 @subsection Printing chord names
3840 @cindex printing chord names
3844 For displaying printed chord names, use the @internalsref{ChordNames} context.
3845 The chords may be entered either using the notation
3846 described above, or directly using @code{<<} and @code{>>}:
3848 @lilypond[verbatim,singleline]
3850 \chords {a1 b c} <<d' f' a'>> <<e' g' b'>>
3854 \context ChordNames \scheme
3855 \context Staff \scheme
3860 You can make the chord changes stand out by setting
3861 @internalsref{ChordNames}.@code{chordChanges} to true. This will only
3862 display chord names when there is a change in the chords scheme and at
3863 the start of a new line:
3865 @lilypond[verbatim, linewidth=9cm]
3867 c1:m c:m \break c:m c:m d
3871 \context ChordNames {
3872 \property ChordNames.chordChanges = ##t
3874 \context Staff \transpose c c' \scheme
3879 The default chord name layout is a system for Jazz music, proposed by
3880 Klaus Ignatzek (see @ref{Literature}). It can be tuned through the
3881 following properties:
3884 @cindex chordNameExceptions
3885 @item chordNameExceptions
3886 This is a list that contains the chords that have special formatting.
3888 @inputfileref{input/regression,chord-name-exceptions.ly}.
3889 @cindex exceptions, chord names.
3892 @cindex majorSevenSymbol
3893 @item majorSevenSymbol
3894 This property contains the markup object used for the 7th step, when
3895 it is major. Predefined options are @code{whiteTriangleMarkup} and
3896 @code{blackTriangleMarkup}. See
3897 @inputfileref{input/regression,chord-name-major7.ly} for an example.
3899 @cindex chordNameSeparator
3900 @item chordNameSeparator
3901 Different parts of a chord name are normally separated by a
3902 slash. By setting @code{chordNameSeparator}, you can specify other
3904 @lilypond[fragment,verbatim]
3905 \context ChordNames \chords {
3907 \property ChordNames.chordNameSeparator
3908 = \markup { \typewriter "|" }
3912 @cindex chordRootNamer
3913 @item chordRootNamer
3914 The root of a chord is usually printed as a letter with an optional
3915 alteration. The transformation from pitch to letter is done by this
3916 function. Special note names (for example, the German ``H'' for a
3917 B-chord) can be produced by storing a new function in this property.
3919 @cindex chordNoteNamer
3920 @item chordNoteNamer
3921 The default is to print single pitch, e.g. the bass note, using the
3922 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
3923 to a specialized function to change this behavior. For example, the
3924 base can be printed in lower case.
3929 There are also two other chord name schemes implemented: an alternate
3930 Jazz chord notation, and a systematic scheme called Banter chords. The
3931 alternate jazz notation is also shown on the chart in @ref{Chord name
3932 chart}. Turning on these styles is described in the input file
3933 @inputfileref{input/test/,chord-names-jazz.ly}.
3937 @cindex chords, jazz
3942 @cindex @code{\germanChords}
3943 @code{\germanChords},
3944 @cindex @code{\semiGermanChords}
3945 @code{\semiGermanChords}.
3952 @inputfileref{input/regression,chord-name-major7.ly},
3953 @inputfileref{input/regression,chord-name-exceptions.ly},
3954 @inputfileref{input/test,chord-names-jazz.ly},
3955 @inputfileref{input/test,chord-names-german.ly},
3956 @file{scm/chords-ignatzek.scm}, and @file{scm/chord-entry.scm}.
3961 Chord names are determined solely from the list of pitches. Chord
3962 inversions are not identified, and neither are added bass notes. This
3963 may result in strange chord names when chords are entered with the
3964 @code{<< .. >>} syntax.
3969 @node Orchestral music
3970 @section Orchestral music
3972 @cindex Writing parts
3974 Orchestral music involves some special notation, both in the full
3975 score and the individual parts. This section explains how to tackle
3976 some common problems in orchestral music.
3981 * Multiple staff contexts::
3984 * Instrument names::
3986 * Multi measure rests::
3987 * Automatic part combining::
3989 * Sound output for transposing instruments::
3992 @node Multiple staff contexts
3993 @subsection Multiple staff contexts
3995 Polyphonic scores consist of many staves. These staves can be
3996 constructed in three different ways:
3998 @item The group is started with a brace at the left. This is done with the
3999 @internalsref{GrandStaff} context.
4000 @item The group is started with a bracket. This is done with the
4001 @internalsref{StaffGroup} context
4002 @item The group is started with a vertical line. This is the default
4006 @cindex Staff, multiple
4007 @cindex bracket, vertical
4008 @cindex brace, vertical
4015 @node Rehearsal marks
4016 @subsection Rehearsal marks
4017 @cindex Rehearsal marks
4019 @cindex @code{\mark}
4021 To print a rehearsal mark, use the @code{\mark} command:
4022 @lilypond[fragment,verbatim]
4032 The mark is incremented automatically if you use @code{\mark
4033 \default}. The value to use is stored in the property
4034 @code{rehearsalMark} is used and automatically incremented.
4036 The @code{\mark} command can also be used to put signs like coda,
4037 segno and fermatas on a barline. Use @code{\markup} to
4038 to access the appropriate symbol:
4040 @lilypond[fragment,verbatim,relative=1]
4041 c1 \mark \markup { \musicglyph #"scripts-ufermata" }
4045 In this case, during line breaks,
4046 marks must also be printed at the end of the line, and not at the
4047 beginning. Use the following to force that behavior:
4049 \property Score.RehearsalMark \override
4050 #'break-visibility = #begin-of-line-invisible
4053 See @inputfileref{input/test,boxed-molecule.ly} for putting boxes
4059 @cindex barlines, putting symbols on
4063 @internalsref{MarkEvent}, @internalsref{RehearsalMark}, and
4064 @inputfileref{input/test,boxed-molecule.ly}.
4068 @subsection Bar numbers
4072 @cindex measure numbers
4073 @cindex currentBarNumber
4075 Bar numbers are printed by default at the start of the line. The
4076 number itself is stored in the
4077 @code{currentBarNumber} property,
4078 which is normally updated automatically for every measure.
4080 Bar numbers can be typeset at regular intervals instead of at the
4081 beginning of each line. This is illustrated in the following example,
4082 whose source is available as
4083 @inputfileref{input/test,bar-number-regular-interval.ly}:
4085 @lilypondfile[notexidoc]{bar-number-regular-interval.ly}
4090 @internalsref{BarNumber},
4091 @inputfileref{input/test,bar-number-every-five-reset.ly}, and
4092 @inputfileref{input/test,bar-number-regular-interval.ly}.
4096 Bar numbers can collide with the @internalsref{StaffGroup} bracket, if
4097 there is one at the top. To solve this, the
4098 @code{padding} property of @internalsref{BarNumber} can be
4099 used to position the number correctly.
4101 @node Instrument names
4102 @subsection Instrument names
4104 In an orchestral score, instrument names are printed left side of the
4107 This can be achieved by setting @internalsref{Staff}.@code{instrument}
4108 and @internalsref{Staff}.@code{instr}. This will print a string before
4109 the start of the staff. For the first start, @code{instrument} is
4110 used, for the next ones @code{instr} is used:
4112 @lilypond[verbatim,singleline]
4113 \property Staff.instrument = "ploink " { c''4 }
4116 You can also use markup texts to construct more complicated instrument
4119 @lilypond[fragment,verbatim,singleline]
4120 \notes \context Staff = treble {
4121 \property Staff.instrument = \markup {
4122 \column << "Clarinetti"
4124 \smaller \musicglyph #"accidentals--1"
4135 @internalsref{InstrumentName}.
4139 When you put a name on a grand staff or piano staff the width of the
4140 brace is not taken into account. You must add extra spaces to the end of
4141 the name to avoid a collision.
4144 @subsection Transpose
4146 @cindex transposition of pitches
4147 @cindex @code{\transpose}
4149 A music expression can be transposed with @code{\transpose}. The syntax
4152 \transpose @var{from} @var{to} @var{musicexpr}
4155 This means that @var{musicexpr} is transposed by the interval
4156 between @var{from} and @var{to}.
4158 @code{\transpose} distinguishes between enharmonic pitches: both
4159 @code{\transpose c cis} or @code{\transpose c des} will transpose up
4160 half a tone. The first version will print sharps and the second
4161 version will print flats:
4163 @lilypond[singleline, verbatim]
4164 mus =\notes { \key d \major cis d fis g }
4165 \score { \notes \context Staff {
4168 \transpose c g' \mus
4169 \transpose c f' \mus
4175 @internalsref{TransposedMusic}, and @internalsref{UntransposableMusic}.
4179 If you want to use both @code{\transpose} and @code{\relative}, then
4180 you must put @code{\transpose} outside of @code{\relative}, since
4181 @code{\relative} will have no effect music that appears inside a
4187 @node Multi measure rests
4188 @subsection Multi measure rests
4189 @cindex multi measure rests
4190 @cindex Rests, multi measure
4194 Multi measure rests are entered using `@code{R}'. It is specifically
4195 meant for full bar rests and for entering parts: the rest can expand to
4196 fill a score with rests, or it can be printed as a single multimeasure
4197 rest. This expansion is controlled by the property
4198 @code{Score.skipBars}. If this is set to true, Lily will not expand
4199 empty measures, and the appropriate number is added automatically:
4201 @lilypond[fragment,verbatim]
4202 \time 4/4 r1 | R1 | R1*2
4203 \property Score.skipBars = ##t R1*17 R1*4
4206 The @code{1} in @code{R1} is similar to the duration notation used for
4207 notes. Hence, for time signatures other than 4/4, you must enter other
4208 durations. This can be done with augmentation dots or fractions:
4210 @lilypond[fragment,verbatim]
4211 \property Score.skipBars = ##t
4219 An @code{R} spanning a single measure is printed as either a whole rest
4220 or a breve, centered in the measure regardless of the time signature.
4222 @cindex text on multi-measure rest
4223 @cindex script on multi-measure rest
4224 @cindex fermata on multi-measure rest
4226 Texts can be added to multi-measure rests by using the
4227 @var{note}-@code{markup} syntax (see @ref{Text markup}). In this case, the number is
4228 replaced. If you need both texts and the number, you must add the
4229 number by hand. A variable (@code{\fermataMarkup}) is provided for
4233 @lilypond[verbatim,fragment]
4235 R2._\markup { "Ad lib" }
4240 @cindex whole rests for a full measure
4244 @internalsref{MultiMeasureRestEvent},
4245 @internalsref{MultiMeasureTextEvent},
4246 @internalsref{MultiMeasureRestMusicGroup}, and
4247 @internalsref{MultiMeasureRest}.
4249 The layout object @internalsref{MultiMeasureRestNumber} is for the
4250 default number, and @internalsref{MultiMeasureRestText} for user
4255 It is not possible to use fingerings (e.g. @code{R1-4}) to put numbers
4256 over multi-measure rests.
4258 @cindex condensing rests
4260 There is no way to automatically condense multiple rests into a single
4261 multimeasure rest. Multi measure rests do not take part in rest
4264 Be careful when entering multimeasure rests followed by whole notes,
4268 will enter two notes lasting four measures each. When @code{skipBars}
4269 is set, then the result will look OK, but the bar numbering will be
4272 @node Automatic part combining
4273 @subsection Automatic part combining
4274 @cindex automatic part combining
4275 @cindex part combiner
4278 Automatic part combining is used to merge two parts of music onto a
4279 staff. It is aimed at typesetting orchestral scores. When the two
4280 parts are identical for a period of time, only one is shown. In
4281 places where the two parts differ, they are typeset as separate
4282 voices, and stem directions are set automatically. Also, solo and
4283 @emph{a due} parts are identified and can be marked.
4287 The syntax for part combining is
4290 \partcombine @var{context} @var{musicexpr1} @var{musicexpr2}
4292 where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
4293 combined into one context of type @var{context}. The music expressions
4294 must be interpreted by contexts whose names should start with @code{one}
4297 The following example demonstrates the basic functionality of the part
4298 combiner: putting parts on one staff, and setting stem directions and
4301 @lilypond[verbatim,singleline,fragment]
4303 \context Voice=one \partcombine Voice
4304 \context Thread=one \relative c'' {
4307 \context Thread=two \relative c'' {
4313 The first @code{g} appears only once, although it was
4314 specified twice (once in each part). Stem, slur and tie directions are
4315 set automatically, depending whether there is a solo or unisono. The
4316 first part (with context called @code{one}) always gets up stems, and
4317 `solo', while the second (called @code{two}) always gets down stems and
4320 If you just want the merging parts, and not the textual markings, you
4321 may set the property @var{soloADue} to false:
4323 @lilypond[verbatim,singleline,fragment]
4325 \property Staff.soloADue = ##f
4326 \context Voice=one \partcombine Voice
4327 \context Thread=one \relative c'' {
4330 \context Thread=two \relative c'' {
4338 @internalsref{PartCombineMusic},
4339 @internalsref{Thread_devnull_engraver}, and
4340 @internalsref{Voice_devnull_engraver} and @internalsref{A2_engraver}.
4344 The syntax for naming contexts in inconsistent with the syntax for
4347 In @code{soloADue} mode, when the two voices play the same notes on and
4348 off, the part combiner may typeset @code{a2} more than once in a
4351 @lilypond[fragment,singleline]
4353 \context Voice=one \partcombine Voice
4354 \context Thread=one \relative c'' {
4357 \context Thread=two \relative c'' {
4363 The part combiner is slated to be rewritten [TODO: explain why].
4365 @cindex @code{Thread_devnull_engraver}
4366 @cindex @code{Voice_engraver}
4367 @cindex @code{A2_engraver}
4370 @subsection Hiding staves
4372 @cindex Frenched scores
4373 @cindex Hiding staves
4375 In orchestral scores, staff lines that only have rests are usually
4376 removed. This saves some space. This style is called `French Score'.
4377 For @internalsref{Lyrics}, @internalsref{LyricsVoice},
4378 @internalsref{ChordNames} and @internalsref{FiguredBass}, this is
4379 switched on by default. When these line of these contexts turn out
4380 empty after the line-breaking process, they are removed.
4382 For normal staves, a specialized @internalsref{Staff} context is
4383 available, which does the same: staves containing nothing (or only
4384 multi measure rests) are removed. The context definition is stored in
4385 @code{\RemoveEmptyStaffContext} variable. Observe how the second staff
4386 in this example disappears in the second line:
4391 \notes \relative c' <
4392 \context Staff = SA { e4 f g a \break c1 }
4393 \context Staff = SB { c4 d e f \break R1 }
4397 \translator { \RemoveEmptyStaffContext }
4403 @node Sound output for transposing instruments
4404 @subsection Sound output for transposing instruments
4406 When you want to make a MIDI file from a score containing transposed
4407 and untransposed instruments, you have to instruct LilyPond the pitch
4408 offset (in semitones) for the transposed instruments. This is done
4409 using the @code{transposing} property. It does not affect printed
4412 @cindex @code{transposing}
4415 \property Staff.instrument = #"Cl. in B-flat"
4416 \property Staff.transposing = #-2
4420 @node Ancient notation
4421 @section Ancient notation
4423 @cindex Vaticana, Editio
4424 @cindex Medicaea, Editio
4429 @c [TODO: write more comprehensive introduction on ancient notation]
4431 Support for ancient notation is still under heavy development.
4432 Regardless of all of the current limitations (see the bugs section
4433 below for details), it currently includes features for mensural
4434 notation and Gregorian Chant notation. There is also limited support
4435 for figured bass notation.
4437 Many graphical objects provide a @code{style} property, see
4438 @ref{Ancient note heads}, @ref{Ancient accidentals}, @ref{Ancient
4439 rests}, @ref{Ancient clefs}, @ref{Ancient flags} and @ref{Ancient time
4440 signatures}. By manipulating such a grob property, the typographical
4441 appearance of the affected graphical objects can be accomodated for a
4442 specific notation flavour without need for introducing any new
4446 Other aspects of ancient notation can not that easily be expressed as
4447 in terms of just changing a style property of a graphical object.
4448 Therefore, some notational concepts are introduced specifically for
4449 ancient notation, see @ref{Custodes}, @ref{Divisiones},
4450 @ref{Ligatures}, and @ref{Figured bass}.
4454 * Ancient note heads::
4455 * Ancient accidentals::
4459 * Ancient time signatures::
4464 * Vaticana style contexts::
4467 If this all is way too much of documentation for you, and you just
4468 want to dive into typesetting without worrying too much about the
4469 details on how to customize a context, then you may have a look at the
4470 predefined contexts (see @ref{Vaticana style contexts}). Use them to
4471 set up predefined style-specific voice and staff contexts, and
4472 directly go ahead with the note entry.
4476 Ligatures need special spacing that has not yet been implemented. As
4477 a result, there is too much space between ligatures most of the time,
4478 and line breaking often is unsatisfactory. Also, lyrics do not
4479 correctly align with ligatures.
4481 Accidentals must not be printed within a ligature, but instead need to
4482 be collected and printed in front of it.
4484 Augmentum dots within ligatures are currently not handled correctly.
4487 @node Ancient note heads
4488 @subsection Ancient note heads
4494 For ancient notation, a note head style other than the @code{default}
4495 style may be chosen. This is accomplished by setting the @code{style}
4496 property of the NoteHead object to the desired value (@code{baroque},
4497 @code{neo_mensural} or @code{mensural}). The @code{baroque} style
4498 differs from the @code{default} style only in using a square shape for
4499 @code{\breve} note heads. The @code{neo_mensural} style differs from
4500 the @code{baroque} style in that it uses rhomboidal heads for whole
4501 notes and all smaller durations. Stems are centered on the note
4502 heads. This style is in particular useful when transcribing mensural
4503 music, e.g. for the incipit. The @code{mensural} style finally
4504 produces note heads that mimick the look of note heads in historic
4505 printings of the 16th century.
4507 The following example demonstrates the @code{neo_mensural} style:
4509 @lilypond[fragment,singleline,verbatim]
4510 \property Voice.NoteHead \set #'style = #'neo_mensural
4511 a'\longa a'\breve a'1 a'2 a'4 a'8 a'16
4514 When typesetting a piece in Gregorian Chant notation, a Gregorian
4515 ligature engraver will automatically select the proper note heads,
4516 such there is no need to explicitly set the note head style. Still,
4517 the note head style can be set e.g. to @code{vaticana_punctum} to
4518 produce punctum neumes. Similarly, a mensural ligature engraver is
4519 used to automatically assemble mensural ligatures. See
4520 @ref{Ligatures} for how ligature engravers work.
4524 @inputfileref{input/regression,note-head-style.ly} gives an overview
4525 over all available note head styles.
4527 @ref{Percussion staves} use note head styles of their own that are
4528 frequently used in contemporary music notation.
4530 @node Ancient accidentals
4531 @subsection Ancient accidentals
4537 Use the @code{style} property of grob @internalsref{Accidental} to
4538 select ancient accidentals. Currently supported styles are
4539 @code{mensural}, @code{vaticana}, @code{hufnagel} and @code{medicaea}.
4541 @lilypond[singleline,26pt]
4549 { " " \musicglyph #"accidentals-vaticana-1"
4550 " " \musicglyph #"accidentals-vaticana0" }
4554 { " " \musicglyph #"accidentals-medicaea-1" }
4558 { " " \musicglyph #"accidentals-hufnagel-1" }
4562 { " " \musicglyph #"accidentals-mensural-1"
4563 " " \musicglyph #"accidentals-mensural1" }
4572 \remove "Bar_number_engraver"
4576 \remove "Clef_engraver"
4577 \remove "Key_engraver"
4578 \remove "Time_signature_engraver"
4579 \remove "Staff_symbol_engraver"
4580 minimumVerticalExtent = ##f
4586 As shown, not all accidentals are supported by each style. When
4587 trying to access an unsupported accidental, LilyPond will switch to a
4588 different style, as demonstrated in
4589 @inputfileref{input/test,ancient-accidentals.ly}.
4591 Similarly to local accidentals, the style of the key signature can be
4592 controlled by the @code{style} property of the
4593 @internalsref{KeySignature} grob.
4597 @ref{Pitches}, @ref{Chromatic alterations} and @ref{Accidentals} give
4598 a general introduction into the use of accidentals. @ref{Key
4599 signature} gives a general introduction into the use of key
4604 @subsection Ancient rests
4610 Use the @code{style} property of grob @internalsref{Rest} to select
4611 ancient accidentals. Currently supported styles are @code{classical},
4612 @code{neo_mensural} and @code{mensural}. @code{classical} differs
4613 from the @code{default} style only in that the quarter rest looks like
4614 a horizontally mirrored 8th rest. The @code{neo_mensural} style suits
4615 well for e.g. the incipit of a transcribed mensural piece of music.
4616 The @code{mensural} style finally mimicks the appearance of rests as
4617 in historic prints of the 16th century.
4619 The following example demonstrates the @code{neo_mensural} style:
4621 @lilypond[fragment,singleline,verbatim]
4622 \property Voice.Rest \set #'style = #'neo_mensural
4623 r\longa r\breve r1 r2 r4 r8 r16
4626 There are no 32th and 64th rests specifically for the mensural or
4627 neo-mensural style. Instead, the rests from the default style will be
4628 taken. See @inputfileref{input/test,rests.ly} for a chart of all
4631 There are no rests in Gregorian Chant notation; instead, it uses
4636 @ref{Rests} gives a general introduction into the use of rests.
4640 @subsection Ancient clefs
4646 LilyPond supports a variety of clefs, many of them ancient.
4648 The following table shows all ancient clefs that are supported via the
4649 @code{\clef} command. Some of the clefs use the same glyph, but
4650 differ only with respect to the line they are printed on. In such
4651 cases, a trailing number in the name is used to enumerate these clefs.
4652 Still, you can manually force a clef glyph to be typeset on an
4653 arbitrary line, as described in @ref{Clef}. The note printed to the
4654 right side of each clef in the example column denotes the @code{c'}
4655 with respect to that clef.
4657 @multitable @columnfractions .3 .3 .3 .1
4661 @b{Description} @tab
4662 @b{Supported Clefs} @tab
4666 @code{clefs-neo_mensural_c} @tab
4667 modern style mensural C clef @tab
4668 @code{neo_mensural_c1}, @code{neo_mensural_c2},
4669 @code{neo_mensural_c3}, @code{neo_mensural_c4} @tab
4670 @lilypond[relative 0, notime]
4671 \property Staff.TimeSignature \set #'transparent = ##t
4672 \clef "neo_mensural_c2" c
4676 @code{clefs-petrucci_c1}
4677 @code{clefs-petrucci_c2}
4678 @code{clefs-petrucci_c3}
4679 @code{clefs-petrucci_c4}
4680 @code{clefs-petrucci_c5}
4683 petrucci style mensural C clefs, for use on different stafflines
4684 (the examples shows the 2nd staffline C clef).
4694 @lilypond[relative 0, notime]
4695 \property Staff.TimeSignature \set #'transparent = ##t
4696 \clef "petrucci_c2" c
4700 @code{clefs-petrucci_f} @tab
4701 petrucci style mensural F clef @tab
4702 @code{petrucci_f} @tab
4703 @lilypond[relative 0, notime]
4704 \property Staff.TimeSignature \set #'transparent = ##t
4705 \clef "petrucci_f" c
4709 @code{clefs-petrucci_g} @tab
4710 petrucci style mensural G clef @tab
4711 @code{petrucci_g} @tab
4712 @lilypond[relative 0, notime]
4713 \property Staff.TimeSignature \set #'transparent = ##t
4714 \clef "petrucci_g" c
4718 @code{clefs-mensural_c} @tab
4719 historic style mensural C clef @tab
4720 @code{mensural_c1}, @code{mensural_c2}, @code{mensural_c3},
4721 @code{mensural_c4} @tab
4722 @lilypond[relative 0, notime]
4723 \property Staff.TimeSignature \set #'transparent = ##t
4724 \clef "mensural_c2" c
4728 @code{clefs-mensural_f} @tab
4729 historic style mensural F clef @tab
4730 @code{mensural_f} @tab
4731 @lilypond[relative 0, notime]
4732 \property Staff.TimeSignature \set #'transparent = ##t
4733 \clef "mensural_f" c
4737 @code{clefs-mensural_g} @tab
4738 historic style mensural G clef @tab
4739 @code{mensural_g} @tab
4740 @lilypond[relative 0, notime]
4741 \property Staff.TimeSignature \set #'transparent = ##t
4742 \clef "mensural_g" c
4746 @code{clefs-vaticana_do} @tab
4747 Editio Vaticana style do clef @tab
4748 @code{vaticana_do1}, @code{vaticana_do2}, @code{vaticana_do3} @tab
4749 @lilypond[relative 0, notime]
4751 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4752 \property Staff.TimeSignature \set #'transparent = ##t
4753 \clef "vaticana_do2" c
4757 @code{clefs-vaticana_fa} @tab
4758 Editio Vaticana style fa clef @tab
4759 @code{vaticana_fa1}, @code{vaticana_fa2} @tab
4760 @lilypond[relative 0, notime]
4762 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4763 \property Staff.TimeSignature \set #'transparent = ##t
4764 \clef "vaticana_fa2" c
4768 @code{clefs-medicaea_do} @tab
4769 Editio Medicaea style do clef @tab
4770 @code{medicaea_do1}, @code{medicaea_do2}, @code{medicaea_do3} @tab
4771 @lilypond[relative 0, notime]
4773 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4774 \property Staff.TimeSignature \set #'transparent = ##t
4775 \clef "medicaea_do2" c
4779 @code{clefs-medicaea_fa} @tab
4780 Editio Medicaea style fa clef @tab
4781 @code{medicaea_fa1}, @code{medicaea_fa2} @tab
4782 @lilypond[relative 0, notime]
4784 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4785 \property Staff.TimeSignature \set #'transparent = ##t
4786 \clef "medicaea_fa2" c
4790 @code{clefs-hufnagel_do} @tab
4791 historic style hufnagel do clef @tab
4792 @code{hufnagel_do1}, @code{hufnagel_do2}, @code{hufnagel_do3} @tab
4793 @lilypond[relative 0, notime]
4795 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4796 \property Staff.TimeSignature \set #'transparent = ##t
4797 \clef "hufnagel_do2" c
4801 @code{clefs-hufnagel_fa} @tab
4802 historic style hufnagel fa clef @tab
4803 @code{hufnagel_fa1}, @code{hufnagel_fa2} @tab
4804 @lilypond[relative 0, notime]
4806 \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #4
4807 \property Staff.TimeSignature \set #'transparent = ##t
4808 \clef "hufnagel_fa2" c
4812 @code{clefs-hufnagel_do_fa} @tab
4813 historic style hufnagel combined do/fa clef @tab
4814 @code{hufnagel_do_fa} @tab
4815 @lilypond[relative 0, notime]
4816 \property Staff.TimeSignature \set #'transparent = ##t
4817 \clef "hufnagel_do_fa" c
4822 @c --- This should go somewhere else: ---
4823 @c @item modern style percussion clef (glyph: @code{clefs-percussion})
4826 @c @code{percussion}
4828 @c @lilypond{\property Staff.TimeSignature \set #'transparent = ##t \clef "percussion" c'}
4830 @c @item modern style tab clef (glyph: @code{clefs-tab})
4835 @c @lilypond{\context Staff \outputproperty #(make-type-checker 'staff-symbol-interface) #'line-count = #6 \property Staff.TimeSignature \set #'transparent = ##t \clef "tab" c'}
4837 @emph{Modern style} means ``as is typeset in contemporary editions of
4838 transcribed mensural music''.
4840 @emph{Petrucci style} means ``inspired by printings published by the
4841 famous engraver Petrucci (1466-1539)''.
4843 @emph{Historic style} means ``as was typeset or written in historic
4844 editions (other than those of Petrucci)''.
4846 @emph{Editio XXX style} means ``as is/was printed in Editio XXX''.
4848 Petrucci used C clefs with differently balanced left-side vertical
4849 beams, depending on which staffline it is printed.
4853 For modern clefs, see @ref{Clef}. For the percussion clef, see
4854 @ref{Percussion staves}. For the @code{TAB} clef, see
4859 @subsection Ancient flags
4865 Use the @code{flag-style} property of grob @internalsref{Stem} to
4866 select ancient flags. Besides the @code{default} flag style,
4867 currently only @code{mensural} style is supported:
4869 @lilypond[fragment,singleline,verbatim]
4870 \property Voice.Stem \set #'flag-style = #'mensural
4871 \property Voice.Stem \set #'thickness = #1.0
4872 \property Voice.NoteHead \set #'style = #'mensural
4874 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
4875 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
4878 Note that the innermost flare of each mensural flag always is
4879 vertically aligned with a staff line. If you do not like this
4880 behaviour, you can set the @code{adjust-if-on-staffline} property of
4881 grob @internalsref{Stem} to @code{##f}. Then, the vertical position
4882 of the end of each flare is different between notes on staff lines and
4883 notes between staff lines:
4885 @lilypond[fragment,singleline]
4886 \property Voice.Stem \set #'flag-style = #'mensural
4887 \property Voice.Stem \set #'thickness = #1.0
4888 \property Voice.Stem \set #'adjust-if-on-staffline = ##f
4889 \property Voice.NoteHead \set #'style = #'mensural
4891 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
4892 c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
4895 There is no particular flag style for neo-mensural notation. Hence,
4896 when typesetting e.g. the incipit of a transcibed piece of mensural
4897 music, the default flag style should be used. There are no flags in
4898 Gregorian Chant notation.
4901 @node Ancient time signatures
4902 @subsection Ancient time signatures
4904 @cindex time signatures
4908 There is limited support for mensural time signatures. Currently, the
4909 glyphs are hard-wired to particular time fractions. In other words,
4910 to get a particular mensural signature glyph with the @code{\time n/m}
4911 command, @code{n} and @code{m} have to be chosen according to the
4917 \property Score.timing = ##f
4918 \property Score.barAlways = ##t
4919 s_\markup { "$\\backslash$time 4/4" }
4920 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/4" }
4922 s_\markup { "$\\backslash$time 2/2" }
4923 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/2" }
4925 s_\markup { "$\\backslash$time 6/4" }
4926 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/4" }
4928 s_\markup { "$\\backslash$time 6/8" }
4929 ^\markup { " " \musicglyph #"timesig-neo\_mensural6/8" }
4931 s_\markup { "$\\backslash$time 3/2" }
4932 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/2" }
4934 s_\markup { "$\\backslash$time 3/4" }
4935 ^\markup { " " \musicglyph #"timesig-neo\_mensural3/4" }
4937 s_\markup { "$\\backslash$time 9/4" }
4938 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/4" }
4940 s_\markup { "$\\backslash$time 9/8" }
4941 ^\markup { " " \musicglyph #"timesig-neo\_mensural9/8" }
4943 s_\markup { "$\\backslash$time 4/8" }
4944 ^\markup { " " \musicglyph #"timesig-neo\_mensural4/8" }
4946 s_\markup { "$\\backslash$time 2/4" }
4947 ^\markup { " " \musicglyph #"timesig-neo\_mensural2/4" }
4955 \remove Staff_symbol_engraver
4956 \remove Clef_engraver
4957 \remove Time_signature_engraver
4963 Use the @code{style} property of grob @internalsref{TimeSignature} to
4964 select ancient time signatures. Currently supported styles are
4965 @code{neo_mensural} and @code{mensural}. The above table uses the
4966 @code{neo_mensural} style. This style is appropriate e.g. for the
4967 incipit of transcriptions of mensural pieces. The @code{mensural}
4968 style mimicks the look of historical printings of the 16th century.
4970 @inputfileref{input/test,time.ly} gives an overview over all available
4971 ancient and modern styles.
4975 @ref{Time signature} gives a general introduction into the use of time
4980 Mensural signature glyphs are currently mapped to time fractions in a
4981 hard-wired way. This mapping is sensible, but still arbitrary: given
4982 a mensural time signature, the time fraction represents a modern meter
4983 that usually will be a good choice when transcribing a mensural piece
4984 of music. For a particular piece of mensural music, however, the
4985 mapping may be unsatisfactory. In particular, the mapping assumes a
4986 fixed transcription of durations (e.g. brevis = half note in 2/2,
4987 i.e. 4:1). Some glyphs (such as the alternate glyph for 6/8 meter)
4988 are currently not at all accessible through the @code{\time} command.
4990 Mensural time signatures are supported typographically, but not yet
4991 musically. The internal representation of durations is currently
4992 based on a purely binary system; a ternary division such as 1 brevis =
4993 3 semibrevis (tempus perfectum) or 1 semibrevis = 3 minima (cum
4994 prolatione maiori) is not correctly handled: event times in ternary
4995 modes will be badly computed, resulting e.g. in horizontally
4996 misaligned note heads, and bar checks are likely to erroneously fail.
4998 The syntax and semantics of the @code{\time} command for mensural
4999 music is subject to change.
5002 @subsection Custodes
5007 A @emph{custos} (plural: @emph{custodes}; latin word for `guard') is a
5008 symbol that appears at the end of a staff. It anticipates the pitch
5009 of the first note(s) of the following line and thus helps the player
5010 or singer to manage line breaks during performance, thus enhancing
5011 readability of a score.
5013 Custodes were frequently used in music notation until the 17th
5014 century. Nowadays, they have survived only in a few particular forms
5015 of musical notation such as contemporary editions of Gregorian chant
5016 like the @emph{editio vaticana}. There are different custos glyphs
5017 used in different flavours of notational style.
5021 For typesetting custodes, just put a @internalsref{Custos_engraver} into the
5022 @internalsref{Staff} context when declaring the @code{\paper} block,
5023 as shown in the following example:
5029 \consists Custos_engraver
5030 Custos \override #'style = #'mensural
5035 The result looks like this:
5041 \property Staff.Custos \set #'style = #'mensural
5048 \consists Custos_engraver
5055 The custos glyph is selected by the @code{style} property. The styles
5056 supported are @code{vaticana}, @code{medicaea}, @code{hufnagel} and
5057 @code{mensural}. They are demonstrated in the following fragment:
5067 { " " \musicglyph #"custodes-vaticana-u0" }
5071 { " " \musicglyph #"custodes-medicaea-u0" }
5075 { " " \musicglyph #"custodes-hufnagel-u0" }
5079 { " " \musicglyph #"custodes-mensural-u0" }
5088 \remove "Bar_number_engraver"
5092 \remove "Clef_engraver"
5093 \remove "Key_engraver"
5094 \remove "Time_signature_engraver"
5095 \remove "Staff_symbol_engraver"
5096 minimumVerticalExtent = ##f
5102 If the boolean property @code{adjust-if-on-staffline} is set to
5103 @code{#t} (which it is by default), lily typesets slightly different
5104 variants of the custos glyph, depending on whether the custos, is
5105 typeset on or between stafflines. The glyph will
5106 optically fit well into the staff, with the appendage on the right of
5107 the custos always ending at the same vertical position between two
5108 stafflines regardless of the pitch. If you set
5109 @code{adjust-if-on-staffline} to @code{#f}, then
5110 a compromise between both forms is used.
5112 Just like stems can be attached to noteheads in two directions
5113 @emph{up} and @emph{down}, each custos glyph is available with its
5114 appendage pointing either up or down. If the pitch of a custos is
5115 above a selectable position, the appendage will point downwards; if
5116 the pitch is below this position, the appendage will point upwards.
5117 Use property @code{neutral-position} to select this position. By
5118 default, it is set to @code{0}, such that the neutral position is the
5119 center of the staff. Use property @code{neutral-direction} to control
5120 what happens if a custos is typeset on the neutral position itself.
5121 By default, this property is set to @code{-1}, such that the appendage
5122 will point downwards. If set to @code{1}, the appendage will point
5123 upwards. Other values such as @code{0} are reserved for future
5124 extensions and should not be used.
5128 @internalsref{Custos} and @inputfileref{input/regression,custos.ly}.
5132 @subsection Divisiones
5138 A @emph{divisio} (plural: @emph{divisiones}; latin word for
5139 `division') is a staff context symbol that is used to structure
5140 Gregorian music into phrases and sections. The musical meaning of
5141 @emph{divisio minima}, @emph{divisio maior} and @emph{divisio maxima}
5142 can be characterized as short, medium and long pause, somewhat like
5143 @ref{Breath marks}. The @emph{finalis} sign not only marks the end of
5144 a chant, but is also frequently used within a single
5145 antiphonal/responsorial chant to mark the end of each section.
5149 To use divisiones, include the file @code{gregorian-init.ly}. It
5150 contains definitions that you can apply by just inserting
5151 @code{\divisioMinima}, @code{\divisioMaior}, @code{\divisioMaxima},
5152 and @code{\finalis} at proper places in the input. Some editions use
5153 @emph{virgula} or @emph{caesura} instead of divisio minima.
5154 Therefore, @code{gregorian-init.ly} also defines @code{\virgula} and
5157 @lilypondfile[notexidoc]{divisiones.ly}
5161 @cindex @code{\virgula}
5163 @cindex @code{\caesura}
5165 @cindex @code{\divisioMinima}
5166 @code{\divisioMinima},
5167 @cindex @code{\divisioMaior}
5168 @code{\divisioMaior},
5169 @cindex @code{\divisioMaxima}
5170 @code{\divisioMaxima},
5171 @cindex @code{\finalis}
5176 @internalsref{BreathingSign}, @internalsref{BreathingSignEvent},
5177 @inputfileref{input/test,divisiones.ly}, and @ref{Breath marks}.
5180 @subsection Ligatures
5184 @c TODO: Should double check if I recalled things correctly when I wrote
5185 @c down the following paragraph by heart.
5187 In musical terminology, a ligature is a coherent graphical symbol that
5188 represents at least two distinct notes. Ligatures originally appeared
5189 in the manuscripts of Gregorian chant notation roughly since the 9th
5190 century as an allusion to the accent symbols of greek lyric poetry to
5191 denote ascending or descending sequences of notes. Both, the shape
5192 and the exact meaning of ligatures changed tremendously during the
5193 following centuries: In early notation, ligatures were used for
5194 monophonic tunes (Gregorian chant) and very soon denoted also the way
5195 of performance in the sense of articulation. With upcoming
5196 multiphony, the need for a metric system arised, since multiple voices
5197 of a piece have to be synchronized some way. New notation systems
5198 were invented that used the manifold shapes of ligatures to now denote
5199 rhythmical patterns (e.g. black mensural notation, mannered notation,
5200 ars nova). With the invention of the metric system of the white
5201 mensural notation, the need for ligatures to denote such patterns
5202 disappeared. Nevertheless, ligatures were still in use in the
5203 mensural system for a couple of decades until they finally disappeared
5204 during the late 16th / early 17th century. Still, ligatures have
5205 survived in contemporary editions of Gregorian chant such as the
5206 Editio Vaticana from 1905/08.
5210 Syntactically, ligatures are simply enclosed by @code{\[} and
5211 @code{\]}. Some ligature styles (such as Editio Vaticana) may need
5212 additional input syntax specific for this particular type of ligature.
5213 By default, the @internalsref{LigatureBracket} engraver just puts a
5214 square bracket above the ligature:
5216 @lilypond[singleline,verbatim]
5218 \notes \transpose c c' {
5226 To select a specific style of ligatures, a proper ligature engraver
5227 has to be added to the @internalsref{Voice} context, as explained in
5228 the following subsections. Currently, only white mensural ligatures
5229 are supported with certain limitations. Support for Editio Vaticana
5230 will be added in the future.
5233 * White mensural ligatures::
5234 * Gregorian square neumes ligatures::
5237 @node White mensural ligatures
5238 @subsubsection White mensural ligatures
5240 @cindex Mensural ligatures
5241 @cindex White mensural ligatures
5243 There is limited support for white mensural ligatures. The
5244 implementation is still experimental; it currently may output strange
5245 warnings or even crash in some cases or produce weird results on more
5250 To engrave white mensural ligatures, in the paper block the
5251 @internalsref{Mensural_ligature_engraver} has to be put into the
5252 @internalsref{Voice} context, and remove the
5253 @internalsref{Ligature_bracket_engraver}:
5259 \remove Ligature_bracket_engraver
5260 \consists Mensural_ligature_engraver
5265 There is no additional input language to describe the shape of a
5266 white mensural ligature. The shape is rather determined solely from
5267 the pitch and duration of the enclosed notes. While this approach may
5268 take a new user a while to get accustomed, it has the great advantage
5269 that the full musical information of the ligature is known internally.
5270 This is not only required for correct MIDI output, but also allows for
5271 automatic transcription of the ligatures.
5276 \property Score.timing = ##f
5277 \property Score.defaultBarType = "empty"
5278 \property Voice.NoteHead \set #'style = #'neo_mensural
5279 \property Staff.TimeSignature \set #'style = #'neo_mensural
5281 \[ g\longa c\breve a\breve f\breve d'\longa \]
5283 \[ e1 f1 a\breve g\longa \]
5285 @lilypond[singleline]
5287 \notes \transpose c c' {
5288 \property Score.timing = ##f
5289 \property Score.defaultBarType = "empty"
5290 \property Voice.NoteHead \set #'style = #'neo_mensural
5291 \property Staff.TimeSignature \set #'style = #'neo_mensural
5293 \[ g\longa c\breve a\breve f\breve d'\longa \]
5295 \[ e1 f1 a\breve g\longa \]
5300 \remove Ligature_bracket_engraver
5301 \consists Mensural_ligature_engraver
5307 Without replacing @internalsref{Ligature_bracket_engraver} with
5308 @internalsref{Mensural_ligature_engraver}, the same music transcribes
5311 @lilypond[singleline]
5313 \notes \transpose c c' {
5314 \property Score.timing = ##f
5315 \property Score.defaultBarType = "empty"
5316 \property Voice.NoteHead \set #'style = #'neo_mensural
5317 \property Staff.TimeSignature \set #'style = #'neo_mensural
5319 \[ g\longa c\breve a\breve f\breve d'\longa \]
5321 \[ e1 f1 a\breve g\longa \]
5327 @node Gregorian square neumes ligatures
5328 @subsubsection Gregorian square neumes ligatures
5330 @cindex Square neumes ligatures
5331 @cindex Gregorian square neumes ligatures
5333 Gregorian square neumes notation (following the style of the Editio
5334 Vaticana) is under heavy development, but not yet really usable for
5335 production purposes. Core ligatures can already be typeset, but
5336 essential issues for serious typesetting are still under development,
5337 such as (among others) horizontal alignment of multiple ligatures,
5338 lyrics alignment and proper accidentals handling. Still, this section
5339 gives a sneak preview of what Gregorian chant may look like once it
5342 The following table contains the extended neumes table of the 2nd
5343 volume of the Antiphonale Romanum (@emph{Liber Hymnarius}), published
5344 1983 by the monks of Solesmes.
5346 @multitable @columnfractions .4 .2 .2 .2
5349 @b{Neuma aut@*Neumarum Elementa} @tab
5350 @b{Figurae@*Rectae} @tab
5351 @b{Figurae@*Liquescentes Auctae} @tab
5352 @b{Figurae@*Liquescentes Deminutae}
5354 @c TODO: \paper block is identical in all of the below examples.
5355 @c Therefore, it should somehow be included rather than duplicated all
5358 @c why not make identifiers in ly/engraver-init.ly? --hwn
5360 @c Because it's just used to typeset plain notes without
5361 @c a staff for demonstration purposes rather than something
5362 @c special of Gregorian chant notation. --jr
5367 @lilypond[noindent, 26pt, nofragment, linewidth=1.5cm]
5368 \include "gregorian-init.ly"
5370 \notes \transpose c c' {
5373 \noBreak s^\markup {"a"} \noBreak
5375 % Punctum Inclinatum
5377 \noBreak s^\markup {"b"}
5383 \remove "Bar_number_engraver"
5387 \remove "Clef_engraver"
5388 \remove "Key_engraver"
5389 StaffSymbol \set #'transparent = ##t
5390 \remove "Time_signature_engraver"
5391 \remove "Bar_engraver"
5392 minimumVerticalExtent = ##f
5396 \remove Ligature_bracket_engraver
5397 \consists Vaticana_ligature_engraver
5398 NoteHead \set #'style = #'vaticana_punctum
5399 Stem \set #'transparent = ##t
5405 @lilypond[noindent, 26pt, nofragment, linewidth=2.5cm]
5406 \include "gregorian-init.ly"
5408 \notes \transpose c c' {
5409 % Punctum Auctum Ascendens
5410 \[ \auctum \ascendens b \]
5411 \noBreak s^\markup {"c"} \noBreak
5413 % Punctum Auctum Descendens
5414 \[ \auctum \descendens b \]
5415 \noBreak s^\markup {"d"} \noBreak
5417 % Punctum Inclinatum Auctum
5418 \[ \inclinatum \auctum b \]
5419 \noBreak s^\markup {"e"}
5425 \remove "Bar_number_engraver"
5429 \remove "Clef_engraver"
5430 \remove "Key_engraver"
5431 StaffSymbol \set #'transparent = ##t
5432 \remove "Time_signature_engraver"
5433 \remove "Bar_engraver"
5434 minimumVerticalExtent = ##f
5438 \remove Ligature_bracket_engraver
5439 \consists Vaticana_ligature_engraver
5440 NoteHead \set #'style = #'vaticana_punctum
5441 Stem \set #'transparent = ##t
5447 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5448 \include "gregorian-init.ly"
5450 \notes \transpose c c' {
5451 % Punctum Inclinatum Parvum
5452 \[ \inclinatum \deminutum b \]
5453 \noBreak s^\markup {"f"}
5459 \remove "Bar_number_engraver"
5463 \remove "Clef_engraver"
5464 \remove "Key_engraver"
5465 StaffSymbol \set #'transparent = ##t
5466 \remove "Time_signature_engraver"
5467 \remove "Bar_engraver"
5468 minimumVerticalExtent = ##f
5472 \remove Ligature_bracket_engraver
5473 \consists Vaticana_ligature_engraver
5474 NoteHead \set #'style = #'vaticana_punctum
5475 Stem \set #'transparent = ##t
5484 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5485 \include "gregorian-init.ly"
5487 \notes \transpose c c' {
5490 \noBreak s^\markup {"g"}
5496 \remove "Bar_number_engraver"
5500 \remove "Clef_engraver"
5501 \remove "Key_engraver"
5502 StaffSymbol \set #'transparent = ##t
5503 \remove "Time_signature_engraver"
5504 \remove "Bar_engraver"
5505 minimumVerticalExtent = ##f
5509 \remove Ligature_bracket_engraver
5510 \consists Vaticana_ligature_engraver
5511 NoteHead \set #'style = #'vaticana_punctum
5512 Stem \set #'transparent = ##t
5521 @code{3. Apostropha vel Stropha}
5523 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5524 \include "gregorian-init.ly"
5526 \notes \transpose c c' {
5529 \noBreak s^\markup {"h"}
5535 \remove "Bar_number_engraver"
5539 \remove "Clef_engraver"
5540 \remove "Key_engraver"
5541 StaffSymbol \set #'transparent = ##t
5542 \remove "Time_signature_engraver"
5543 \remove "Bar_engraver"
5544 minimumVerticalExtent = ##f
5548 \remove Ligature_bracket_engraver
5549 \consists Vaticana_ligature_engraver
5550 NoteHead \set #'style = #'vaticana_punctum
5551 Stem \set #'transparent = ##t
5557 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5558 \include "gregorian-init.ly"
5560 \notes \transpose c c' {
5562 \[ \stropha \auctum b \]
5563 \noBreak s^\markup {"i"}
5569 \remove "Bar_number_engraver"
5573 \remove "Clef_engraver"
5574 \remove "Key_engraver"
5575 StaffSymbol \set #'transparent = ##t
5576 \remove "Time_signature_engraver"
5577 \remove "Bar_engraver"
5578 minimumVerticalExtent = ##f
5582 \remove Ligature_bracket_engraver
5583 \consists Vaticana_ligature_engraver
5584 NoteHead \set #'style = #'vaticana_punctum
5585 Stem \set #'transparent = ##t
5595 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5596 \include "gregorian-init.ly"
5598 \notes \transpose c c' {
5601 \noBreak s^\markup {"j"}
5607 \remove "Bar_number_engraver"
5611 \remove "Clef_engraver"
5612 \remove "Key_engraver"
5613 StaffSymbol \set #'transparent = ##t
5614 \remove "Time_signature_engraver"
5615 \remove "Bar_engraver"
5616 minimumVerticalExtent = ##f
5620 \remove Ligature_bracket_engraver
5621 \consists Vaticana_ligature_engraver
5622 NoteHead \set #'style = #'vaticana_punctum
5623 Stem \set #'transparent = ##t
5632 @code{5. Clivis vel Flexa}
5634 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5635 \include "gregorian-init.ly"
5637 \notes \transpose c c' {
5646 \remove "Bar_number_engraver"
5650 \remove "Clef_engraver"
5651 \remove "Key_engraver"
5652 StaffSymbol \set #'transparent = ##t
5653 \remove "Time_signature_engraver"
5654 \remove "Bar_engraver"
5655 minimumVerticalExtent = ##f
5659 \remove Ligature_bracket_engraver
5660 \consists Vaticana_ligature_engraver
5661 NoteHead \set #'style = #'vaticana_punctum
5662 Stem \set #'transparent = ##t
5668 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5669 \include "gregorian-init.ly"
5671 \notes \transpose c c' {
5672 % Clivis Aucta Descendens
5673 \[ b \flexa \auctum \descendens g \]
5674 \noBreak s^\markup {"l"} \noBreak
5676 % Clivis Aucta Ascendens
5677 \[ b \flexa \auctum \ascendens g \]
5678 \noBreak s^\markup {"m"}
5684 \remove "Bar_number_engraver"
5688 \remove "Clef_engraver"
5689 \remove "Key_engraver"
5690 StaffSymbol \set #'transparent = ##t
5691 \remove "Time_signature_engraver"
5692 \remove "Bar_engraver"
5693 minimumVerticalExtent = ##f
5697 \remove Ligature_bracket_engraver
5698 \consists Vaticana_ligature_engraver
5699 NoteHead \set #'style = #'vaticana_punctum
5700 Stem \set #'transparent = ##t
5706 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5707 \include "gregorian-init.ly"
5709 \notes \transpose c c' {
5711 \[ b \flexa \deminutum g \]
5718 \remove "Bar_number_engraver"
5722 \remove "Clef_engraver"
5723 \remove "Key_engraver"
5724 StaffSymbol \set #'transparent = ##t
5725 \remove "Time_signature_engraver"
5726 \remove "Bar_engraver"
5727 minimumVerticalExtent = ##f
5731 \remove Ligature_bracket_engraver
5732 \consists Vaticana_ligature_engraver
5733 NoteHead \set #'style = #'vaticana_punctum
5734 Stem \set #'transparent = ##t
5741 @code{6. Podatus vel Pes}
5743 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5744 \include "gregorian-init.ly"
5746 \notes \transpose c c' {
5755 \remove "Bar_number_engraver"
5759 \remove "Clef_engraver"
5760 \remove "Key_engraver"
5761 StaffSymbol \set #'transparent = ##t
5762 \remove "Time_signature_engraver"
5763 \remove "Bar_engraver"
5764 minimumVerticalExtent = ##f
5768 \remove Ligature_bracket_engraver
5769 \consists Vaticana_ligature_engraver
5770 NoteHead \set #'style = #'vaticana_punctum
5771 Stem \set #'transparent = ##t
5777 @lilypond[noindent, 26pt, nofragment, linewidth=2.0cm]
5778 \include "gregorian-init.ly"
5780 \notes \transpose c c' {
5781 % Pes Auctus Descendens
5782 \[ g \pes \auctum \descendens b \]
5783 \noBreak s^\markup {"p"} \noBreak
5785 % Pes Auctus Ascendens
5786 \[ g \pes \auctum \ascendens b \]
5787 \noBreak s^\markup {"q"}
5793 \remove "Bar_number_engraver"
5797 \remove "Clef_engraver"
5798 \remove "Key_engraver"
5799 StaffSymbol \set #'transparent = ##t
5800 \remove "Time_signature_engraver"
5801 \remove "Bar_engraver"
5802 minimumVerticalExtent = ##f
5806 \remove Ligature_bracket_engraver
5807 \consists Vaticana_ligature_engraver
5808 NoteHead \set #'style = #'vaticana_punctum
5809 Stem \set #'transparent = ##t
5815 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5816 \include "gregorian-init.ly"
5818 \notes \transpose c c' {
5820 \[ g \pes \deminutum b \]
5827 \remove "Bar_number_engraver"
5831 \remove "Clef_engraver"
5832 \remove "Key_engraver"
5833 StaffSymbol \set #'transparent = ##t
5834 \remove "Time_signature_engraver"
5835 \remove "Bar_engraver"
5836 minimumVerticalExtent = ##f
5840 \remove Ligature_bracket_engraver
5841 \consists Vaticana_ligature_engraver
5842 NoteHead \set #'style = #'vaticana_punctum
5843 Stem \set #'transparent = ##t
5850 @code{7. Pes Quassus}
5852 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5853 \include "gregorian-init.ly"
5855 \notes \transpose c c' {
5857 \[ \oriscus g \pes \virga b \]
5864 \remove "Bar_number_engraver"
5868 \remove "Clef_engraver"
5869 \remove "Key_engraver"
5870 StaffSymbol \set #'transparent = ##t
5871 \remove "Time_signature_engraver"
5872 \remove "Bar_engraver"
5873 minimumVerticalExtent = ##f
5877 \remove Ligature_bracket_engraver
5878 \consists Vaticana_ligature_engraver
5879 NoteHead \set #'style = #'vaticana_punctum
5880 Stem \set #'transparent = ##t
5886 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5887 \include "gregorian-init.ly"
5889 \notes \transpose c c' {
5890 % Pes Quassus Auctus Descendens
5891 \[ \oriscus g \pes \auctum \descendens b \]
5898 \remove "Bar_number_engraver"
5902 \remove "Clef_engraver"
5903 \remove "Key_engraver"
5904 StaffSymbol \set #'transparent = ##t
5905 \remove "Time_signature_engraver"
5906 \remove "Bar_engraver"
5907 minimumVerticalExtent = ##f
5911 \remove Ligature_bracket_engraver
5912 \consists Vaticana_ligature_engraver
5913 NoteHead \set #'style = #'vaticana_punctum
5914 Stem \set #'transparent = ##t
5922 @code{8. Quilisma Pes}
5924 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5925 \include "gregorian-init.ly"
5927 \notes \transpose c c' {
5929 \[ \quilisma g \pes b \]
5936 \remove "Bar_number_engraver"
5940 \remove "Clef_engraver"
5941 \remove "Key_engraver"
5942 StaffSymbol \set #'transparent = ##t
5943 \remove "Time_signature_engraver"
5944 \remove "Bar_engraver"
5945 minimumVerticalExtent = ##f
5949 \remove Ligature_bracket_engraver
5950 \consists Vaticana_ligature_engraver
5951 NoteHead \set #'style = #'vaticana_punctum
5952 Stem \set #'transparent = ##t
5958 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5959 \include "gregorian-init.ly"
5961 \notes \transpose c c' {
5962 % Quilisma Pes Auctus Descendens
5963 \[ \quilisma g \pes \auctum \descendens b \]
5970 \remove "Bar_number_engraver"
5974 \remove "Clef_engraver"
5975 \remove "Key_engraver"
5976 StaffSymbol \set #'transparent = ##t
5977 \remove "Time_signature_engraver"
5978 \remove "Bar_engraver"
5979 minimumVerticalExtent = ##f
5983 \remove Ligature_bracket_engraver
5984 \consists Vaticana_ligature_engraver
5985 NoteHead \set #'style = #'vaticana_punctum
5986 Stem \set #'transparent = ##t
5994 @code{9. Podatus Initio Debilis}
5996 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
5997 \include "gregorian-init.ly"
5999 \notes \transpose c c' {
6000 % Pes Initio Debilis
6001 \[ \deminutum g \pes b \]
6008 \remove "Bar_number_engraver"
6012 \remove "Clef_engraver"
6013 \remove "Key_engraver"
6014 StaffSymbol \set #'transparent = ##t
6015 \remove "Time_signature_engraver"
6016 \remove "Bar_engraver"
6017 minimumVerticalExtent = ##f
6021 \remove Ligature_bracket_engraver
6022 \consists Vaticana_ligature_engraver
6023 NoteHead \set #'style = #'vaticana_punctum
6024 Stem \set #'transparent = ##t
6030 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6031 \include "gregorian-init.ly"
6033 \notes \transpose c c' {
6034 % Pes Auctus Descendens Initio Debilis
6035 \[ \deminutum g \pes \auctum \descendens b \]
6042 \remove "Bar_number_engraver"
6046 \remove "Clef_engraver"
6047 \remove "Key_engraver"
6048 StaffSymbol \set #'transparent = ##t
6049 \remove "Time_signature_engraver"
6050 \remove "Bar_engraver"
6051 minimumVerticalExtent = ##f
6055 \remove Ligature_bracket_engraver
6056 \consists Vaticana_ligature_engraver
6057 NoteHead \set #'style = #'vaticana_punctum
6058 Stem \set #'transparent = ##t
6068 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6069 \include "gregorian-init.ly"
6071 \notes \transpose c c' {
6073 \[ a \pes b \flexa g \]
6080 \remove "Bar_number_engraver"
6084 \remove "Clef_engraver"
6085 \remove "Key_engraver"
6086 StaffSymbol \set #'transparent = ##t
6087 \remove "Time_signature_engraver"
6088 \remove "Bar_engraver"
6089 minimumVerticalExtent = ##f
6093 \remove Ligature_bracket_engraver
6094 \consists Vaticana_ligature_engraver
6095 NoteHead \set #'style = #'vaticana_punctum
6096 Stem \set #'transparent = ##t
6102 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6103 \include "gregorian-init.ly"
6105 \notes \transpose c c' {
6106 % Torculus Auctus Descendens
6107 \[ a \pes b \flexa \auctum \descendens g \]
6114 \remove "Bar_number_engraver"
6118 \remove "Clef_engraver"
6119 \remove "Key_engraver"
6120 StaffSymbol \set #'transparent = ##t
6121 \remove "Time_signature_engraver"
6122 \remove "Bar_engraver"
6123 minimumVerticalExtent = ##f
6127 \remove Ligature_bracket_engraver
6128 \consists Vaticana_ligature_engraver
6129 NoteHead \set #'style = #'vaticana_punctum
6130 Stem \set #'transparent = ##t
6136 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6137 \include "gregorian-init.ly"
6139 \notes \transpose c c' {
6140 % Torculus Deminutus
6141 \[ a \pes b \flexa \deminutum g \]
6148 \remove "Bar_number_engraver"
6152 \remove "Clef_engraver"
6153 \remove "Key_engraver"
6154 StaffSymbol \set #'transparent = ##t
6155 \remove "Time_signature_engraver"
6156 \remove "Bar_engraver"
6157 minimumVerticalExtent = ##f
6161 \remove Ligature_bracket_engraver
6162 \consists Vaticana_ligature_engraver
6163 NoteHead \set #'style = #'vaticana_punctum
6164 Stem \set #'transparent = ##t
6171 @code{11. Torculus Initio Debilis}
6173 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6174 \include "gregorian-init.ly"
6176 \notes \transpose c c' {
6177 % Torculus Initio Debilis
6178 \[ \deminutum a \pes b \flexa g \]
6185 \remove "Bar_number_engraver"
6189 \remove "Clef_engraver"
6190 \remove "Key_engraver"
6191 StaffSymbol \set #'transparent = ##t
6192 \remove "Time_signature_engraver"
6193 \remove "Bar_engraver"
6194 minimumVerticalExtent = ##f
6198 \remove Ligature_bracket_engraver
6199 \consists Vaticana_ligature_engraver
6200 NoteHead \set #'style = #'vaticana_punctum
6201 Stem \set #'transparent = ##t
6207 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6208 \include "gregorian-init.ly"
6210 \notes \transpose c c' {
6211 % Torculus Auctus Descendens Initio Debilis
6212 \[ \deminutum a \pes b \flexa \auctum \descendens g \]
6219 \remove "Bar_number_engraver"
6223 \remove "Clef_engraver"
6224 \remove "Key_engraver"
6225 StaffSymbol \set #'transparent = ##t
6226 \remove "Time_signature_engraver"
6227 \remove "Bar_engraver"
6228 minimumVerticalExtent = ##f
6232 \remove Ligature_bracket_engraver
6233 \consists Vaticana_ligature_engraver
6234 NoteHead \set #'style = #'vaticana_punctum
6235 Stem \set #'transparent = ##t
6241 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6242 \include "gregorian-init.ly"
6244 \notes \transpose c c' {
6245 % Torculus Deminutus Initio Debilis
6246 \[ \deminutum a \pes b \flexa \deminutum g \]
6253 \remove "Bar_number_engraver"
6257 \remove "Clef_engraver"
6258 \remove "Key_engraver"
6259 StaffSymbol \set #'transparent = ##t
6260 \remove "Time_signature_engraver"
6261 \remove "Bar_engraver"
6262 minimumVerticalExtent = ##f
6266 \remove Ligature_bracket_engraver
6267 \consists Vaticana_ligature_engraver
6268 NoteHead \set #'style = #'vaticana_punctum
6269 Stem \set #'transparent = ##t
6276 @code{12. Porrectus}
6278 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6279 \include "gregorian-init.ly"
6281 \notes \transpose c c' {
6283 \[ a \flexa g \pes b \]
6290 \remove "Bar_number_engraver"
6294 \remove "Clef_engraver"
6295 \remove "Key_engraver"
6296 StaffSymbol \set #'transparent = ##t
6297 \remove "Time_signature_engraver"
6298 \remove "Bar_engraver"
6299 minimumVerticalExtent = ##f
6303 \remove Ligature_bracket_engraver
6304 \consists Vaticana_ligature_engraver
6305 NoteHead \set #'style = #'vaticana_punctum
6306 Stem \set #'transparent = ##t
6312 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6313 \include "gregorian-init.ly"
6315 \notes \transpose c c' {
6316 % Porrectus Auctus Descendens
6317 \[ a \flexa g \pes \auctum \descendens b \]
6324 \remove "Bar_number_engraver"
6328 \remove "Clef_engraver"
6329 \remove "Key_engraver"
6330 StaffSymbol \set #'transparent = ##t
6331 \remove "Time_signature_engraver"
6332 \remove "Bar_engraver"
6333 minimumVerticalExtent = ##f
6337 \remove Ligature_bracket_engraver
6338 \consists Vaticana_ligature_engraver
6339 NoteHead \set #'style = #'vaticana_punctum
6340 Stem \set #'transparent = ##t
6346 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6347 \include "gregorian-init.ly"
6349 \notes \transpose c c' {
6350 % Porrectus Deminutus
6351 \[ a \flexa g \pes \deminutum b \]
6358 \remove "Bar_number_engraver"
6362 \remove "Clef_engraver"
6363 \remove "Key_engraver"
6364 StaffSymbol \set #'transparent = ##t
6365 \remove "Time_signature_engraver"
6366 \remove "Bar_engraver"
6367 minimumVerticalExtent = ##f
6371 \remove Ligature_bracket_engraver
6372 \consists Vaticana_ligature_engraver
6373 NoteHead \set #'style = #'vaticana_punctum
6374 Stem \set #'transparent = ##t
6383 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6384 \include "gregorian-init.ly"
6386 \notes \transpose c c' {
6388 \[ \virga b \inclinatum a \inclinatum g \]
6395 \remove "Bar_number_engraver"
6399 \remove "Clef_engraver"
6400 \remove "Key_engraver"
6401 StaffSymbol \set #'transparent = ##t
6402 \remove "Time_signature_engraver"
6403 \remove "Bar_engraver"
6404 minimumVerticalExtent = ##f
6408 \remove Ligature_bracket_engraver
6409 \consists Vaticana_ligature_engraver
6410 NoteHead \set #'style = #'vaticana_punctum
6411 Stem \set #'transparent = ##t
6417 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6418 \include "gregorian-init.ly"
6420 \notes \transpose c c' {
6422 \[ \virga b \inclinatum a \inclinatum \auctum g \]
6429 \remove "Bar_number_engraver"
6433 \remove "Clef_engraver"
6434 \remove "Key_engraver"
6435 StaffSymbol \set #'transparent = ##t
6436 \remove "Time_signature_engraver"
6437 \remove "Bar_engraver"
6438 minimumVerticalExtent = ##f
6442 \remove Ligature_bracket_engraver
6443 \consists Vaticana_ligature_engraver
6444 NoteHead \set #'style = #'vaticana_punctum
6445 Stem \set #'transparent = ##t
6451 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6452 \include "gregorian-init.ly"
6454 \notes \transpose c c' {
6455 % Climacus Deminutus
6456 \[ \virga b \inclinatum a \inclinatum \deminutum g \]
6463 \remove "Bar_number_engraver"
6467 \remove "Clef_engraver"
6468 \remove "Key_engraver"
6469 StaffSymbol \set #'transparent = ##t
6470 \remove "Time_signature_engraver"
6471 \remove "Bar_engraver"
6472 minimumVerticalExtent = ##f
6476 \remove Ligature_bracket_engraver
6477 \consists Vaticana_ligature_engraver
6478 NoteHead \set #'style = #'vaticana_punctum
6479 Stem \set #'transparent = ##t
6486 @code{14. Scandicus}
6488 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6489 \include "gregorian-init.ly"
6491 \notes \transpose c c' {
6493 \[ g \pes a \virga b \]
6500 \remove "Bar_number_engraver"
6504 \remove "Clef_engraver"
6505 \remove "Key_engraver"
6506 StaffSymbol \set #'transparent = ##t
6507 \remove "Time_signature_engraver"
6508 \remove "Bar_engraver"
6509 minimumVerticalExtent = ##f
6513 \remove Ligature_bracket_engraver
6514 \consists Vaticana_ligature_engraver
6515 NoteHead \set #'style = #'vaticana_punctum
6516 Stem \set #'transparent = ##t
6522 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6523 \include "gregorian-init.ly"
6525 \notes \transpose c c' {
6526 % Scandicus Auctus Descendens
6527 \[ g \pes a \pes \auctum \descendens b \]
6534 \remove "Bar_number_engraver"
6538 \remove "Clef_engraver"
6539 \remove "Key_engraver"
6540 StaffSymbol \set #'transparent = ##t
6541 \remove "Time_signature_engraver"
6542 \remove "Bar_engraver"
6543 minimumVerticalExtent = ##f
6547 \remove Ligature_bracket_engraver
6548 \consists Vaticana_ligature_engraver
6549 NoteHead \set #'style = #'vaticana_punctum
6550 Stem \set #'transparent = ##t
6556 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6557 \include "gregorian-init.ly"
6559 \notes \transpose c c' {
6560 % Scandicus Deminutus
6561 \[ g \pes a \pes \deminutum b \]
6568 \remove "Bar_number_engraver"
6572 \remove "Clef_engraver"
6573 \remove "Key_engraver"
6574 StaffSymbol \set #'transparent = ##t
6575 \remove "Time_signature_engraver"
6576 \remove "Bar_engraver"
6577 minimumVerticalExtent = ##f
6581 \remove Ligature_bracket_engraver
6582 \consists Vaticana_ligature_engraver
6583 NoteHead \set #'style = #'vaticana_punctum
6584 Stem \set #'transparent = ##t
6593 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6594 \include "gregorian-init.ly"
6596 \notes \transpose c c' {
6598 \[ g \oriscus a \pes \virga b \]
6605 \remove "Bar_number_engraver"
6609 \remove "Clef_engraver"
6610 \remove "Key_engraver"
6611 StaffSymbol \set #'transparent = ##t
6612 \remove "Time_signature_engraver"
6613 \remove "Bar_engraver"
6614 minimumVerticalExtent = ##f
6618 \remove Ligature_bracket_engraver
6619 \consists Vaticana_ligature_engraver
6620 NoteHead \set #'style = #'vaticana_punctum
6621 Stem \set #'transparent = ##t
6627 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6628 \include "gregorian-init.ly"
6630 \notes \transpose c c' {
6631 % Salicus Auctus Descendens
6632 \[ g \oriscus a \pes \auctum \descendens b \]
6639 \remove "Bar_number_engraver"
6643 \remove "Clef_engraver"
6644 \remove "Key_engraver"
6645 StaffSymbol \set #'transparent = ##t
6646 \remove "Time_signature_engraver"
6647 \remove "Bar_engraver"
6648 minimumVerticalExtent = ##f
6652 \remove Ligature_bracket_engraver
6653 \consists Vaticana_ligature_engraver
6654 NoteHead \set #'style = #'vaticana_punctum
6655 Stem \set #'transparent = ##t
6665 @lilypond[noindent, 26pt, nofragment, linewidth=1.0cm]
6666 \include "gregorian-init.ly"
6668 \notes \transpose c c' {
6670 \[ \stropha b \stropha b \stropha a \]
6677 \remove "Bar_number_engraver"
6681 \remove "Clef_engraver"
6682 \remove "Key_engraver"
6683 StaffSymbol \set #'transparent = ##t
6684 \remove "Time_signature_engraver"
6685 \remove "Bar_engraver"
6686 minimumVerticalExtent = ##f
6690 \remove Ligature_bracket_engraver
6691 \consists Vaticana_ligature_engraver
6692 NoteHead \set #'style = #'vaticana_punctum
6693 Stem \set #'transparent = ##t
6705 Unlike most other neumes notation systems, the input language for
6706 neumes does not necessarily reflect directly the typographical
6707 appearance, but is designed to solely focuse on musical meaning. For
6708 example, @code{\[ a \pes b \flexa g \]} produces a Torculus consisting
6709 of three Punctum heads, while @code{\[ a \flexa g \pes b \]} produces
6710 a Porrectus with a curved flexa shape and only a single Punctum head.
6711 There is no command to explicitly typeset the curved flexa shape; the
6712 decision of when to typeset a curved flexa shape is purely taken from
6713 the musical input. The idea of this approach is to separate the
6714 musical aspects of the input from the notation style of the output.
6715 This way, the same input can be reused to typeset the same music in a
6716 different style of Gregorian chant notation such as Hufnagel (also
6717 known as German gothic neumes) or Medicaea (kind of a very simple
6718 forerunner of the Editio Vaticana). As soon as Hufnagel ligature
6719 engraver and Medicaea ligature engraver will have been implemented, it
6720 will be as simple as replacing the ligature engraver in the
6721 @internalsref{Voice} context to get the desired notation style from
6724 The following table shows the code fragments that produce the
6725 ligatures in the above neumes table. The letter in the first column
6726 in each line of the below table indicates to which ligature in the
6727 above table it refers. The second column gives the name of the
6728 ligature. The third column shows the code fragment that produces this
6729 ligature, using @code{g}, @code{a} and @code{b} as example pitches.
6731 @multitable @columnfractions .1 .4 .5
6745 Punctum Inclinatum @tab
6746 @code{\[ \inclinatum b \]}
6750 Punctum Auctum Ascendens @tab
6751 @code{\[ \auctum \ascendens b \]}
6755 Punctum Auctum Descendens @tab
6756 @code{\[ \auctum \descendens b \]}
6760 Punctum Inclinatum Auctum @tab
6761 @code{\[ \inclinatum \auctum b \]}
6765 Punctum Inclinatum Parvum @tab
6766 @code{\[ \inclinatum \deminutum b \]}
6771 @code{\[ \virga b \]}
6776 @code{\[ \stropha b \]}
6781 @code{\[ \stropha \auctum b \]}
6786 @code{\[ \oriscus b \]}
6790 Clivis vel Flexa @tab
6791 @code{\[ b \flexa g \]}
6795 Clivis Aucta Descendens @tab
6796 @code{\[ b \flexa \auctum \descendens g \]}
6800 Clivis Aucta Ascendens @tab
6801 @code{\[ b \flexa \auctum \ascendens g \]}
6806 @code{\[ b \flexa \deminutum g \]}
6810 Podatus vel Pes @tab
6811 @code{\[ g \pes b \]}
6815 Pes Auctus Descendens @tab
6816 @code{\[ g \pes \auctum \descendens b \]}
6820 Pes Auctus Ascendens @tab
6821 @code{\[ g \pes \auctum \ascendens b \]}
6826 @code{\[ g \pes \deminutum b \]}
6831 @code{\[ \oriscus g \pes \virga b \]}
6835 Pes Quassus Auctus Descendens @tab
6836 @code{\[ \oriscus g \pes \auctum \descendens b \]}
6841 @code{\[ \quilisma g \pes b \]}
6845 Quilisma Pes Auctus Descendens @tab
6846 @code{\[ \quilisma g \pes \auctum \descendens b \]}
6850 Pes Initio Debilis @tab
6851 @code{\[ \deminutum g \pes b \]}
6855 Pes Auctus Descendens Initio Debilis @tab
6856 @code{\[ \deminutum g \pes \auctum \descendens b \]}
6861 @code{\[ a \pes b \flexa g \]}
6865 Torculus Auctus Descendens @tab
6866 @code{\[ a \pes b \flexa \auctum \descendens g \]}
6870 Torculus Deminutus @tab
6871 @code{\[ a \pes b \flexa \deminutum g \]}
6875 Torculus Initio Debilis @tab
6876 @code{\[ \deminutum a \pes b \flexa g \]}
6880 Torculus Auctus Descendens Initio Debilis @tab
6881 @code{\[ \deminutum a \pes b \flexa \auctum \descendens g \]}
6885 Torculus Deminutus Initio Debilis @tab
6886 @code{\[ \deminutum a \pes b \flexa \deminutum g \]}
6891 @code{\[ a \flexa g \pes b \]}
6895 Porrectus Auctus Descendens @tab
6896 @code{\[ a \flexa g \pes \auctum \descendens b \]}
6900 Porrectus Deminutus @tab
6901 @code{\[ a \flexa g \pes \deminutum b \]}
6906 @code{\[ \virga b \inclinatum a \inclinatum g \]}
6910 Climacus Auctus @tab
6911 @code{\[ \virga b \inclinatum a \inclinatum \auctum g \]}
6915 Climacus Deminutus @tab
6916 @code{\[ \virga b \inclinatum a \inclinatum \deminutum g \]}
6921 @code{\[ g \pes a \virga b \]}
6925 Scandicus Auctus Descendens @tab
6926 @code{\[ g \pes a \pes \auctum \descendens b \]}
6930 Scandicus Deminutus @tab
6931 @code{\[ g \pes a \pes \deminutum b \]}
6936 @code{\[ g \oriscus a \pes \virga b \]}
6940 Salicus Auctus Descendens @tab
6941 @code{\[ g \oriscus a \pes \auctum \descendens b \]}
6946 @code{\[ \stropha b \stropha b \stropha a \]}
6952 The following head prefixes are supported:
6954 @cindex @code{\virga}
6956 @cindex @code{\stropha}
6958 @cindex @code{\inclinatum}
6960 @cindex @code{\auctum}
6962 @cindex @code{\descendens}
6964 @cindex @code{\ascendens}
6966 @cindex @code{\oriscus}
6968 @cindex @code{\quilisma}
6970 @cindex @code{\deminutum}
6973 Head prefixes can be accumulated, though restrictions apply. For
6974 example, either @code{\descendens} or @code{\ascendens} can be applied
6975 to a head, but not both to the same head.
6978 @cindex @code{\flexa}
6979 Two adjacent heads can be tied together with the @code{\pes} and
6980 @code{\flexa} infix commands for a rising and falling line of melody,
6985 Scandicus Deminutus: Punctum Auctum Ascendens overlaps with
6986 Semivocalis head; this looks awful.
6988 Trigonus: apply equal spacing, regardless of pitch.
6990 Flexa and similar figurae: the left appendix should be adjusted with
6991 respect to the position of this head (on staffline or on staffspace)
6992 and the vertical position of the subsequent head.
6995 @subsection Figured bass
6997 @cindex Basso continuo
6999 @c TODO: musicological blurb about FB
7003 LilyPond has limited support for figured bass:
7005 @lilypond[verbatim,fragment]
7007 \context Voice \notes { \clef bass dis4 c d ais}
7008 \context FiguredBass
7010 < 6 >4 < 7 >8 < 6+ [_!] >
7016 The support for figured bass consists of two parts: there is an input
7017 mode, introduced by @code{\figures}, where you can enter bass figures
7018 as numbers, and there is a context called @internalsref{FiguredBass} that
7019 takes care of making @internalsref{BassFigure} objects.
7021 In figures input mode, a group of bass figures is delimited by
7022 @code{<} and @code{>}. The duration is entered after the @code{>}:
7027 \context FiguredBass
7031 Accidentals are added when you append @code{-}, @code{!} and @code{+}
7038 \context FiguredBass
7039 \figures { <4- 6+ 7!> }
7042 Spaces or dashes may be inserted by using @code{_}. Brackets are
7043 introduced with @code{[} and @code{]}:
7049 \context FiguredBass
7050 \figures { < [4 6] 8 [_! 12]> }
7053 Although the support for figured bass may superficially resemble chord
7054 support, it works much simpler. The @code{\figures} mode simply
7055 stores the numbers , and @internalsref{FiguredBass} context prints
7056 them as entered. There is no conversion to pitches, and no
7057 realizations of the bass are played in the MIDI file.
7059 Internally, the code produces markup texts. You can use any of the
7060 markup text properties to override formatting. For example, the
7061 vertical spacing of the figures may be set with @code{baseline-skip}.
7065 @internalsref{BassFigureEvent} music, @internalsref{BassFigure} object,
7066 and @internalsref{FiguredBass} context.
7070 Slash notation for alterations is not supported.
7073 @node Vaticana style contexts
7074 @subsection Vaticana style contexts
7076 @cindex VaticanaVoiceContext
7077 @cindex VaticanaStaffContext
7079 The predefined @code{VaticanaVoiceContext} and
7080 @code{VaticanaStaffContext} can be used to easily engrave a piece of
7081 Gregorian Chant in the style of the Editio Vaticana. These contexts
7082 initialize all relevant context properties and grob properties to
7083 proper values. With these contexts, you can immediately go ahead
7084 entering the chant, as the following short excerpt demonstrates:
7086 @lilypond[raggedright,verbatim,noindent]
7087 \include "gregorian-init.ly"
7090 \context VaticanaVoice {
7091 \property Score.BarNumber \set #'transparent = ##t
7093 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7094 \[ f( \pes a c' c' \pes d') \] c' \divisioMinima \break
7095 \[ c'( c' \flexa a \] \[ a \flexa \deminutum g) \] f \divisioMinima
7098 \context Lyrics \lyrics {
7099 San- ctus, San- ctus, San- ctus
7104 @node Contemporary notation
7105 @section Contemporary notation
7107 In the 20th century, composers have greatly expanded the musical
7108 vocabulary. With this expansion, many innovations in musical notation
7109 have been tried. For a comprehensive overview, refer to @cite{Stone
7110 1980} (see @ref{Literature}). In general, the use of new, innovative
7111 notation makes a piece harder to understand and perform and its use
7112 should therefore be avoided if possible. For this reason, support for
7113 contemporary notation in LilyPond is limited.
7122 @subsection Clusters
7126 In musical terminology, a @emph{cluster} denotes a range of
7127 simultaneously sounding pitches that may change over time. The set of
7128 available pitches to apply usually depends on the accoustic source.
7129 Thus, in piano music, a cluster typically consists of a continous range
7130 of the semitones as provided by the piano's fixed set of a chromatic
7131 scale. In choral music, each singer of the choir typically may sing an
7132 arbitrary pitch within the cluster's range that is not bound to any
7133 diatonic, chromatic or other scale. In electronic music, a cluster
7134 (theoretically) may even cover a continuous range of pitches, thus
7135 resulting in coloured noise, such as pink noise.
7137 Clusters can be denoted in the context of ordinary staff notation by
7138 engraving simple geometrical shapes that replace ordinary notation of
7139 notes. Ordinary notes as musical events specify starting time and
7140 duration of pitches; however, the duration of a note is expressed by the
7141 shape of the note head rather than by the horizontal graphical extent of
7142 the note symbol. In contrast, the shape of a cluster geometrically
7143 describes the development of a range of pitches (vertical extent) over
7144 time (horizontal extent). Still, the geometrical shape of a cluster
7145 covers the area in wich any single pitch contained in the cluster would
7146 be notated as an ordinary note. From this point of view, it is
7147 reasonable to specify a cluster as the envelope of a set of notes.
7151 A cluster is engraved as the envelope of a set of
7152 cluster-notes. Cluster notes are created by applying the function
7153 @code{notes-to-clusters} to a sequence of chords, e.g.
7155 @lilypond[relative 1,verbatim]
7156 \apply #notes-to-clusters { <<c e >> <<b f'>> }
7159 The following example (from
7160 @inputfileref{input/regression,cluster.ly}) shows what the result
7163 @lilypondfile[notexidoc]{cluster.ly}
7165 By default, @internalsref{Cluster_spanner_engraver} is in the
7166 @internalsref{Voice} context. This allows putting ordinary notes and
7167 clusters together in the same staff, even simultaneously. In such a
7168 case no attempt is made to automatically avoid collisions between
7169 ordinary notes and clusters.
7173 @internalsref{ClusterSpanner}, @internalsref{ClusterSpannerBeacon},
7174 @inputfileref{input/regression,cluster.ly},
7175 @internalsref{Cluster_spanner_engraver}, and @internalsref{ClusterNoteEvent}.
7179 Music expressions like @code{< @{ g8 e8 @} a4 >} are not printed
7180 accurately. Use @code{<<g a>>8 <<e a>>8} instead.
7185 @subsection Fermatas
7191 Contemporary music notation frequently uses special fermata symbols to
7192 indicate fermatas of differing lengths.
7196 The following are supported
7198 @lilypond[singleline]
7200 < \addlyrics \notes {
7220 \context Lyrics \lyrics {
7221 "shortfermata" "fermata" "longfermata" "verylongfermata"
7226 See @ref{Articulations} for general instructions how to apply scripts
7227 such as fermatas to a @code{\notes@{@}} block.
7230 @section Tuning output
7232 There are situations where default layout decisions are not
7233 sufficient. In this section we discuss ways to override these
7236 Formatting is internally done by manipulating so called objects
7237 (graphic objects). Each object carries with it a set of properties
7238 (object or layout properties) specific to that object. For example, a
7239 stem object has properties that specify its direction, length and
7242 The most direct way of tuning the output is by altering the values of
7243 these properties. There are two ways of doing that: first, you can
7244 temporarily change the definition of one type of object, thus
7245 affecting a whole set of objects. Second, you can select one specific
7246 object, and set a layout property in that object.
7248 Do not confuse layout properties with translation
7249 properties. Translation properties always use a mixed caps style
7250 naming, and are manipulated using @code{\property}:
7252 \property Context.propertyName = @var{value}
7254 Layout properties are use Scheme style variable naming, i.e. lower
7255 case words separated with dashes. They are symbols, and should always
7256 be quoted using @code{#'}. For example, this could be an imaginary
7257 layout property name:
7259 #'layout-property-name
7264 * Constructing a tweak::
7273 @node Tuning objects
7274 @subsection Tuning objects
7276 @cindex object description
7278 The definition of an object is a list of default object
7279 properties. For example, the definition of the Stem object (available
7280 in @file{scm/define-grobs.scm}), includes the following definitions
7281 for @internalsref{Stem}:
7285 (beamed-lengths . (0.0 2.5 2.0 1.5))
7286 (Y-extent-callback . ,Stem::height)
7291 Adding variables on top of this existing definition overrides the
7292 system default, and alters the resulting appearance of the layout
7298 Changing a variable for only one object is commonly achieved with
7302 \once \property @var{context}.@var{objectname}
7303 \override @var{symbol} = @var{value}
7305 Here @var{symbol} is a Scheme expression of symbol type, @var{context}
7306 and @var{objectname} is a string and @var{value} is a Scheme expression.
7307 This command applies a setting only during one moment in the score.
7309 In the following example, only one @internalsref{Stem} object is
7310 changed from its original setting:
7312 @lilypond[verbatim, fragment, relative=1]
7314 \once \property Voice.Stem \set #'thickness = #4
7318 @cindex @code{\once}
7320 For changing more objects, the same command, without @code{\once} can
7323 \property @var{context}.@var{objectname} \override @var{symbol} = @var{value}
7325 This command adds @code{@var{symbol} = @var{value}} to the definition
7326 of @var{objectname} in the context @var{context}, and this definition
7327 stays in place until it is removed.
7329 An existing definition may be removed by the following command:
7332 \property @var{context}.@var{objectname} \revert @var{symbol}
7335 All @code{\override} and @code{\revert} commands should be balanced.
7336 The @code{\set} shorthand performs a revert followed by an override,
7337 and is often more convenient to use
7340 \property @var{context}.@var{objectname} \set @var{symbol} = @var{value}
7344 @lilypond[verbatim,quote]
7345 c'4 \property Voice.Stem \override #'thickness = #4.0
7347 c'4 \property Voice.Stem \revert #'thickness
7351 The following example gives exactly the same result as the previous
7352 one (assuming the system default for stem thickness is 1.3):
7354 @lilypond[verbatim,quote]
7355 c'4 \property Voice.Stem \set #'thickness = #4.0
7357 c'4 \property Voice.Stem \set #'thickness = #1.3
7361 Reverting a setting which was not set in the first place has no
7362 effect. However, if the setting was set as a system default, this may
7363 remove the default value, and this may give surprising results,
7364 including crashes. In other words, @code{\override} and
7365 @code{\revert} must be carefully balanced. The following are examples
7366 of correct nesting of @code{\override}, @code{\set}, @code{\revert}:
7370 a clumsy but correct form:
7372 \override \revert \override \revert \override \revert
7376 shorter version of the same:
7378 \override \set \set \revert
7382 a short form, using only @code{\set}. This requires you to know the
7385 \set \set \set \set @var{to default value}
7389 if there is no default (i.e. by default, the object property is unset),
7392 \set \set \set \revert
7396 For the digirati, the object description is an Scheme association
7397 list. Since a Scheme list is a singly linked list, we can treat it as
7398 a stack, and @code{\override} and @code{\revert} are push and pop
7399 operations. The association list is stored in a normal context
7402 \property Voice.NoteHead = #'()
7404 will effectively erase @internalsref{NoteHead}s from the current
7405 @internalsref{Voice}. However, this mechanism is not guaranteed to
7406 work, and may cause crashes or other anomalous behavior.
7410 @internalsref{OverrideProperty}, @internalsref{RevertProperty},
7411 @internalsref{PropertySet}, @internalsref{All-backend-properties}, and
7412 @internalsref{All-layout-objects}.
7417 The backend is not very strict in type-checking object properties.
7418 Cyclic references in @var{value} cause hangs and/or crashes.
7419 Similarly, reverting properties that are system defaults may also lead
7422 @node Constructing a tweak
7423 @subsection Constructing a tweak
7426 @cindex internal documentation
7427 @cindex finding graphical objects
7428 @cindex graphical object descriptions
7430 @cindex @code{\override}
7432 @cindex internal documentation
7436 Three pieces of information are required to use @code{\override} and
7437 @code{\set}: the name of the layout object, the context and the name
7438 of the property. We demonstrate how to glean this information from
7439 the notation manual and the generated documentation.
7441 The generated documentation is a set of HTML pages which should be
7442 included if you installed a binary distribution, typically in
7443 @file{/usr/share/doc/lilypond}. They are also available on the web:
7444 go to the @uref{http://lilypond.org,LilyPond website}, click
7445 ``Documentation'', and then ``Program reference'' on the side bar. It
7446 is advisable to bookmark either the local HTML files if possible. They
7447 will load faster than the ones on the web. If you use the version
7448 from the web, you must check whether the documentation matches the
7449 program version: the documentation is generated from the definitions
7450 that the program uses, and therefore it is strongly tied to the
7454 @c [TODO: revise for new site.]
7456 Suppose we want to move the fingering indication in the fragment below:
7458 @lilypond[relative=2,verbatim]
7464 If you visit the documentation of @code{Fingering} (in @ref{Fingering
7465 instructions}), you will notice that there is written:
7470 @internalsref{FingerEvent} and @internalsref{Fingering}.
7474 In other words, the fingerings once entered, are internally stored as
7475 @code{FingerEvent} music objects. When printed, a @code{Fingering}
7476 layout object is created for every @code{FingerEvent}.
7478 The Fingering object has a number of different functions, and each of
7479 those is captured in an interface, when we look up
7480 @internalsref{Fingering} in the generated documentation.
7484 The @code{Fingering} object has a fixed size
7485 (@internalsref{item-interface}), the symbol is a piece of text
7486 (@internalsref{text-interface}), whose font can be set
7487 (@internalsref{font-interface}). It is centered horizontally
7488 (@internalsref{self-alignment-interface}), it is placed next to other
7489 objects (@internalsref{side-position-interface}) vertically, and its
7490 placement is coordinated with other scripts
7491 (@internalsref{text-script-interface}). It also has the standard
7492 @internalsref{grob-interface} (grob stands for Graphical object)
7494 @cindex graphical object
7495 @cindex layout object
7496 @cindex object, layout
7497 with all the variables that come with
7498 it. Finally, it denotes a fingering instruction, so it has
7499 @internalsref{finger-interface}.
7501 For the vertical placement, we have to look under
7502 @code{side-position-interface}:
7504 @code{side-position-interface}
7506 Position a victim object (this one) next to other objects (the
7507 support). In this case, the direction signifies where to put the
7508 victim object relative to the support (left or right, up or down?)
7513 below this description, the variable @code{padding} is described as
7517 (dimension, in staff space)
7519 add this much extra space between objects that are next to each
7520 other. Default value: @code{0.6}
7524 By increasing the value of @code{padding}, we can move away the
7525 fingering. The following command inserts 3 staff spaces of white
7526 between the note and the fingering:
7528 \once \property Voice.Fingering \set #'padding = #3
7531 Inserting this command before the Fingering object is created,
7532 i.e. before @code{c2}, yields the following result:
7534 @lilypond[relative=2,fragment,verbatim]
7535 \once \property Voice.Fingering
7542 The context name @code{Voice} in the example above can be determined
7543 as follows. In the documentation for @internalsref{Fingering}, it says
7545 Fingering grobs are created by: @internalsref{Fingering_engraver}
7548 Clicking @code{Fingering_engraver} shows the documentation of
7549 the module responsible for interpreting the fingering instructions and
7550 translating them to a @code{Fingering} object. Such a module is called
7551 an @emph{engraver}. The documentation of the @code{Fingering_engraver}
7554 Fingering_engraver is part of contexts: Voice
7556 so tuning the settings for Fingering should be done with
7558 \property Voice.Fingering \set @dots{}
7561 Of course, the tweak may also done in a larger context than
7562 @code{Voice}, for example, @internalsref{Staff} or
7563 @internalsref{Score}.
7565 The internals document also contains alphabetical lists of
7566 @internalsref{Contexts}, @internalsref{All-layout-objects} and
7567 @internalsref{Music-expressions}, so you can also find which objects to
7568 tweak by browsing the internals document.
7572 @subsection Applyoutput
7574 The most versatile way of tuning an object is @code{\applyoutput}. Its
7577 \applyoutput @var{proc}
7581 where @var{proc} is a Scheme function, taking four arguments.
7583 When interpreted, the function @var{proc} is called for every layout object found
7584 in the context, with the following arguments:
7586 @item the layout object itself,
7587 @item the context where the layout object was created, and
7588 @item the context where @code{\applyoutput} is processed.
7591 In addition, the cause of the layout object, i.e. the music
7592 expression or object that was responsible for creating it, is in the
7593 object property @code{cause}. For example, for a note head, this is a
7594 @internalsref{NoteHead} event, and for a @internalsref{Stem} object,
7595 this is a @internalsref{NoteHead} object.
7598 @node Outputproperty
7599 @subsection Outputproperty
7601 @cindex @code{\outputproperty}
7603 Another way of tuning objects is the more arcane @code{\outputproperty}
7604 feature. The syntax is as follows:
7606 \outputproperty @var{predicate} @var{symbol} = @var{value}
7608 Here @code{predicate} is a Scheme function taking an object argument, and
7609 returning a boolean. This statement is processed by the
7610 @code{Output_property_engraver}. It instructs the engraver to feed all
7611 objects that it sees to @var{predicate}. Whenever the predicate returns
7612 true, the object property @var{symbol} will be set to @var{value}.
7614 You will need to combine this statement with @code{\context} to select
7615 the appropriate context to apply this to.
7616 @inputfileref{input/regression,output-property.ly} shows an example of
7617 the use of @code{\outputproperty}.
7621 This command is slated for removal. Please use the
7622 @code{\applyoutput} command, see @ref{Applyoutput}.
7625 @node Font selection
7626 @subsection Font selection
7628 The most common thing to change about the appearance of fonts is their
7629 size. The font size of any context can be easily changed by setting
7630 the @code{fontSize} property for that context. Its value is an
7631 integer: negative numbers make the font smaller, positive numbers
7632 larger. An example is given below:
7634 @lilypond[fragment,relative=1,verbatim,quote]
7635 c4 c4 \property Voice.fontSize = #-1
7638 This command will set @code{font-relative-size} (see below), and does
7639 not change the size of variable symbols, such as beams or slurs.
7642 One of the uses of @code{fontSize} is to get smaller symbol for cue
7643 notes. An elaborate example of those is in
7644 @inputfileref{input/test,cue-notes.ly}.
7646 @cindex magnification
7648 The size of the font may be scaled with the object property
7649 @code{font-magnification}. For example, @code{2.0} blows up all
7650 letters by a factor 2 in both directions.
7659 The font used for printing a object can be selected by setting
7660 @code{font-name}, e.g.
7662 \property Staff.TimeSignature
7663 \set #'font-name = #"cmr17"
7667 Any font can be used, as long as it is available to @TeX{}. Possible
7668 fonts include foreign fonts or fonts that do not belong to the
7669 Computer Modern font family.
7671 Font selection for the standard fonts, @TeX{}'s Computer Modern fonts,
7672 can also be adjusted with a more fine-grained mechanism. By setting
7673 the object properties described below, you can select a different font;
7674 all three mechanisms work for every object that supports
7675 @code{font-interface}:
7679 is a symbol indicating the general class of the typeface. Supported are
7680 @code{roman} (Computer Modern), @code{braces} (for piano staff
7681 braces), @code{music} (the standard music font, including ancient
7682 glyphs), @code{dynamic} (for dynamic signs) and @code{typewriter}.
7685 is a symbol indicating the shape of the font, there are typically several
7686 font shapes available for each font family. Choices are @code{italic},
7687 @code{caps} and @code{upright}.
7690 is a symbol indicating the series of the font. There are typically several
7691 font series for each font family and shape. Choices are @code{medium}
7694 @item font-relative-size
7695 is a number indicating the size relative the standard size. For example,
7696 with 20pt staff height, relative size -1 corresponds to 16pt staff
7697 height, and relative size +1 corresponds to 23 pt staff height.
7699 There are small differences in design between fonts designed for
7700 different sizes, hence @code{font-relative-size} is preferred over
7701 @code{font-magnification} for changing font sizes.
7704 @item font-design-size
7705 is a number indicating the design size of the font.
7707 This is a feature of the Computer Modern Font: each point size has a
7708 slightly different design. Smaller design sizes are relatively wider,
7709 which enhances readability.
7712 For any of these properties, the value @code{*} (i.e. the symbol
7713 @code{*}, entered as @code{#'*}), acts as a wildcard. This can be used
7714 to override default setting, which are always present. For example:
7716 \property Lyrics . LyricText \override #'font-series = #'bold
7717 \property Lyrics . LyricText \override #'font-family = #'typewriter
7718 \property Lyrics . LyricText \override #'font-shape = #'*
7721 @cindex @code{font-style}
7725 The following commands set @code{fontSize} for the current voice.
7727 @cindex @code{\tiny}
7729 @cindex @code{\small}
7731 @cindex @code{\normalsize}
7736 Relative size is not linked to any real size.
7738 There is no style sheet provided for other fonts besides the @TeX{}
7739 family, and the style sheet cannot be modified easily.
7741 @cindex font selection
7742 @cindex font magnification
7743 @cindex @code{font-interface}
7747 @subsection Text markup
7752 @cindex typeset text
7754 LilyPond has an internal mechanism to typeset texts. You can access it
7755 with the keyword @code{\markup}. Within markup mode, you can enter texts
7756 similar to lyrics: simply enter them, surrounded by spaces:
7759 @lilypond[verbatim,fragment,relative=1]
7760 c1^\markup { hello }
7761 c1_\markup { hi there }
7762 c1^\markup { hi \bold there, is \italic anyone home? }
7765 @cindex font switching
7767 The markup in the example demonstrates font switching commands. The
7768 command @code{\bold} and @code{\italic} only apply to the first
7769 following word; enclose a set of texts with braces to apply a command
7772 \markup @{ \bold @{ hi there @} @}
7776 For clarity, you can also do this for single arguments, e.g.
7778 \markup @{ is \italic @{ anyone @} home @}
7781 @cindex font size, texts
7783 The following size commands set absolute sizes:
7785 @cindex @code{\teeny}
7786 @cindex @code{\tiny}
7787 @cindex @code{\small}
7788 @cindex @code{\large}
7789 @cindex @code{\huge}
7799 You can also make letter larger or smaller relative to their neighbors,
7800 with the commands @code{\larger} and @code{\smaller}.
7804 @cindex font style, for texts
7805 @cindex @code{\bold}
7806 @cindex @code{\dynamic}
7807 @cindex @code{\number}
7808 @cindex @code{\italic}
7810 The following font change commands are defined:
7813 changes to the font used in dynamic signs. This font does not
7814 contain all characters of the alphabet, so when producing ``piu f'',
7815 the ``piu'' should be done in a different font.
7819 changes to the font used in time signatures. It only contains
7820 numbers and a few punctuation marks.
7822 changes @code{font-shape} to @code{italic}.
7824 changes @code{font-series} to @code{bold}.
7827 @cindex raising text
7828 @cindex lowering text
7830 @cindex translating text
7833 @cindex @code{\super}
7835 Raising and lowering texts can be done with @code{\super} and
7838 @lilypond[verbatim,fragment,relative=1]
7839 c1^\markup { E "=" mc \super "2" }
7842 @cindex @code{\raise}
7844 If you want to give an explicit amount for lowering or raising, use
7845 @code{\raise}. This command takes a Scheme valued first argument, and
7846 a markup object as second argument:
7848 @lilypond[verbatim,fragment,relative=1,quote]
7849 c1^\markup { C \small \raise #1.0 \bold { "9/7+" }}
7851 The argument to @code{\raise} is the vertical displacement amount,
7852 measured in (global) staff spaces. @code{\raise} and @code{\super}
7853 raise objects in relation to their surrounding markups. They cannot be
7854 used to move a single text up or down, when it is above or below a
7855 note, since the mechanism that positions it next to the note cancels
7856 any vertical shift. For vertical positioning, use the @code{padding}
7857 and/or @code{extra-offset} properties.
7859 Other commands taking single arguments include
7862 @item \bracket, \hbracket
7863 Bracket the argument markup with normal and horizontal brackets
7867 @cindex @code{\musicglyph}
7868 This is converted to a musical symbol, e.g. @code{\musicglyph
7869 #"accidentals-0"} will select the natural sign from the music font.
7870 See @ref{The Feta font} for a complete listing of the possible glyphs.
7872 This produces a single character, e.g. @code{\char #65} produces the
7875 @item \note @var{log} @var{dots} @var{dir}
7876 @cindex @code{\note}
7878 This produces a note with a stem pointing in @var{dir} direction, with
7879 duration log @var{log} and @var{dots} augmentation dots. The duration
7880 log is the negative 2-logarithm of the duration denominator. For
7881 example, a quarter note has log 2, an eighth note 3 and a breve has
7884 @item \hspace #@var{amount}
7885 @cindex @code{\hspace}
7886 This produces a invisible object taking horizontal space.
7888 \markup @{ A \hspace #2.0 B @}
7890 will put extra space between A and B, on top of the space that is
7891 normally inserted before elements on a line.
7893 @item \fontsize #@var{size}
7894 @cindex @code{\fontsize}
7895 This sets the relative font size, eg.
7897 A \fontsize #2 @{ B C @} D
7901 This will enlarge the B and the C by two steps.
7902 @item \translate #(cons @var{x} @var{y})
7904 This translates an object. Its first argument is a cons of numbers
7906 A \translate #(cons 2 -3) @{ B C @} D
7908 This moves `B C' 2 spaces to the right, and 3 down.
7910 @item \magnify #@var{mag}
7911 @cindex @code{\magnify}
7912 This sets the font magnification for the its argument. In the following
7913 example, the middle A will be 10% larger:
7915 A \magnify #1.1 @{ A @} A
7919 @item \override #(@var{key} . @var{value})
7920 @cindex @code{\override}
7921 This overrides a formatting property for its argument. The argument
7922 should be a key/value pair, e.g.
7924 m \override #'(font-family . math) m m
7928 In markup mode you can compose expressions, similar to mathematical
7929 expressions, XML documents and music expressions. The braces group
7930 notes into horizontal lines. Other types of lists also exist: you can
7931 stack expressions grouped with @code{<<}, and @code{>>} vertically with
7932 the command @code{\column}. Similarly, @code{\center} aligns texts by
7935 @lilypond[verbatim,fragment,relative=1]
7936 c1^\markup { \column << a bbbb c >> }
7937 c1^\markup { \center << a bbbb c >> }
7938 c1^\markup { \line << a b c >> }
7941 The markup mechanism is extensible. Refer to
7942 @file{scm/new-markup.scm} for more information.
7948 @internalsref{Markup-functions}, and @file{scm/new-markup.scm}.
7955 Text layout is ultimately done by @TeX{}, which does kerning of
7956 letters. LilyPond does not account for kerning, so texts will be
7957 spaced slightly too wide.
7959 Syntax errors for markup mode are confusing.
7961 Markup texts cannot be used in the titling of the @code{\header}
7962 field. Titles are made by La@TeX{}, so La@TeX{} commands should be used
7969 @section Global layout
7971 The global layout determined by three factors: the page layout, the
7972 line breaks and the spacing. These all influence each other. The
7973 choice of spacing determines how densely each system of music is set,
7974 which influences where line breaks breaks are chosen, and thus
7975 ultimately how many pages a piece of music takes. In this section, the
7976 algorithm for spacing music is explained, and how spacing can be
7979 Globally spoken, this procedure happens in three steps: first,
7980 flexible distances (``springs'') are chosen, based on durations. All
7981 possible line breaking combination are tried, and the one with the
7982 best results---a layout that has uniform density and requires as
7983 little stretching or cramping as possible---is chosen. When the score
7984 is processed by @TeX{}, each page is filled with systems, and page breaks
7985 are chosen whenever the page gets full.
7990 * Vertical spacing::
7991 * Horizontal spacing::
7998 @node Vertical spacing
7999 @subsection Vertical spacing
8001 @cindex vertical spacing
8002 @cindex distance between staves
8003 @cindex staff distance
8004 @cindex between staves, distance
8005 @cindex staffs per page
8006 @cindex space between staves
8008 The height of each system is determined automatically by LilyPond, to
8009 keep systems from bumping into each other, some minimum distances are
8010 set. By changing these, you can put staves closer together, and thus
8011 put more systems onto one page.
8013 Normally staves are stacked vertically. To make
8014 staves maintain a distance, their vertical size is padded. This is
8015 done with the property @code{minimumVerticalExtent}. It takes a pair
8016 of numbers, so if you want to make it smaller from its, then you could
8019 \property Staff.minimumVerticalExtent = #'(-4 . 4)
8021 This sets the vertical size of the current staff to 4 staff-space on
8022 either side of the center staff line. The argument of
8023 @code{minimumVerticalExtent} is interpreted as an interval, where the
8024 center line is the 0, so the first number is generally negative. The
8025 staff can be made larger at the bottom by setting it to @code{(-6
8028 The piano staves are handled a little differently: to make cross-staff
8029 beaming work correctly, it is necessary that the distance between staves
8030 is fixed beforehand. This is also done with a
8031 @internalsref{VerticalAlignment} object, created in
8032 @internalsref{PianoStaff}. In this object the distance between the
8033 staves is fixed by setting @code{forced-distance}. If you want to
8034 override this, use a @code{\translator} block as follows:
8038 VerticalAlignment \override #'forced-distance = #9
8041 This would bring the staves together at a distance of 9 staff spaces,
8042 measured from the center line of each staff.
8046 Vertical alignment of staves is handled by the
8047 @internalsref{VerticalAlignment} object.
8051 @node Horizontal spacing
8052 @subsection Horizontal Spacing
8054 The spacing engine translates differences in durations into
8055 stretchable distances (``springs'') of differing lengths. Longer
8056 durations get more space, shorter durations get less. The shortest
8057 durations get a fixed amount of space (which is controlled by
8058 @code{shortest-duration-space} in the @internalsref{SpacingSpanner} object).
8059 /The longer the duration, the more space it gets: doubling a
8060 duration adds a fixed amount (this amount is controlled by
8061 @code{spacing-increment}) of space to the note.
8063 For example, the following piece contains lots of half, quarter and
8064 8th notes, the eighth note is followed by 1 note head width (NHW).
8065 The quarter note is followed by 2 NHW, the half by 3 NHW, etc.
8066 @lilypond[fragment, verbatim, relative=1] c2 c4. c8 c4. c8 c4. c8 c8
8070 Normally, @code{shortest-duration-space} is set to 1.2, which is the
8071 width of a note head, and @code{shortest-duration-space} is set to
8072 2.0, meaning that the shortest note gets 2 NHW (2 times
8073 @code{shortest-duration-space}) of space. For normal notes, this space
8074 is always counted from the left edge of the symbol, so the shortest
8075 notes are generally followed by one NHW of space.
8077 If one would follow the above procedure exactly, then adding a single
8078 32th note to a score that uses 8th and 16th notes, would widen up the
8079 entire score a lot. The shortest note is no longer a 16th, but a 32nd,
8080 thus adding 2 noteheads of space to every note. To prevent this, the
8081 shortest duration for spacing is not the shortest note in the score,
8082 but the most commonly found shortest note. Notes that are even
8083 shorter this are followed by a space that is proportonial to their
8084 duration relative to the common shortest note. So if we were to add
8085 only a few 16th notes to the example above, they would be followed by
8088 @lilypond[fragment, verbatim, relative=2]
8089 c2 c4. c8 c4. c16[ c] c4. c8 c8 c8 c4 c4 c4
8092 The most common shortest duration is determined as follows: in every
8093 measure, the shortest duration is determined. The most common short
8094 duration, is taken as the basis for the spacing, with the stipulation
8095 that this shortest duration should always be equal to or shorter than
8096 1/8th note. The shortest duration is printed when you run lilypond
8097 with @code{--verbose}. These durations may also be customized. If you
8098 set the @code{common-shortest-duration} in
8099 @internalsref{SpacingSpanner}, then this sets the base duration for
8100 spacing. The maximum duration for this base (normally 1/8th), is set
8101 through @code{base-shortest-duration}.
8103 @cindex @code{common-shortest-duration}
8104 @cindex @code{base-shortest-duration}
8105 @cindex @code{stem-spacing-correction}
8106 @cindex @code{spacing}
8108 In the introduction it was explained that stem directions influence
8109 spacing. This is controlled with @code{stem-spacing-correction}
8110 property in @internalsref{NoteSpacing}, which are generated for every
8111 @internalsref{Voice} context. The @code{StaffSpacing} object
8112 (generated at @internalsref{Staff} context) contains the same property
8113 for controlling the stem/barline spacing. The following example
8114 shows these corrections, once with default settings, and once with
8115 exaggerated corrections:
8121 \property Staff.NoteSpacing \override #'stem-spacing-correction
8123 \property Staff.StaffSpacing \override #'stem-spacing-correction
8128 \paper { raggedright = ##t } }
8131 @cindex SpacingSpanner, overriding properties
8133 Properties of the @internalsref{SpacingSpanner} must be overridden
8134 from the @code{\paper} block, since the @internalsref{SpacingSpanner} is
8135 created before any @code{\property} statements are interpreted.
8137 \paper @{ \translator @{
8139 SpacingSpanner \override #'spacing-increment = #3.0
8146 @internalsref{SpacingSpanner}, @internalsref{NoteSpacing},
8147 @internalsref{StaffSpacing}, @internalsref{SeparationItem}, and
8148 @internalsref{SeparatingGroupSpanner}.
8152 Spacing is determined on a score wide basis. If you have a score that
8153 changes its character (measured in durations) halfway during the
8154 score, the part containing the longer durations will be spaced too
8157 There is no convenient mechanism to manually override spacing.
8162 @subsection Font size
8163 @cindex font size, setting
8164 @cindex staff size, setting
8165 @cindex @code{paper} file
8167 The Feta font provides musical symbols at seven different sizes.
8168 These fonts are 11 point, 13 point, 16 point, 20 point, 23 point, and
8169 26 point. The point size of a font is the height of the corresponding
8170 staff (excluding line thicknesses).
8172 Definitions for these sizes are the files @file{paperSZ.ly}, where
8173 @code{SZ} is one of 11, 13, 16, 20, 23 and 26. If you include any
8174 of these files, the variables @code{paperEleven},
8175 @code{paperThirteen}, @code{paperSixteen},
8176 @code{paperTwenty}, @code{paperTwentythree}, and @code{paperTwentysix}
8177 are defined respectively. The default @code{\paper} block is also
8178 set. These files should be imported at toplevel, i.e.
8180 \include "paper26.ly"
8184 The default font size settings for each staff heights are generated
8185 from the 20pt style sheet. For more details, see the file
8186 @file{scm/font.scm}.
8190 @subsection Line breaking
8193 @cindex breaking lines
8195 Line breaks are normally computed automatically. They are chosen such
8196 that lines look neither cramped nor loose, and that consecutive lines
8197 have similar density.
8199 Occasionally you might want to override the automatic breaks; you can
8200 do this by specifying @code{\break}. This will force a line break at
8201 this point. Line breaks can only occur at places where there are bar
8202 lines. If you want to have a line break where there is no bar line,
8203 you can force an invisible bar line by entering @code{\bar
8204 ""}. Similarly, @code{\noBreak} forbids a line break at a
8208 @cindex regular line breaks
8209 @cindex four bar music.
8211 For linebreaks at regular intervals use @code{\break} separated by
8212 skips and repeated with @code{\repeat}:
8214 < \repeat unfold 7 @{ s1 * 4 \break @}
8215 @emph{the real music}
8220 This makes the following 28 measures (assuming 4/4 time) be broken every
8225 @internalsref{BreakEvent}.
8229 @subsection Page layout
8232 @cindex breaking pages
8234 @cindex @code{indent}
8235 @cindex @code{linewidth}
8237 The most basic settings influencing the spacing are @code{indent} and
8238 @code{linewidth}. They are set in the @code{\paper} block. They
8239 control the indentation of the first line of music, and the lengths of
8242 If @code{raggedright} is set to true in the @code{\paper}
8243 block, then the lines are justified at their natural length. This
8244 useful for short fragments, and for checking how tight the natural
8248 @cindex vertical spacing
8250 The page layout process happens outside the LilyPond formatting
8251 engine: variables controlling page layout are passed to the output,
8252 and are further interpreted by @code{ly2dvi}. @code{ly2dvi} responds
8253 to the following variables in the @code{\paper} block. The variable
8254 @code{textheight} sets the total height of the music on each page.
8255 The spacing between systems is controlled with @code{interscoreline},
8256 its default is 16pt. The distance between the score lines will
8257 stretch in order to fill the full page @code{interscorelinefill} is
8258 set to a positive number. In that case @code{interscoreline}
8259 specifies the minimum spacing.
8261 @cindex @code{textheight}
8262 @cindex @code{interscoreline}
8263 @cindex @code{interscorelinefill}
8265 If the variable @code{lastpagefill} is defined,
8266 @c fixme: this should only be done if lastpagefill == #t
8267 systems are evenly distributed vertically on the last page. This
8268 might produce ugly results in case there are not enough systems on the
8269 last page. The @command{lilypond-book} command ignores
8270 @code{lastpagefill}. See @ref{lilypond-book manual} for more
8273 @cindex @code{lastpagefill}
8275 Page breaks are normally computed by @TeX{}, so they are not under
8276 direct control of LilyPond. However, you can insert a commands into
8277 the @file{.tex} output to instruct @TeX{} where to break pages. This
8278 is done by setting the @code{between-systems-strings} on the
8279 @internalsref{NonMusicalPaperColumn} where the system is broken.
8280 An example is shown in @inputfileref{input/regression,between-systems.ly}.
8281 The predefined command @code{\newpage} also does this.
8285 @cindex @code{papersize}
8287 To change the paper size, you must first set the @code{papersize} paper
8288 variable variable as in the example below. Set it to
8289 the strings @code{a4}, @code{letter}, or @code{legal}. After this
8290 specification, you must set the font as described above. If you want
8291 the default font, then use the 20 point font.
8294 \paper@{ papersize = "a4" @}
8295 \include "paper16.ly"
8298 The file @code{paper16.ly} will now include a file named @file{a4.ly}, which
8299 will set the paper variables @code{hsize} and @code{vsize} (used by
8300 @code{lilypond} and @code{ly2dvi}).
8305 @cindex @code{\newpage}
8311 @ref{Invoking ly2dvi},
8312 @inputfileref{input/regression,between-systems.ly}, and
8313 @internalsref{NonMusicalPaperColumn}.
8317 LilyPond has no concept of page layout, which makes it difficult to
8318 reliably choose page breaks in longer pieces.
8327 Entered music can also be converted to MIDI output. The performance
8328 is good enough for proof-hearing the music for errors.
8330 Ties, dynamics and tempo changes are interpreted. Dynamic marks,
8331 crescendi and decrescendi translate into MIDI volume levels. Dynamic
8332 marks translate to a fixed fraction of the available MIDI volume
8333 range, crescendi and decrescendi make the volume vary linearly between
8334 their two extremities. The fractions can be adjusted by
8335 @code{dynamicAbsoluteVolumeFunction} in @internalsref{Voice} context.
8336 For each type of MIDI instrument, a volume range can be defined. This
8337 gives a basic equalizer control, which can enhance the quality of
8338 the MIDI output remarkably. The equalizer can be controlled by
8339 setting @code{instrumentEqualizer}.
8343 Many musically interesting effects, such as swing, articulation,
8344 slurring, etc., are not translated to MIDI.
8349 * MIDI instrument names::
8354 @subsection MIDI block
8358 The MIDI block is analogous to the paper block, but it is somewhat
8359 simpler. The @code{\midi} block can contain:
8363 @item a @code{\tempo} definition, and
8364 @item context definitions.
8367 Assignments in the @code{\midi} block are not allowed.
8369 A number followed by a period is interpreted as a real number, so
8370 for setting the tempo for dotted notes, an extra space should be
8371 inserted, for example:
8374 \midi @{ \tempo 4 . = 120 @}
8378 @cindex context definition
8380 Context definitions follow precisely the same syntax as within the
8381 \paper block. Translation modules for sound are called performers.
8382 The contexts for MIDI output are defined in @file{ly/performer-init.ly}.
8385 @node MIDI instrument names
8386 @subsection MIDI instrument names
8388 @cindex instrument names
8389 @cindex @code{Staff.midiInstrument}
8390 @cindex @code{Staff.instrument}
8392 The MIDI instrument name is set by the @code{Staff.midiInstrument}
8393 property or, if that property is not set, the @code{Staff.instrument}
8394 property. The instrument name should be chosen from the list in
8395 @ref{MIDI instruments}.
8399 If the selected string does not exactly match, then LilyPond uses the
8400 default (Grand Piano). It is not possible to select an instrument by