1 @c -*- coding: utf-8; mode: texinfo; -*-
3 Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
5 When revising a translation, copy the HEAD committish of the
6 version that you are working on. See TRANSLATION for details.
15 @lilypondfile[quote]{pitches-headword.ly}
17 This section discusses how to specify the pitch of notes. There
18 are three steps to this process: input, modification, and output.
22 * Changing multiple pitches::
23 * Displaying pitches::
29 @subsection Writing pitches
31 This section discusses how to input pitches. There are two
32 different ways to place notes in octaves: absolute and relative
33 mode. In most cases, relative mode will be more convenient.
36 * Absolute octave entry::
37 * Relative octave entry::
39 * Note names in other languages::
40 * Non-Western note names and accidentals::
44 @node Absolute octave entry
45 @unnumberedsubsubsec Absolute octave entry
50 @cindex absolute octave specification
51 @cindex octave specification, absolute
52 @cindex absolute octave entry
53 @cindex octave entry, absolute
55 A pitch name is specified using lowercase letters@tie{}@code{a}
56 through@tie{}@code{g}. The note names @code{c} to @code{b} are
57 engraved in the octave below middle C.
60 @lilypond[verbatim,quote,fragment]
67 @cindex octave changing mark
72 Other octaves may be specified with a single quote@tie{}(@code{'})
73 or comma@tie{}(@code{,}) character. Each@tie{}@code{'} raises the
74 pitch by one octave; each@tie{}@code{,} lowers the pitch by an
77 @lilypond[verbatim,quote,fragment]
95 @node Relative octave entry
96 @unnumberedsubsubsec Relative octave entry
99 @cindex relative octave entry
100 @cindex octave entry, relative
101 @cindex relative octave specification
102 @cindex ocatve specification, relative
107 When octaves are specified in absolute mode it is easy to
108 accidentally put a pitch in the wrong octave. Relative octave
109 mode reduces these errors since most of the time it is not
110 necessary to indicate any octaves at all. Furthermore, in
111 absolute mode a single mistake may be difficult to spot, while in
112 relative mode a single error puts the rest of the piece off by one
116 \relative @var{startpitch} @var{musicexpr}
119 In relative mode, each note is assumed to be as close to the
120 previous note as possible. This means that the octave of each
121 pitch inside @var{musicexpr} is calculated as follows:
125 If no octave changing mark is used on a pitch, its octave is
126 calculated so that the interval with the previous note is less
127 than a fifth. This interval is determined without considering
131 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be
132 added to respectively raise or lower a pitch by an extra octave,
133 relative to the pitch calculated without an octave mark.
136 Multiple octave changing marks can be used. For example,
137 @code{''}@tie{}and@tie{}@code{,,} will alter the pitch by two
141 The pitch of the first note is relative to
142 @code{@var{startpitch}}. @var{startpitch} is specified in
143 absolute octave mode, and it is recommended that it be a octave of
148 Here is the relative mode shown in action:
150 @lilypond[verbatim,quote]
159 Octave changing marks are used for intervals greater than a
162 @lilypond[verbatim,quote]
169 A note sequence without a single octave mark can nevertheless span
172 @lilypond[verbatim,quote]
179 When @code{\relative} blocks are nested, the innermost
180 @code{\relative} block applies.
182 @lilypond[verbatim,quote]
191 @code{\relative} has no effect on @code{\chordmode} blocks.
193 @lilypond[verbatim,quote]
202 @code{\relative} is not allowed inside of @code{\chordmode} blocks.
204 Music inside a @code{\transpose} block is absolute unless a
205 @code{\relative} is included.
207 @lilypond[verbatim,quote]
220 @cindex chords and relative octave entry
221 @cindex relative octave entry and chords
223 If the preceding item is a chord, the first note of the chord is
224 used as the reference point for the octave placement of a
225 following note or chord. Inside chords, the next note is always
226 relative to the preceding one. Examine the next example
227 carefully, paying attention to the @code{c} notes.
229 @lilypond[verbatim,quote]
238 As explained above, the octave of pitches is calculated only with
239 the note names, regardless of any alterations. Therefore, an
240 E-double-sharp following a B will be placed higher, while an
241 F-double-flat will be placed lower. In other words, a
242 double-augmented fourth is considered a smaller interval than a
243 double-diminished fifth, regardless of the number of semitones
244 that each interval contains.
246 @lilypond[verbatim,quote]
269 @rinternals{RelativeOctaveMusic}.
272 @cindex relative octave entry and transposition
273 @cindex transposition and relative octave entry
284 If no @var{startpitch} is specified for @code{\relative},
285 then@tie{}@code{c'} is assumed. However, this is a deprecated
286 option and may disappear in future versions, so its use is
292 @unnumberedsubsubsec Accidentals
295 @cindex key signature
298 @c duplicated in Key signature and Accidentals
299 @warning{New users are sometimes confused about accidentals and
300 key signatures. In LilyPond, note names are the raw input; key
301 signatures and clefs determine how this raw input is displayed.
302 An unaltered note like@tie{}@code{c} means @q{C natural},
303 regardless of the key signature or clef. For more information,
304 see @rlearning{Accidentals and key signatures}.}
306 @cindex note names, Dutch
307 @cindex note names, default
308 @cindex default note names
312 @cindex sharp, double
316 @cindex natural pitch
318 A @notation{sharp} pitch is made by adding @code{is} to the note
319 name, and a @notation{flat} pitch by adding @code{es}. As you
320 might expect, a @notation{double sharp} or @notation{double flat}
321 is made by adding @code{isis} or @code{eses}. This syntax is
322 derived from Dutch note naming conventions. To use other names
323 for accidentals, see @ref{Note names in other languages}.
325 @lilypond[verbatim,quote,relative=2]
329 A natural will cancel the effect of an accidental or key
330 signature. However, naturals are not encoded into the note name
331 syntax with a suffix; a natural pitch is shown as a simple note
334 @lilypond[verbatim,quote,relative=2]
338 @cindex quarter tones
342 Quarter tones may be added; the following is a series of Cs with
345 @lilypond[verbatim,quote,relative=2]
346 ceseh1 ces ceh c cih cis cisih
351 @cindex accidental, reminder
352 @cindex accidental, cautionary
353 @cindex accidental, parenthesized
354 @cindex reminder accidental
355 @cindex cautionary accidental
356 @cindex parenthesized accidental
362 Normally accidentals are printed automatically, but you may also
363 print them manually. A reminder accidental can be forced by
364 adding an exclamation mark@tie{}@code{!} after the pitch. A
365 cautionary accidental (i.e., an accidental within parentheses) can
366 be obtained by adding the question mark@tie{}@code{?} after the
367 pitch. These extra accidentals can also be used to produce
370 @lilypond[verbatim,quote,relative=2]
371 cis cis cis! cis? c c c! c?
374 @cindex accidental on tied note
375 @cindex tied note, accidental
377 Accidentals on tied notes are only printed at the beginning of a
380 @lilypond[verbatim,quote,relative=2]
389 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
390 {preventing-extra-naturals-from-being-automatically-added.ly}
397 @rglos{double sharp},
400 @rglos{quarter tone}.
403 @rlearning{Accidentals and key signatures}.
406 @ref{Automatic accidentals},
407 @ref{Annotational accidentals (musica ficta)},
408 @ref{Note names in other languages}.
414 @rinternals{Accidental_engraver},
415 @rinternals{Accidental},
416 @rinternals{AccidentalCautionary},
417 @rinternals{accidental-interface}.
420 @cindex accidental, quarter-tone
421 @cindex quarter-tone accidental
425 There are no generally accepted standards for denoting
426 quarter-tone accidentals, so LilyPond's symbol does not conform to
431 @node Note names in other languages
432 @unnumberedsubsubsec Note names in other languages
434 @cindex note names, other languages
435 @cindex pitch names, other languages
436 @cindex language, note names in other
437 @cindex language, pitch names in other
439 There are predefined sets of note and accidental names for various
440 other languages. To use them, include the language-specific init
441 file listed below. For example, to use English note names, add
442 @code{@w{\include "english.ly"}} to the input file.
444 @warning{Because some other include files (such as @code{@w{predefined-fretboards.ly}})
445 use default (Nederlands) note names, the @code{@bs{}include}
446 command for the language file should be placed after all other
447 LilyPond distribution files.}
449 The available language files and the note names they define are:
452 @multitable {@file{nederlands.ly}} {do re mi fa sol la sib si}
453 @headitem Language File
455 @item @file{nederlands.ly}
456 @tab c d e f g a bes b
457 @item @file{arabic.ly}
458 @tab do re mi fa sol la sib si
459 @item @file{catalan.ly}
460 @tab do re mi fa sol la sib si
461 @item @file{deutsch.ly}
463 @item @file{english.ly}
464 @tab c d e f g a bf b
465 @item @file{espanol.ly}
466 @tab do re mi fa sol la sib si
467 @item @file{italiano.ly}
468 @tab do re mi fa sol la sib si
469 @item @file{norsk.ly}
471 @item @file{portugues.ly}
472 @tab do re mi fa sol la sib si
473 @item @file{suomi.ly}
475 @item @file{svenska.ly}
477 @item @file{vlaams.ly}
478 @tab do re mi fa sol la sib si
483 and the accidental suffixes they define are:
486 @multitable {@file{nederlands.ly}} {-s/-sharp} {-ess/-es} {-ss/-x/-sharpsharp} {-essess/-eses}
487 @headitem Language File
488 @tab sharp @tab flat @tab double sharp @tab double flat
489 @item @file{nederlands.ly}
490 @tab -is @tab -es @tab -isis @tab -eses
491 @item @file{arabic.ly}
492 @tab -d @tab -b @tab -dd @tab -bb
493 @item @file{catalan.ly}
494 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
495 @item @file{deutsch.ly}
496 @tab -is @tab -es @tab -isis @tab -eses
497 @item @file{english.ly}
498 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
500 @item @file{espanol.ly}
501 @tab -s @tab -b @tab -ss/-x @tab -bb
502 @item @file{italiano.ly}
503 @tab -d @tab -b @tab -dd @tab -bb
504 @item @file{norsk.ly}
505 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
507 @item @file{portugues.ly}
508 @tab -s @tab -b @tab -ss @tab -bb
509 @item @file{suomi.ly}
510 @tab -is @tab -es @tab -isis @tab -eses
511 @item @file{svenska.ly}
512 @tab -iss @tab -ess @tab -ississ @tab -essess
513 @item @file{vlaams.ly}
514 @tab -k @tab -b @tab -kk @tab -bb
518 In Dutch, @code{aes} is contracted to @code{as}, but both forms
519 are accepted in LilyPond. Similarly, both @code{es} and
520 @code{ees} are accepted. This also applies to
521 @code{aeses}@tie{}/@tie{}@code{ases} and
522 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
523 contracted names are defined in the corresponding language files.
525 @lilypond[verbatim,quote,relative=2]
526 a2 as e es a ases e eses
536 Some music uses microtones whose alterations are fractions of a
537 @q{normal} sharp or flat. The note names for quarter-tones
538 defined in the various language files are listed in the following
539 table. Here the prefixes @notation{semi-} and @notation{sesqui-}
540 mean @q{half} and @q{one and a half}, respectively. For the other
541 languages, no special names have been defined yet.
544 @multitable {@file{nederlands.ly}} {@b{semi-sharp}} {@b{semi-flat}} {@b{sesqui-sharp}} {@b{sesqui-flat}}
545 @headitem Language File
546 @tab semi-sharp @tab semi-flat @tab sesqui-sharp @tab sesqui-flat
548 @item @file{nederlands.ly}
549 @tab -ih @tab -eh @tab -isih @tab -eseh
550 @item @file{arabic.ly}
551 @tab -sd @tab -sb @tab -dsd @tab -bsb
552 @item @file{deutsch.ly}
553 @tab -ih @tab -eh @tab -isih @tab -eseh
554 @item @file{english.ly}
555 @tab -qs @tab -qf @tab -tqs @tab -tqf
556 @item @file{espanol.ly}
557 @tab -cs @tab -cb @tab -tcs @tab -tcb
558 @item @file{italiano.ly}
559 @tab -sd @tab -sb @tab -dsd @tab -bsb
560 @item @file{portugues.ly}
561 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
574 @node Non-Western note names and accidentals
575 @unnumberedsubsubsec Non-Western note names and accidentals
577 Many non-Western musics (and some Western folk and
578 traditional musics) employ alternative or extended tuning
579 systems that do not fit readily into standard classical
582 In some cases standard notation is still used, with the
583 pitch differences being implicit. For example, Arabic
584 music is notated with standard semitone and quarter-tone
585 accidentals, with the precise pitch alterations being
586 determined by context. Others require extended or unique
589 @notation{Turkish classical music}, or Ottoman music,
590 employs melodic forms known as @notation{makamlar}, whose
591 intervals are based on 1/9 divisions of the whole tone.
592 From a modern notational point of view, it is convenient
593 to use the standard Western staff notes (c, d, e, ...)
594 with special accidentals unique to Turkish music. These
595 accidentals are defined in @file{makam.ly} (to locate this
596 file on your system, see
597 @rlearning{Other sources of information}). The following
598 table gives their names, the accidental suffix that must
599 be added to notes, and their pitch alteration as a
600 fraction of one whole tone.
602 @c TODO: can we include the actual accidentals in this table?
604 @multitable {@b{büyük mücenneb (sharp)}} {@b{suffix}} {@b{pitch alteration}}
605 @headitem Accidental name
606 @tab suffix @tab pitch alteration
608 @item büyük mücenneb (sharp)
610 @item kücük mücenneb (sharp)
621 @item kücük mücenneb (flat)
623 @item büyük mücenneb (flat)
628 For further information on Turkish classical music and
629 makamlar, see @ref{Turkish classical music}.
634 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
638 @node Changing multiple pitches
639 @subsection Changing multiple pitches
641 This section discusses how to modify pitches.
649 @unnumberedsubsubsec Octave checks
651 @cindex octave correction
653 @cindex control pitch
656 @funindex \octaveCheck
657 @funindex octaveCheck
658 @funindex controlpitch
660 In relative mode, it is easy to forget an octave changing mark.
661 Octave checks make such errors easier to find by displaying a
662 warning and correcting the octave if a note is found in an
665 To check the octave of a note, specify the absolute octave after
666 the @code{=}@tie{}symbol. This example will generate a warning
667 (and change the pitch) because the second note is the absolute
668 octave @code{d''} instead of @code{d'} as indicated by the octave
671 @lilypond[verbatim,quote]
678 The octave of notes may also be checked with the
679 @code{\octaveCheck}@tie{}@var{controlpitch} command.
680 @var{controlpitch} is specified in absolute mode. This checks
681 that the interval between the previous note and the
682 @var{controlpitch} is within a fourth (i.e., the normal
683 calculation of relative mode). If this check fails, a warning is
684 printed, but the previous note is not changed. Future notes are
685 relative to the @var{controlpitch}.
687 @lilypond[verbatim,quote]
695 Compare the two bars below. The first and third @code{\octaveCheck}
696 checks fail, but the second one does not fail.
698 @lilypond[verbatim,quote]
718 @rinternals{RelativeOctaveCheck}.
722 @unnumberedsubsubsec Transpose
726 @cindex transposition
727 @cindex transposition of pitches
728 @cindex transposition of notes
729 @cindex pitches, transposition of
730 @cindex notes, transposition of
735 A music expression can be transposed with @code{\transpose}. The
739 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
743 This means that @var{musicexpr} is transposed by the interval
744 between the pitches @var{frompitch} and @var{topitch}: any note
745 with pitch @var{frompitch} is changed to @var{topitch} and any
746 other note is transposed by the same interval. Both pitches are
747 entered in absolute mode.
749 @warning{Music inside a @code{@bs{}transpose} block is absolute
750 unless a @code{@bs{}relative} is included in the block.}
752 Consider a piece written in the key of D-major. It can be
753 transposed up to E-major; note that the key signature is
754 automatically transposed as well.
756 @lilypond[verbatim,quote]
765 @cindex transposing instruments
766 @cindex instruments, transposing
768 If a part written in C (normal @notation{concert pitch}) is to be
769 played on the A clarinet (for which an A is notated as a C and
770 thus sounds a minor third lower than notated), the appropriate
771 part will be produced with:
773 @lilypond[verbatim,quote]
783 Note that we specify @w{@code{\key c \major}} explicitly. If we
784 do not specify a key signature, the notes will be transposed but
785 no key signature will be printed.
787 @code{\transpose} distinguishes between enharmonic pitches: both
788 @w{@code{\transpose c cis}} or @w{@code{\transpose c des}} will
789 transpose up a semitone. The first version will print sharps and
790 the notes will remain on the same scale step, the second version
791 will print flats on the scale step above.
793 @lilypond[verbatim,quote]
794 music = \relative c' { c d e f }
796 \transpose c cis { \music }
797 \transpose c des { \music }
802 @code{\transpose} may also be used in a different way, to input
803 written notes for a transposing instrument. The previous examples
804 show how to enter pitches in C (or @notation{concert pitch}) and
805 typeset them for a transposing instrument, but the opposite is
806 also possible if you for example have a set of instrumental parts
807 and want to print a conductor's score. For example, when entering
808 music for a B-flat trumpet that begins on a notated E (concert D),
812 musicInBflat = @{ e4 @dots{} @}
813 \transpose c bes, \musicInBflat
817 To print this music in F (e.g., rearranging to a French horn) you
818 could wrap the existing music with another @code{\transpose}:
821 musicInBflat = @{ e4 @dots{} @}
822 \transpose f c' @{ \transpose c bes, \musicInBflat @}
826 For more information about transposing instruments,
827 see @ref{Instrument transpositions}.
832 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
833 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
838 @ref{Relative octave entry},
839 @ref{Instrument transpositions}.
845 @rinternals{TransposedMusic}.
857 The relative conversion will not affect @code{\transpose},
858 @code{\chordmode} or @code{\relative} sections in its argument.
859 To use relative mode within transposed music, an additional
860 @code{\relative} must be placed inside @code{\transpose}.
862 @node Displaying pitches
863 @subsection Displaying pitches
865 This section discusses how to alter the output of pitches.
871 * Instrument transpositions::
872 * Automatic accidentals::
878 @unnumberedsubsubsec Clef
890 @cindex mezzosoprano clef
891 @cindex baritone clef
892 @cindex varbaritone clef
896 @cindex clef, ancient
906 @cindex clef, soprano
907 @cindex clef, mezzosoprano
908 @cindex clef, baritone
909 @cindex clef, varbaritone
910 @cindex subbass clef, subbass
915 The clef may be altered. Middle C is shown in every example.
917 @lilypond[verbatim,quote,relative=1]
930 @lilypond[verbatim,quote,relative=1]
962 Further supported clefs are described under @ref{Mensural clefs}
963 and @ref{Gregorian clefs}.
965 @cindex transposing clefs
966 @cindex clef, transposing
967 @cindex octave transposition
968 @cindex choral tenor clef
969 @cindex tenor clef, choral
971 By adding@tie{}@code{_8} or@tie{}@code{^8} to the clef name, the
972 clef is transposed one octave down or up, respectively,
973 and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves.
974 The clef name must be enclosed in quotes when it contains
975 underscores or digits.
977 @lilypond[verbatim,quote,relative=2]
989 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
990 {tweaking-clef-properties.ly}
995 @ref{Mensural clefs},
996 @ref{Gregorian clefs}.
1001 Internals Reference:
1002 @rinternals{Clef_engraver},
1004 @rinternals{OctavateEight},
1005 @rinternals{clef-interface}.
1009 @unnumberedsubsubsec Key signature
1011 @cindex key signature
1016 @c duplicated in Key signature and Accidentals
1017 @warning{New users are sometimes confused about accidentals and
1018 key signatures. In LilyPond, note names are the raw input; key
1019 signatures and clefs determine how this raw input is displayed.
1020 An unaltered note like@tie{}@code{c} means @q{C natural},
1021 regardless of the key signature or clef. For more information,
1022 see @rlearning{Accidentals and key signatures}.}
1024 The key signature indicates the tonality in which a piece is
1025 played. It is denoted by a set of alterations (flats or sharps)
1026 at the start of the staff. The key signature may be altered:
1029 \key @var{pitch} @var{mode}
1042 @funindex \mixolydian
1043 @funindex mixolydian
1051 @cindex church modes
1064 Here, @var{mode} should be @code{\major} or @code{\minor} to get a
1065 key signature of @var{pitch}-major or @var{pitch}-minor,
1066 respectively. You may also use the standard mode names, also
1067 called @notation{church modes}: @code{\ionian}, @code{\dorian},
1068 @code{\phrygian}, @code{\lydian}, @code{\mixolydian},
1069 @code{\aeolian}, and @code{\locrian}.
1071 @lilypond[verbatim,quote,relative=2]
1081 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1082 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
1084 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1085 {non-traditional-key-signatures.ly}
1090 @rglos{church mode},
1094 @rlearning{Accidentals and key signatures}.
1099 Internals Reference:
1100 @rinternals{KeyChangeEvent},
1101 @rinternals{Key_engraver},
1102 @rinternals{Key_performer},
1103 @rinternals{KeyCancellation},
1104 @rinternals{KeySignature},
1105 @rinternals{key-cancellation-interface},
1106 @rinternals{key-signature-interface}.
1109 @node Ottava brackets
1110 @unnumberedsubsubsec Ottava brackets
1118 @funindex set-octavation
1122 @notation{Ottava brackets} introduce an extra transposition of an
1123 octave for the staff:
1125 @lilypond[verbatim,quote,relative=2]
1133 The @code{ottava} function also takes -1 (for 8va bassa),
1134 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
1139 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1150 Internals Reference:
1151 @rinternals{Ottava_spanner_engraver},
1152 @rinternals{OttavaBracket},
1153 @rinternals{ottava-bracket-interface}.
1156 @node Instrument transpositions
1157 @unnumberedsubsubsec Instrument transpositions
1159 @cindex transposition, MIDI
1160 @cindex transposition, instrument
1161 @cindex transposing instrument
1163 @cindex MIDI transposition
1165 @funindex \transposition
1166 @funindex transposition
1168 When typesetting scores that involve transposing instruments, some
1169 parts can be typeset in a different pitch than the
1170 @notation{concert pitch}. In these cases, the key of the
1171 @notation{transposing instrument} should be specified; otherwise
1172 the MIDI output and cues in other parts will produce incorrect
1173 pitches. For more information about quotations, see
1174 @ref{Quoting other voices}.
1177 \transposition @var{pitch}
1180 The pitch to use for @code{\transposition} should correspond to
1181 the real sound heard when a@tie{}@code{c'} written on the staff is
1182 played by the transposing instrument. This pitch is entered in
1183 absolute mode, so an instrument that produces a real sound which
1184 is one tone higher than the printed music should use
1185 @w{@code{\transposition d'}}. @code{\transposition} should
1186 @emph{only} be used if the pitches are @emph{not} being entered in
1189 Here are a few notes for violin and B-flat clarinet where the
1190 parts have been entered using the notes and key as they appear in
1191 each part of the conductor's score. The two instruments are
1194 @lilypond[verbatim,quote]
1196 \new Staff = "violin" {
1198 \set Staff.instrumentName = #"Vln"
1199 \set Staff.midiInstrument = #"violin"
1200 % not strictly necessary, but a good reminder
1207 \new Staff = "clarinet" {
1209 \set Staff.instrumentName = \markup { Cl (B\flat) }
1210 \set Staff.midiInstrument = #"clarinet"
1220 The @code{\transposition} may be changed during a piece. For
1221 example, a clarinetist may switch from an A clarinet to a B-flat
1224 @lilypond[verbatim,quote,relative=2]
1225 \set Staff.instrumentName = #"Cl (A)"
1230 s1*0^\markup { Switch to B\flat clarinet }
1241 @rglos{concert pitch},
1242 @rglos{transposing instrument}.
1245 @ref{Quoting other voices},
1252 @node Automatic accidentals
1253 @unnumberedsubsubsec Automatic accidentals
1255 @cindex accidental style
1256 @cindex accidental style, default
1258 @cindex accidentals, automatic
1259 @cindex automatic accidentals
1260 @cindex default accidental style
1262 @funindex set-accidental-style
1266 There are many different conventions on how to typeset
1267 accidentals. LilyPond provides a function to specify which
1268 accidental style to use. This function is called as follows:
1272 #(set-accidental-style 'voice)
1277 The accidental style applies to the current @code{Staff} by
1278 default (with the exception of the styles @code{piano} and
1279 @code{piano-cautionary}, which are explained below). Optionally,
1280 the function can take a second argument that determines in which
1281 scope the style should be changed. For example, to use the same
1282 style in all staves of the current @code{StaffGroup}, use:
1285 #(set-accidental-style 'voice 'StaffGroup)
1288 The following accidental styles are supported. To demonstrate
1289 each style, we use the following example:
1292 @lilypond[verbatim,quote]
1296 cis'8 fis, d'4 <a cis>8 f bis4 |
1310 \voiceTwo \relative c' {
1314 \change Staff = down
1318 \change Staff = down
1319 <fis, a cis>4 gis <f a d>2 |
1326 \context Staff = "up" {
1327 #(set-accidental-style 'default)
1330 \context Staff = "down" {
1331 #(set-accidental-style 'default)
1338 Note that the last lines of this example can be replaced by the
1339 following, as long as the same accidental style should be used in
1345 \context Staff = "up" @{
1346 %%% change the next line as desired:
1347 #(set-accidental-style 'default 'Score)
1350 \context Staff = "down" @{
1358 @c don't use verbatim in this table.
1362 @cindex default accidental style
1363 @cindex accidental style, default
1367 This is the default typesetting behavior. It corresponds to
1368 eighteenth-century common practice: accidentals are remembered to
1369 the end of the measure in which they occur and only in their own
1370 octave. Thus, in the example below, no natural signs are printed
1371 before the@tie{}@code{b} in the second measure or the
1378 cis'8 fis, d'4 <a cis>8 f bis4 |
1392 \voiceTwo \relative c' {
1396 \change Staff = down
1400 \change Staff = down
1401 <fis, a cis>4 gis <f a d>2 |
1408 \context Staff = "up" {
1409 #(set-accidental-style 'default)
1412 \context Staff = "down" {
1413 #(set-accidental-style 'default)
1422 @cindex accidental style, voice
1423 @cindex voice accidental style
1424 @cindex accidental style, modern
1425 @cindex modern accidental style
1426 @cindex accidental style, modern-cautionary
1427 @cindex modern-cautionary accidental style
1431 The normal behavior is to remember the accidentals at
1432 @code{Staff}-level. In this style, however, accidentals are
1433 typeset individually for each voice. Apart from that, the rule is
1434 similar to @code{default}.
1436 As a result, accidentals from one voice do not get canceled in
1437 other voices, which is often an unwanted result: in the following
1438 example, it is hard to determine whether the second@tie{}@code{a}
1439 should be played natural or sharp. The @code{voice} option should
1440 therefore be used only if the voices are to be read solely by
1441 individual musicians. If the staff is to be used by one musician
1442 (e.g., a conductor or in a piano score) then @code{modern} or
1443 @code{modern-cautionary} should be used instead.
1450 cis'8 fis, d'4 <a cis>8 f bis4 |
1464 \voiceTwo \relative c' {
1468 \change Staff = down
1472 \change Staff = down
1473 <fis, a cis>4 gis <f a d>2 |
1480 \context Staff = "up" {
1481 #(set-accidental-style 'voice)
1484 \context Staff = "down" {
1485 #(set-accidental-style 'voice)
1494 @cindex accidentals, modern style
1495 @cindex modern style accidentals
1499 This rule corresponds to the common practice in the twentieth
1500 century. It prints the same accidentals as @code{default}, with
1501 two exceptions that serve to avoid ambiguity: after temporary
1502 accidentals, cancellation marks are printed also in the following
1503 measure (for notes in the same octave) and, in the same measure,
1504 for notes in other octaves. Hence the naturals before
1505 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1512 cis'8 fis, d'4 <a cis>8 f bis4 |
1526 \voiceTwo \relative c' {
1530 \change Staff = down
1534 \change Staff = down
1535 <fis, a cis>4 gis <f a d>2 |
1542 \context Staff = "up" {
1543 #(set-accidental-style 'modern)
1546 \context Staff = "down" {
1547 #(set-accidental-style 'modern)
1554 @item modern-cautionary
1556 @cindex accidentals, modern cautionary style
1557 @cindex modern accidental style
1558 @cindex modern cautionary accidental style
1559 @cindex modern style accidentals
1560 @cindex modern style cautionary accidentals
1562 @funindex modern-cautionary
1564 This rule is similar to @code{modern}, but the @q{extra}
1565 accidentals (the ones not typeset by @code{default}) are typeset
1566 as cautionary accidentals. They are by default printed with
1567 parentheses, but they can also be printed in reduced size by
1568 defining the @code{cautionary-style} property of
1569 @code{AccidentalSuggestion}.
1575 cis'8 fis, d'4 <a cis>8 f bis4 |
1589 \voiceTwo \relative c' {
1593 \change Staff = down
1597 \change Staff = down
1598 <fis, a cis>4 gis <f a d>2 |
1605 \context Staff = "up" {
1606 #(set-accidental-style 'modern-cautionary)
1609 \context Staff = "down" {
1610 #(set-accidental-style 'modern-cautionary)
1619 @cindex accidental style, modern
1620 @cindex accidentals, modern
1621 @cindex accidentals, multivoice
1622 @cindex modern accidental style
1623 @cindex modern accidentals
1624 @cindex multivoice accidentals
1626 @funindex modern-voice
1628 This rule is used for multivoice accidentals to be read both by
1629 musicians playing one voice and musicians playing all voices.
1630 Accidentals are typeset for each voice, but they @emph{are}
1631 canceled across voices in the same @code{Staff}. Hence,
1632 the@tie{}@code{a} in the last measure is canceled because the
1633 previous cancellation was in a different voice, and
1634 the@tie{}@code{d} in the lower staff is canceled because of the
1635 accidental in a different voice in the previous measure:
1641 cis'8 fis, d'4 <a cis>8 f bis4 |
1655 \voiceTwo \relative c' {
1659 \change Staff = down
1663 \change Staff = down
1664 <fis, a cis>4 gis <f a d>2 |
1671 \context Staff = "up" {
1672 #(set-accidental-style 'modern-voice)
1675 \context Staff = "down" {
1676 #(set-accidental-style 'modern-voice)
1683 @cindex accidental style, cautionary, modern voice
1684 @cindex accidental style, modern voice cautionary
1685 @cindex accidental style, voice, modern cautionary
1687 @funindex modern-voice-cautionary
1689 @item modern-voice-cautionary
1691 This rule is the same as @code{modern-voice}, but with the extra
1692 accidentals (the ones not typeset by @code{voice}) typeset as
1693 cautionaries. Even though all accidentals typeset by
1694 @code{default} @emph{are} typeset with this rule, some of them are
1695 typeset as cautionaries.
1701 cis'8 fis, d'4 <a cis>8 f bis4 |
1715 \voiceTwo \relative c' {
1719 \change Staff = down
1723 \change Staff = down
1724 <fis, a cis>4 gis <f a d>2 |
1731 \context Staff = "up" {
1732 #(set-accidental-style 'modern-voice-cautionary)
1735 \context Staff = "down" {
1736 #(set-accidental-style 'modern-voice-cautionary)
1745 @cindex accidental style, piano
1746 @cindex accidentals, piano
1747 @cindex piano accidental style
1748 @cindex piano accidentals
1752 This rule reflects twentieth-century practice for piano notation.
1753 Its behavior is very similar to @code{modern} style, but here
1754 accidentals also get canceled across the staves in the same
1755 @code{GrandStaff} or @code{PianoStaff}, hence all the
1756 cancellations of the final notes.
1758 This accidental style applies to the current @code{GrandStaff} or
1759 @code{PianoStaff} by default.
1765 cis'8 fis, d'4 <a cis>8 f bis4 |
1779 \voiceTwo \relative c' {
1783 \change Staff = down
1787 \change Staff = down
1788 <fis, a cis>4 gis <f a d>2 |
1795 \context Staff = "up" {
1796 #(set-accidental-style 'piano)
1799 \context Staff = "down" {
1806 @item piano-cautionary
1808 @cindex accidentals, piano cautionary
1809 @cindex cautionary accidentals, piano
1810 @cindex piano cautionary accidentals
1811 @cindex accidental style, piano cautionary
1812 @cindex cautionary accidental style, piano
1813 @cindex piano cautionary accidental style
1815 @funindex piano-cautionary
1817 This is the same as @code{piano} but with the extra accidentals
1818 typeset as cautionaries.
1824 cis'8 fis, d'4 <a cis>8 f bis4 |
1838 \voiceTwo \relative c' {
1842 \change Staff = down
1846 \change Staff = down
1847 <fis, a cis>4 gis <f a d>2 |
1854 \context Staff = "up" {
1855 #(set-accidental-style 'piano-cautionary)
1858 \context Staff = "down" {
1868 @cindex neo-modern accidental style
1869 @cindex accidental style, neo-modern
1871 @funindex neo-modern
1873 This rule reproduces a common practice in contemporary music:
1874 accidentals are printed like with @code{modern}, but they are printed
1875 again if the same note appears later in the same measure -- except
1876 if the note is immediately repeated.
1882 cis'8 fis, d'4 <a cis>8 f bis4 |
1896 \voiceTwo \relative c' {
1900 \change Staff = down
1904 \change Staff = down
1905 <fis, a cis>4 gis <f a d>2 |
1912 \context Staff = "up" {
1913 #(set-accidental-style 'neo-modern)
1916 \context Staff = "down" {
1917 #(set-accidental-style 'neo-modern)
1924 @item neo-modern-cautionary
1926 @cindex neo-modern-cautionary accidental style
1927 @cindex accidental style, neo-modern-cautionary
1929 @funindex neo-modern-cautionary
1931 This rule is similar to @code{neo-modern}, but the extra
1932 accidentals are printed as cautionary accidentals.
1938 cis'8 fis, d'4 <a cis>8 f bis4 |
1952 \voiceTwo \relative c' {
1956 \change Staff = down
1960 \change Staff = down
1961 <fis, a cis>4 gis <f a d>2 |
1968 \context Staff = "up" {
1969 #(set-accidental-style 'neo-modern-cautionary)
1972 \context Staff = "down" {
1973 #(set-accidental-style 'neo-modern-cautionary)
1983 @cindex dodecaphonic accidental style
1984 @cindex dodecaphonic style, neo-modern
1986 @funindex dodecaphonic
1988 This rule reflects a practice introduced by composers at
1989 the beginning of the 20th century, in an attempt to
1990 abolish the hierarchy between natural and non-natural notes.
1991 With this style, @emph{every} note gets an accidental sign,
1992 including natural signs.
1998 cis'8 fis, d'4 <a cis>8 f bis4 |
2012 \voiceTwo \relative c' {
2016 \change Staff = down
2020 \change Staff = down
2021 <fis, a cis>4 gis <f a d>2 |
2028 \context Staff = "up" {
2029 #(set-accidental-style 'dodecaphonic)
2032 \context Staff = "down" {
2033 #(set-accidental-style 'dodecaphonic)
2043 @cindex teaching accidental style
2044 @cindex accidental style, teaching
2048 This rule is intended for students, and makes it easy to create
2049 scale sheets with automagically created cautionary accidentals.
2050 Accidentals are printed like with @code{modern}, but cautionary
2051 accidentals are added for all sharp or flat tones specified by the
2052 key signature, except if the note is immediately repeated.
2058 cis'8 fis, d'4 <a cis>8 f bis4 |
2072 \voiceTwo \relative c' {
2076 \change Staff = down
2080 \change Staff = down
2081 <fis, a cis>4 gis <f a d>2 |
2088 \context Staff = "up" {
2090 #(set-accidental-style 'teaching)
2093 \context Staff = "down" {
2095 #(set-accidental-style 'teaching)
2106 @cindex accidental style, no reset
2107 @cindex no reset accidental style
2111 This is the same as @code{default} but with accidentals lasting
2112 @q{forever} and not only within the same measure:
2118 cis'8 fis, d'4 <a cis>8 f bis4 |
2132 \voiceTwo \relative c' {
2136 \change Staff = down
2140 \change Staff = down
2141 <fis, a cis>4 gis <f a d>2 |
2148 \context Staff = "up" {
2149 #(set-accidental-style 'no-reset)
2152 \context Staff = "down" {
2153 #(set-accidental-style 'no-reset)
2162 @cindex forget accidental style
2163 @cindex accidental style, forget
2167 This is the opposite of @code{no-reset}: Accidentals are not
2168 remembered at all -- and hence all accidentals are typeset
2169 relative to the key signature, regardless of what came before in
2170 the music. Unlike @code{dodecaphonic}, this rule never prints
2177 cis'8 fis, d'4 <a cis>8 f bis4 |
2191 \voiceTwo \relative c' {
2195 \change Staff = down
2199 \change Staff = down
2200 <fis, a cis>4 gis <f a d>2 |
2207 \context Staff = "up" {
2208 #(set-accidental-style 'forget)
2211 \context Staff = "down" {
2212 #(set-accidental-style 'forget)
2222 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2223 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
2230 Internals Reference:
2231 @rinternals{Accidental},
2232 @rinternals{Accidental_engraver},
2233 @rinternals{GrandStaff},
2234 @rinternals{PianoStaff},
2236 @rinternals{AccidentalSuggestion},
2237 @rinternals{AccidentalPlacement},
2238 @rinternals{accidental-suggestion-interface}.
2241 @cindex accidentals and simultaneous notes
2242 @cindex simultaneous notes and accidentals
2243 @cindex accidentals in chords
2244 @cindex chords, accidentals in
2248 Simultaneous notes are considered to be entered in sequential
2249 mode. This means that in a chord the accidentals are typeset as
2250 if the notes in the chord happen one at a time, in the order in
2251 which they appear in the input file. This is a problem when
2252 accidentals in a chord depend on each other, which does not happen
2253 for the default accidental style. The problem can be solved by
2254 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
2259 @unnumberedsubsubsec Ambitus
2262 @cindex range of pitches
2265 The term @notation{ambitus} (pl. ambitus) denotes a range of
2266 pitches for a given voice in a part of music. It may also denote
2267 the pitch range that a musical instrument is capable of playing.
2268 Ambitus are printed on vocal parts so that performers can easily
2269 determine if it matches their capabilities.
2271 Ambitus are denoted at the beginning of a piece near the initial
2272 clef. The range is graphically specified by two note heads that
2273 represent the lowest and highest pitches. Accidentals are only
2274 printed if they are not part of the key signature.
2276 @lilypond[verbatim,quote]
2280 \consists "Ambitus_engraver"
2293 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2294 {adding-ambitus-per-voice.ly}
2296 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2297 {ambitus-with-multiple-voices.ly}
2307 Internals Reference:
2308 @rinternals{Ambitus_engraver},
2311 @rinternals{Ambitus},
2312 @rinternals{AmbitusAccidental},
2313 @rinternals{AmbitusLine},
2314 @rinternals{AmbitusNoteHead},
2315 @rinternals{ambitus-interface}.
2320 There is no collision handling in the case of multiple per-voice
2325 @subsection Note heads
2327 This section suggests ways of altering note heads.
2330 * Special note heads::
2331 * Easy notation note heads::
2332 * Shape note heads::
2336 @node Special note heads
2337 @unnumberedsubsubsec Special note heads
2339 @cindex note heads, special
2340 @cindex note heads, cross
2341 @cindex note heads, diamond
2342 @cindex note heads, parlato
2343 @cindex note heads, harmonic
2344 @cindex note heads, guitar
2345 @cindex special note heads
2346 @cindex cross note heads
2347 @cindex diamond note heads
2348 @cindex parlato note heads
2349 @cindex harmonic note heads
2350 @cindex guitar note heads
2351 @cindex note head styles
2352 @cindex styles, note heads
2356 The appearance of note heads may be altered:
2358 @lilypond[verbatim,quote,relative=2]
2360 \override NoteHead #'style = #'cross
2362 \revert NoteHead #'style
2364 \override NoteHead #'style = #'harmonic
2366 \revert NoteHead #'style
2370 To see all note head styles, see @ref{Note head styles}.
2372 The @code{cross} style is used to represent a variety of musical
2373 intentions. The following generic predefined commands modify the
2374 note head in both staff and tablature contexts and can be used to
2375 represent any musical meaning:
2377 @lilypond[verbatim,quote,relative=2]
2385 The music function form of this predefined command may be used
2386 inside and outside chords to generate crossed note heads in both
2387 staff and tablature contexts:
2389 @lilypond[verbatim,quote,relative=2]
2392 c b < g \xNote c f > b
2395 There is also a shorthand for diamond shapes which can be used
2398 @lilypond[verbatim,quote,relative=2]
2399 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
2414 @ref{Note head styles},
2415 @ref{Chorded notes}.
2417 Internals Reference:
2418 @rinternals{note-event},
2419 @rinternals{Note_heads_engraver},
2420 @rinternals{Ledger_line_engraver},
2421 @rinternals{NoteHead},
2422 @rinternals{LedgerLineSpanner},
2423 @rinternals{note-head-interface},
2424 @rinternals{ledger-line-spanner-interface}.
2427 @node Easy notation note heads
2428 @unnumberedsubsubsec Easy notation note heads
2430 @cindex note heads, practice
2431 @cindex practice note heads
2432 @cindex note heads, easy notation
2433 @cindex easy notation
2435 @cindex beginners' music
2436 @cindex music, beginners'
2437 @cindex easy play note heads
2438 @cindex note heads, easy play
2440 @funindex \easyHeadsOn
2441 @funindex easyHeadsOn
2442 @funindex \easyHeadsOff
2443 @funindex easyHeadsOff
2445 The @q{easy play} note head includes a note name inside the head.
2446 It is used in music for beginners. To make the letters readable,
2447 it should be printed in a large font size. To print with a larger
2448 font, see @ref{Setting the staff size}.
2450 @lilypond[verbatim,quote]
2451 #(set-global-staff-size 26)
2463 @code{\easyHeadsOn},
2464 @code{\easyHeadsOff}.
2470 @ref{Setting the staff size}.
2475 Internals Reference:
2476 @rinternals{note-event},
2477 @rinternals{Note_heads_engraver},
2478 @rinternals{NoteHead},
2479 @rinternals{note-head-interface}.
2482 @node Shape note heads
2483 @unnumberedsubsubsec Shape note heads
2485 @cindex note heads, shape
2486 @cindex note heads, Aiken
2487 @cindex note heads, sacred harp
2489 @cindex Aiken shape note heads
2490 @cindex sacred harp note heads
2494 @funindex \aikenHeads
2495 @funindex aikenHeads
2496 @funindex \sacredHarpHeads
2497 @funindex sacredHarpHeads
2499 In shape note head notation, the shape of the note head
2500 corresponds to the harmonic function of a note in the scale. This
2501 notation was popular in nineteenth-century American song books.
2502 Shape note heads can be produced:
2504 @lilypond[verbatim,quote,relative=2]
2511 Shapes are typeset according to the step in the scale, where the
2512 base of the scale is determined by the @code{\key} command.
2517 @code{\sacredHarpHeads}.
2523 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2524 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
2526 To see all note head styles, see @ref{Note head styles}.
2534 @ref{Note head styles}.
2536 Internals Reference:
2537 @rinternals{note-event},
2538 @rinternals{Note_heads_engraver},
2539 @rinternals{NoteHead},
2540 @rinternals{note-head-interface}.
2544 @unnumberedsubsubsec Improvisation
2546 @cindex improvisation
2547 @cindex slashed note heads
2548 @cindex note heads, improvisation
2549 @cindex note heads, slashed
2551 @funindex \improvisationOn
2552 @funindex improvisationOn
2553 @funindex \improvisationOff
2554 @funindex improvisationOff
2556 Improvisation is sometimes denoted with slashed note heads, where
2557 the performer may choose any pitch but should play the specified
2558 rhythm. Such note heads can be created:
2560 @lilypond[verbatim,quote,relative=2]
2562 \consists "Pitch_squash_engraver"
2564 e8 e g a a16( bes) a8 g
2576 @code{\improvisationOn},
2577 @code{\improvisationOff}.
2585 Internals Reference:
2586 @rinternals{Pitch_squash_engraver},
2588 @rinternals{RhythmicStaff}.