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.
13 @lilypondfile[quote,ragged-right,line-width=16\cm,staffsize=16]
16 This section discusses how to specify the pitch of notes. There
17 are three steps to this process: input, modifying, and output.
21 * Changing multiple pitches::
22 * Displaying pitches::
28 @subsection Writing pitches
30 This section discusses how to input pitches. There are two
31 different ways to place notes in octaves: absolute and relative
32 mode. In most cases, relative mode will be more convient.
35 * Absolute octave entry::
36 * Relative octave entry::
38 * Note names in other languages::
42 @node Absolute octave entry
43 @unnumberedsubsubsec Absolute octave entry
48 @cindex absolute octave specification
50 A pitch name is specified using lowercase letters@tie{}@code{a}
51 through@tie{}@code{g}. The note names @code{c} to @code{b} are
52 engraved in the octave below middle C.
54 @c NOTE: don't use c' here.
55 @lilypond[verbatim,quote,ragged-right,fragment]
63 Other octaves may be specified with a single quote@tie{}(@code{'})
64 or comma@tie{}(@code{,}) character. Each@tie{}@code{'} raises the
65 pitch by one octave; each@tie{}@code{,} lowers the pitch by an
68 @lilypond[verbatim,quote,ragged-right,fragment]
70 c' c'' e' g d'' d' d c
72 c, c,, e, g d,, d, d c
77 Snippets: @lsrdir{Pitches}.
80 @node Relative octave entry
81 @unnumberedsubsubsec Relative octave entry
84 @cindex relative octave specification
87 The absolute mode requires a lot of octave specifications, which
88 not only becomes tedious but also easily leads to errors.
89 Therefore, it is usually more convenient to let notes be entered
90 relative to the previous note. This is done with the relative
94 \relative @var{startpitch} @var{musicexpr}
97 In relative mode, each note is assumed to be as close to the
98 previous note as possible. This means that the octave of pitches
99 in @var{musicexpr} is calculated as follows:
103 If no octave changing mark is used on a pitch, its octave is calculated
104 so that the interval with the previous note is less than a fifth. This
105 interval is determined without considering accidentals.
108 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be added to
109 respectively raise or lower a pitch by an extra octave, relatively to
110 the pitch calculated without octave mark.
113 Multiple octave changing marks can be used. For example, @code{''}@tie{}and
114 @code{,,}@tie{} will alter the pitch by two octaves.
117 The pitch of the first note is relative to
118 @code{@var{startpitch}}. @var{startpitch} is specified in
119 absolute octave mode, and it is recommended that it be a octave of
124 Here is the relative mode shown in action:
126 @lilypond[verbatim,quote,ragged-right,fragment]
133 Octave changing marks are used for intervals greater than a
136 @lilypond[verbatim,quote,ragged-right,fragment]
142 A note sequence without a single octave mark can nevertheless span
145 @lilypond[verbatim,quote,ragged-right,fragment]
151 If the preceding item is a chord, the first note of the chord is
152 used as the reference point for the octave placement of a
153 following note or chord. Inside of chords the next note is always
154 relative to the preceding one.
156 @lilypond[verbatim,quote,ragged-right,fragment]
160 % the C is now an octave higher
162 % the C returns to the original pitch
167 When octaves are specified in absolute mode it is easy to
168 accidentally put a pitch in the wrong octave. Relative octave
169 mode reduces these errors since most of the time it is not
170 necessary to indicate any octaves at all. Furthermore, in
171 absolute mode, a single mistake may be difficult to spot; in
172 relative mode, a single error puts the rest of the piece off by
175 As explained above, the octave of pitches is calculated only with the
176 note names, regardless of any alterations. Therefore, an F-sharp
177 following a C will be placed higher than the C, while a G-flat following
178 a C will be placed lower than the C.
180 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
185 In addition, an augmented fourth is considered a smaller interval
186 than a diminished fifth, even though these intervals both span six
187 semitones. Even @qq{worse}, a doubly-augmented fourth is
188 considered a smaller interval than a diminished fifth, even though
189 the doubly-augmented fourth spans seven semitones while the
190 diminished fifth only spans six semitones; that is why a B-sharp
191 following an F will be put above the F.
196 Music Glossary: @rglos{fifth}, @rglos{interval}.
198 Snippets: @lsrdir{Pitches}.
203 The relative conversion will not affect @code{\transpose},
204 @code{\chordmode} or @code{\relative} sections in its argument.
205 To use relative mode within transposed music, an additional
206 @code{\relative} must be placed inside @code{\transpose}.
209 If no @var{startpitch} is specified for @code{\relative},
210 then@tie{}@code{c'} is assumed. However, this is a deprecated
211 option and may disappear in future versions, so its use is
217 @unnumberedsubsubsec Accidentals
219 @warning{New users are sometimes confused about accidentals and
220 key signatures. In LilyPond, note names are the raw input; key
221 signatures and clefs determine how this raw input is displayed.
222 An unaltered note like@tie{}@code{c} means @q{C natural},
223 regardless of the key signature or clef. For more information,
224 see @rlearning{Accidentals and key signatures}.}
226 @cindex note names, Dutch
227 @cindex note names, default
229 A @notation{sharp} pitch is made by adding @code{is} to the name,
230 and a @notation{flat} pitch by adding @code{es}. As you might
231 expect, a @notation{double sharp} or @notation{double flat} is
232 made by adding @code{isis} or @code{eses}. This syntax is derived
233 from Dutch note naming conventions. To use other names for
234 accidentals, see @ref{Note names in other languages}.
236 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
241 A natural will cancel the effect of an accidental or key
242 signature. However, naturals are not encoded into the note name
243 syntax with a suffix; a natural pitch is shown as a simple note
246 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
249 @cindex quarter tones
250 @cindex semi-flats, semi-sharps
252 Half-flats and half-sharps are formed by adding @code{eh} and
253 @code{ih}; the following is a series of Cs with increasing
256 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
257 ceseh1 ces ceh c cih cis cisih
262 @cindex accidental, reminder
263 @cindex accidental, cautionary
264 @cindex accidental, parenthesized
265 @cindex reminder accidental
267 @cindex cautionary accidental
268 @cindex parenthesized accidental
271 Normally accidentals are printed automatically, but you may also
272 print them manually. A reminder accidental can be forced by
273 adding an exclamation mark@tie{}@code{!} after the pitch. A
274 cautionary accidental (i.e., an accidental within parentheses) can
275 be obtained by adding the question mark@tie{}@code{?} after the
276 pitch. These extra accidentals can be used to produce natural
279 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
280 cis cis cis! cis? c c? c! c
283 Accidentals are not printed on tied notes, except when the tie
284 crosses a line break, where a reminder accidental is automatically added:
286 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
287 cis1~ cis~ \break cis
293 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
294 {preventing-extra-naturals-from-being-automatically-added.ly}
298 Music Glossary: @rglos{sharp}, @rglos{flat}, @rglos{double sharp},
299 @rglos{double flat}, @rglos{Pitch names}.
301 Learning Manual: @rlearning{Accidentals and key signatures}.
303 Notation Reference: @ref{Automatic accidentals},
304 @ref{Musica ficta accidentals},
305 @ref{Note names in other languages}.
307 Snippets: @lsrdir{Pitches},
309 dodecaphonic-style-accidentals-for-each-note-including-naturals.ly},
310 @lsr{Pitches, makam.ly}.
315 There are no generally accepted standards for denoting
316 three-quarter flats, so LilyPond's symbol does not conform to any
321 @node Note names in other languages
322 @unnumberedsubsubsec Note names in other languages
324 There are predefined sets of note names for various other
325 languages. To use them, include the language specific init file.
326 For example, add @code{\include "english.ly"} to the top of the
327 input file. The available language files and the note names they
330 @cindex note names, other languages
333 @multitable @columnfractions .2 .6 .05 .05 .05 .05
336 @tab sharp @tab flat @tab double sharp @tab double flat
338 @tab c d e f g a bes b
339 @tab -is @tab -es @tab -isis @tab -eses
341 @tab c d e f g a bf b
342 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
346 @tab -is @tab -es @tab -isis @tab -eses
349 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
353 @tab -iss @tab -ess @tab -ississ @tab -essess
356 @tab -is @tab -es @tab -isis @tab -eses
358 @tab do re mi fa sol la sib si
359 @tab -d @tab -b @tab -dd @tab -bb
361 @tab do re mi fa sol la sib si
362 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
364 @tab do re mi fa sol la sib si
365 @tab -s @tab -b @tab -ss @tab -bb
367 @tab do re mi fa sol la sib si
368 @tab -s @tab -b @tab -ss @tab -bb
370 @tab do re mi fa sol la sib si
371 @tab -k @tab -b @tab -kk @tab -bb
375 In Dutch, @code{aes} is contracted to @code{as}, but both forms
376 are accepted in LilyPond. Similarly, both @code{es} and
377 @code{ees} are accepted:
379 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
383 Note that in some languages such as Norwegian and Swedish, the
384 usual spelling for accidentals is a double @q{s} such as in
385 @code{ciss} or @code{cess}. For both historical reasons and a
386 greater simplicity, LilyPond uses a single @q{s} for all these
389 Similarly, in Germanic and Nordic languages, alterations
390 of@tie{}@code{a}, like for example @code{aes} and @code{aeses},
391 are usually contracted to @code{as} and @code{ases} (or more
392 commonly @code{asas}). This also applies to @code{eeses} being
393 accepted as @code{eses}. Sometimes only these contracted names
394 are defined in the corresponding language files (this also applies
395 to the suffixes for quartertones below).
397 Some music uses microtones whose alterations are fractions of a
398 @q{normal} sharp or flat. The note names for quartertones defined
399 in the various language files are listed in the following table.
400 Here the prefixes @q{semi-} and @q{sesqui-} mean @q{half} and
401 @q{one and a half}, respectively. For the other languages, no
402 special names have been defined yet.
405 @multitable @columnfractions .2 .6 .05 .05 .05 .05
408 @tab semi- @tab semi- @tab sesqui- @tab sesqui-
411 @tab c d e f g a bes b
412 @tab -ih @tab -eh @tab -isih @tab -eseh
414 @tab c d e f g a bf b
415 @tab -qs @tab -qf @tab -tqs @tab -tqf
418 @tab -ih @tab -eh @tab -isih @tab -eseh
421 @c @tab c d e f g a b h
423 @c @tab c d e f g a b h
425 @tab do re mi fa sol la sib si
426 @tab -sd @tab -sb @tab -dsd @tab -bsb
428 @c @tab do re mi fa sol la sib si
430 @c @tab do re mi fa sol la sib si
432 @tab do re mi fa sol la sib si
433 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
439 Snippets: @lsrdir{Pitches}.
442 @node Changing multiple pitches
443 @subsection Changing multiple pitches
445 This section discusses how to modify pitches.
453 @unnumberedsubsubsec Octave check
457 In relative mode, it is easy to forget an octave changing mark.
458 Octave checks make such errors easier to correct. A note may be
459 followed by @code{=}@var{quotes} to indicate what its absolute
460 octave should be. In the following example,
463 \relative c'' @{ c g d='' @}
467 the@tie{}@code{d} will generate a warning, because
468 a@tie{}@code{d''} is expected, as indicated by the octave check
469 @code{=''}, but a@tie{}@code{d'} is found, since both
470 @code{c}-@code{g} and @code{g}-@code{d} without octavation marks
471 are descending fourths. In the output, the octave is corrected to
472 be a@tie{}@code{d''} and the next note is calculated relative
473 to@tie{}@code{d''} instead of@tie{}@code{d'}.
475 There is also an octave check that produces no visible output.
479 @var{pitch} \octave @var{controlpitch}
483 where @var{pitch} is a regular note within a music expression in
484 relative mode and @var{controlpitch} is a pitch in absolute mode.
485 This checks that @var{pitch} lies within the octave surrounding
486 @var{controlpitch}, i.e. not more than a fourth above or below it.
487 If this is not the case, a warning is printed and the octave is
488 corrected. The @var{controlpitch} is not printed as a note.
490 In the example below, the first check passes without incident,
491 since the@tie{}@code{e} (in @code{relative} mode) is within the
492 octave range of@tie{}@code{a'}. However, the second check
493 produces a warning, since the@tie{}@code{e} is not within the
494 octave range of@tie{}@code{b'}. The warning message is printed,
495 and the octave is adjusted so that the following notes are in the
496 correct octave once again.
506 The octave of a note following an @code{\octave} check is
507 determined with respect to the note preceding it, as modified by
508 the outcome of the octave check. In the next fragment, the first
509 note, an@tie{}@code{e'}, lies within the octave of@tie{}@code{b},
510 and the @code{\octave} check passes successfully. The second note
511 is then calculated relative to (absolute)@tie{}@code{e'}, which
512 yields an@tie{}@code{a'}, above middle@tie{}C. In this case, the
513 check had no influence on the output of the piece.
515 The second @code{\octave} check fails: @code{a'}@tie{}is not
516 within the range of@tie{}@code{b}. A warning is issued, and the
517 last note is calculated relative to@tie{}@code{a}, not
518 to@tie{}@code{a'}, and we get a@tie{}@code{d'}. Without the last
519 @code{\octave} check, the last note would have been
522 @lilypond[verbatim,quote,ragged-right,fragment]
534 Snippets: @lsrdir{Pitches}.
538 @unnumberedsubsubsec Transpose
541 @cindex transposition of pitches
544 A music expression can be transposed with @code{\transpose}. The
548 \transpose @var{from} @var{to} @var{musicexpr}
552 This means that @var{musicexpr} is transposed by the interval
553 between the pitches @var{from} and @var{to}: any note with pitch
554 @var{from} is changed to @var{to} and any other note is transposed
555 by the same interval.
557 Consider a piece written in the key of D-major. If this piece is
558 a little too low for its performer, it can be transposed up to
562 \transpose d e @dots{}
565 Consider a part written for violin (a C instrument). If this part is to
566 be played on the A clarinet (for which an A is notated as a C, and thus
567 sounds a minor third lower than notated), the appropriate part will be
571 \transpose a c' @dots{}
574 @code{\transpose} will also transpose key signatures:
576 @lilypond[verbatim,quote,ragged-right]
577 mus = { \key d \major cis d fis g }
586 @code{\transpose} distinguishes between enharmonic pitches: both
587 @code{\transpose c cis} or @code{\transpose c des} will transpose
588 up half a tone. The first version will print sharps and the notes
589 will remain on the same scale step, the second version will print
590 flats on the scale step above.
592 @lilypond[verbatim,quote,ragged-right]
593 mus = \relative c' { c d e f }
595 \transpose c cis { \mus }
596 \transpose c des { \mus }
600 @cindex transposing instruments
602 @code{\transpose} may also be used in a different way, to input
603 written notes for a transposing instrument. The previous examples
604 show how to enter pitches in C (or @notation{concert pitch}) and
605 typeset them for a transposing instrument, but the opposite is
606 also possible if you for example have a set of instrumental parts
607 and want to print a conductor's score. For example, when entering
608 music for a B-flat trumpet which begins on a notated E (concert
612 musicInBflat = @{ e4 @dots{} @}
613 \transpose c bes, \musicInBflat
617 To print this music in F (e.g., rearranging to a French horn) you
618 could wrap the existing music with another @code{\transpose}:
621 musicInBflat = @{ e4 @dots{} @}
622 \transpose f c' @{ \transpose c bes, \musicInBflat @}
626 For more information about transposing instruments,
627 see @ref{Instrument transpositions}.
631 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
632 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
637 Notation Reference: @ref{Instrument transpositions}.
639 Snippets: @lsrdir{Pitches}.
641 Internals Reference: @internalsref{TransposedMusic}.
645 If you want to use both @code{\transpose} and @code{\relative},
646 you must put @code{\transpose} outside of @code{\relative}, since
647 @code{\relative} will have no effect on music that appears inside
648 a @code{\transpose}. See the previous example.
651 @node Displaying pitches
652 @subsection Displaying pitches
654 This section discusses how to alter the output of pitches.
660 * Instrument transpositions::
661 * Automatic accidentals::
666 @unnumberedsubsubsec Clef
680 @cindex mezzosoprano clef
681 @cindex baritone clef
682 @cindex varbaritone clef
685 The clef is set with the @code{\clef} @var{clefname} command:
687 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
698 The clef can also be changed inside the staff:
700 @lilypond[verbatim,quote,ragged-right,fragment]
718 These same clef symbols are used in different positions on the staff to
719 change the range of notes shown by that staff. The treble (respectively
720 alto, bass) clef is always positioned to show the line on which
721 a@tie{}@code{g'} (resp. @code{c'}, @code{f}) note is printed.
723 Supported clefs include
725 @multitable @columnfractions .4 .6
726 @headitem Clef @tab Position
727 @item @code{treble, violin, G, G2} @tab
728 G clef (g') on 2nd line
729 @item @code{alto, C} @tab
730 C clef (c') on 3rd line
731 @item @code{tenor} @tab
732 C clef (c') on 4th line
733 @item @code{bass, F} @tab
734 F clef (f) on 4th line
735 @item @code{french} @tab
736 G clef (g') on 1st line, so-called French violin clef
737 @item @code{soprano} @tab
738 C clef (c') on 1st line
739 @item @code{mezzosoprano} @tab
740 C clef (c') on 2nd line
741 @item @code{baritone} @tab
742 C clef (c') on 5th line
743 @item @code{varbaritone} @tab
744 F clef (f) on 3rd line
745 @item @code{subbass} @tab
746 F clef (f) on 5th line
747 @item @code{percussion} @tab
749 @item @code{tab} @tab
753 Further supported clefs are described under @ref{Ancient clefs}.
755 By adding @code{_8} or @code{^8} to the clef name, the clef is
756 transposed one octave down or up, respectively, and @code{_15} and
757 @code{^15} transposes by two octaves. The argument @var{clefname}
758 must be enclosed in quotes when it contains underscores or digits.
761 @cindex choral tenor clef
763 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
770 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
771 {clefs-commonly-tweaked-properties.ly}
776 Notation Reference: @ref{Ancient clefs}.
778 Snippets: @lsrdir{Pitches}.
780 Internals Reference: @internalsref{Clef}.
784 @unnumberedsubsubsec Key signature
786 @cindex key signature
789 @warning{New users are sometimes confused about accidentals and
790 key signatures. In LilyPond, note names are the raw input; key
791 signatures and clefs determine how this raw input is displayed.
792 An unaltered note like@tie{}@code{c} means @q{C natural},
793 regardless of the key signature or clef. For more information,
794 see @rlearning{Accidentals and key signatures}.}
796 The key signature indicates the tonality in which a piece is
797 played. It is denoted by a set of alterations (flats or sharps)
798 at the start of the staff.
800 Setting or changing the key signature is done with the @code{\key}
804 \key @var{pitch} @var{mode}
813 @funindex \mixolydian
819 Here, @var{mode} should be @code{\major} or @code{\minor} to get
820 @var{pitch}-major or @var{pitch}-minor, respectively. You may
821 also use the standard mode names, also called @q{church modes}:
822 @code{\ionian}, @code{\locrian}, @code{\aeolian},
823 @code{\mixolydian}, @code{\lydian}, @code{\phrygian}, and
826 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
835 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
836 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
838 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
839 {non-traditional-key-signatures.ly}
844 Music Glossary: @rglos{church mode}, @rglos{scordatura}.
846 Learning Manual: @rlearning{Accidentals and key signatures}.
848 Snippets: @lsrdir{Pitches}.
850 Internals Reference: @internalsref{KeyCancellation},
851 @internalsref{KeySignature}, @internalsref{Key_engraver}.
854 @node Ottava brackets
855 @unnumberedsubsubsec Ottava brackets
863 @notation{Ottava brackets} introduce an extra transposition of an
864 octave for the staff:
866 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
874 The @code{set-octavation} function also takes -1 (for 8va bassa),
875 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
876 Internally the function sets the properties @code{ottavation}
877 (e.g., to @code{"8va"} or @code{"8vb"}) and
878 @code{middleCPosition}. To override the text of the bracket, set
879 @code{ottavation} after invoking @code{set-octavation}, i.e.,
881 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
883 \set Staff.ottavation = #"8"
890 Music Glossary: @rglos{ottava}.
892 Snippets: @lsrdir{Pitches}.
894 Internals Reference: @internalsref{OttavaBracket}.
899 @c FIXME: This should have been fixed by Joe.
900 @c If it hasn't, we should mention the appropriate
901 @c workaround (there is a snippet in the LSR) -vv
902 @code{set-octavation} will get confused when clef changes happen
903 during an octavation bracket.
906 @node Instrument transpositions
907 @unnumberedsubsubsec Instrument transpositions
909 @cindex transposition, MIDI
910 @cindex transposition, instrument
912 When typesetting scores that involve transposing instruments, some
913 parts can be typeset in a different pitch than the
914 @notation{concert pitch}.
916 The key of a @notation{transposing instrument} can be specified.
917 This applies to many wind instruments, for example, clarinets
918 (B-flat, A, and E-flat), horn (F) and trumpet (B-flat, C, D, and
921 For such instruments, LilyPond will print a correct part, but is
922 not aware whether the instrument is playing in concert pitch or
923 not. This can lead to problems if you want a MIDI output, or if
924 you quote other parts in a transposing staff. In such cases, an
925 explicit transposition must be specified:
928 \transposition @var{pitch}
932 where @var{pitch} specifies the key in which the instrument plays.
933 For example, a part for B-flat clarinet would include:
939 This command sets the property @code{instrumentTransposition}.
940 The value of this property is used for MIDI output and quotations.
941 MIDI output is transposed to play at concert pitch, and cue notes
942 and quotations are automatically transposed to the key of the
943 instrument in which they are quoted. For more information about
944 quotations, see @ref{Quoting other voices}.
946 The pitch to use for @code{\transposition} should correspond to
947 the real sound heard when a@tie{}@code{c'} written on the staff is
948 played by the transposing instrument. @code{\transposition}
949 should be used when the music is entered from an orchestral part
950 written for the instrument. For example, in classical horn parts,
951 the tuning of the instrument is often changed during a piece.
952 Here are a few notes for a violin and a B-flat clarinet where the
953 parts have been entered using the notes and key as they appear in
954 each part or the conductor's score:
956 @lilypond[verbatim,quote,ragged-right]
958 \new Staff = "Violin I" {
959 \set Staff.instrumentName = "Vln"
960 \set Staff.midiInstrument="violin"
963 g'4( c''8) r c'' r c''4
965 \new Staff = "Clarinet" {
966 \set Staff.instrumentName = "Cl"
967 \set Staff.midiInstrument="clarinet"
970 a'4( d''8) r d'' r d''4
975 Without the @code{\transposition} command the MIDI output of this
976 music would play the notes a tone apart; with it the notes are
977 played correctly in unison.
979 However, when entering the notes of a score in concert pitch, when
980 all voices are entered in C, they may be prefaced by (the default)
981 @code{\transposition c'}:
995 to serve as a reminder that these parts are written in C.
1000 Music Glossary: @c TODO @rglos{concert pitch}
1002 Notation Reference: @ref{Quoting other voices}, @ref{Transpose}.
1004 Snippets: @lsrdir{Pitches}.
1007 @node Automatic accidentals
1008 @unnumberedsubsubsec Automatic accidentals
1009 @cindex automatic accidentals
1011 @funindex set-accidental-style
1013 There are many different conventions on how to typeset
1014 accidentals. LilyPond provides a function to specify which such
1015 accidental style to use. This function is called as follows
1019 #(set-accidental-style 'voice)
1024 The accidental style applies to the current @code{Staff} by
1025 default (with the exception of the styles @code{piano} and
1026 @code{piano-cautionary}, which are explained below). Optionally,
1027 the function can take a second argument which determines in which
1028 scope the style should be changed. For example, to use the same
1029 style in all staves of the current @code{StaffGroup}, use
1032 #(set-accidental-style 'voice 'StaffGroup)
1035 The following accidental styles are supported. To demonstrate
1036 each style, we use the following example:
1038 @lilypond[verbatim,quote,ragged-right]
1042 cis'8 fis, d'4 <a cis>8 f bis4 |
1056 \voiceTwo \relative c' {
1060 \change Staff = down
1064 \change Staff = down
1065 <fis, a cis>4 gis <f a d>2 |
1072 \context Staff = "up" {
1073 %%% change the next line as desired:
1074 #(set-accidental-style 'default)
1077 \context Staff = "down" {
1078 %%% change the next line as desired:
1079 #(set-accidental-style 'default)
1086 Note that the last lines of this example can be replaced by the
1087 following, as long as the same accidental style should be used in
1092 \context Staff = "up" @{
1093 %%% change the next line as desired:
1094 #(set-accidental-style 'default 'Score)
1097 \context Staff = "down" @{
1105 @c NOTE: don't use verbatim in this table.
1108 This is the default typesetting behavior. It corresponds to
1109 eighteenth-century common practice: accidentals are remembered to
1110 the end of the measure in which they occur and only on their own
1111 octave. Thus, in the example below, no natural signs are printed
1112 before the@tie{}@code{b} in the second measure or the
1115 @lilypond[quote,ragged-right]
1119 cis'8 fis, d'4 <a cis>8 f bis4 |
1133 \voiceTwo \relative c' {
1137 \change Staff = down
1141 \change Staff = down
1142 <fis, a cis>4 gis <f a d>2 |
1149 \context Staff = "up" {
1150 #(set-accidental-style 'default)
1153 \context Staff = "down" {
1154 #(set-accidental-style 'default)
1162 The normal behavior is to remember the accidentals on Staff-level.
1163 In this style, however, accidentals are typeset individually for
1164 each voice. Apart from that, the rule is similar to
1167 As a result, accidentals from one voice do not get canceled in
1168 other voices, which is often an unwanted result: in the following
1169 example, it is hard to determine whether the second@tie{}@code{a}
1170 should be played natural or sharp. The @code{voice} option should
1171 therefore be used only if the voices are to be read solely by
1172 individual musicians. If the staff is to be used by one musician
1173 (e.g., a conductor or in a piano score) then @code{modern} or
1174 @code{modern-cautionary} should be used instead.
1177 @lilypond[quote,ragged-right]
1181 cis'8 fis, d'4 <a cis>8 f bis4 |
1195 \voiceTwo \relative c' {
1199 \change Staff = down
1203 \change Staff = down
1204 <fis, a cis>4 gis <f a d>2 |
1211 \context Staff = "up" {
1212 #(set-accidental-style 'voice)
1215 \context Staff = "down" {
1216 #(set-accidental-style 'voice)
1224 @funindex modern style accidentals
1226 This rule corresponds to the common practice in the twentieth
1227 century. It prints the same accidentals as @code{default}, with
1228 two exceptions which serve to avoid ambiguity: after temporary
1229 accidentals, cancellation marks are printed also in the following
1230 measure (for notes in the same octave) and, in the same measure,
1231 for notes in other octaves. Hence the naturals before
1232 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1235 @lilypond[quote,ragged-right]
1239 cis'8 fis, d'4 <a cis>8 f bis4 |
1253 \voiceTwo \relative c' {
1257 \change Staff = down
1261 \change Staff = down
1262 <fis, a cis>4 gis <f a d>2 |
1269 \context Staff = "up" {
1270 #(set-accidental-style 'modern)
1273 \context Staff = "down" {
1274 #(set-accidental-style 'modern)
1281 @item modern-cautionary
1282 @funindex modern-cautionary
1284 This rule is similar to @code{modern}, but the @q{extra}
1285 accidentals (the ones not typeset by @code{default}) are typeset
1286 as cautionary accidentals. They are by default printed with
1287 parentheses, but they can also be printed in reduced size by
1288 defining the @code{cautionary-style} property of
1289 @code{AccidentalSuggestion}.
1292 @lilypond[quote,ragged-right]
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 'modern-cautionary)
1330 \context Staff = "down" {
1331 #(set-accidental-style 'modern-cautionary)
1339 @funindex modern-voice
1341 This rule is used for multivoice accidentals to be read both by
1342 musicians playing one voice and musicians playing all voices.
1343 Accidentals are typeset for each voice, but they @emph{are}
1344 canceled across voices in the same @code{Staff}. Hence,
1345 the@tie{}@code{a} in the last measure is canceled because the
1346 previous cancellation was in a different voice, and
1347 the@tie{}@code{d} in the lower staff is canceled because of the
1348 accidental in a different voice in the previous measure:
1351 @lilypond[quote,ragged-right]
1355 cis'8 fis, d'4 <a cis>8 f bis4 |
1369 \voiceTwo \relative c' {
1373 \change Staff = down
1377 \change Staff = down
1378 <fis, a cis>4 gis <f a d>2 |
1385 \context Staff = "up" {
1386 #(set-accidental-style 'modern-voice)
1389 \context Staff = "down" {
1390 #(set-accidental-style 'modern-voice)
1397 @funindex modern-voice-cautionary
1398 @item modern-voice-cautionary
1400 This rule is the same as @code{modern-voice}, but with the extra
1401 accidentals (the ones not typeset by @code{voice}) typeset
1402 as cautionaries. Even though all accidentals typeset by
1403 @code{default} @emph{are} typeset with this rule,
1404 some of them are typeset as cautionaries.
1406 @lilypond[quote,ragged-right]
1410 cis'8 fis, d'4 <a cis>8 f bis4 |
1424 \voiceTwo \relative c' {
1428 \change Staff = down
1432 \change Staff = down
1433 <fis, a cis>4 gis <f a d>2 |
1440 \context Staff = "up" {
1441 #(set-accidental-style 'modern-voice-cautionary)
1444 \context Staff = "down" {
1445 #(set-accidental-style 'modern-voice-cautionary)
1453 @funindex piano accidentals
1455 This rule reflects twentieth-century practice for piano notation.
1456 Its behavior is very similar to @code{modern} style, but here
1457 accidentals also get canceled across the staves in the same
1458 GrandStaff or PianoStaff, hence all the cancellations of the final
1461 This accidental style applies to the current @code{GrandStaff} or
1462 @code{PianoStaff} by default.
1464 @lilypond[quote,ragged-right]
1468 cis'8 fis, d'4 <a cis>8 f bis4 |
1482 \voiceTwo \relative c' {
1486 \change Staff = down
1490 \change Staff = down
1491 <fis, a cis>4 gis <f a d>2 |
1498 \context Staff = "up" {
1499 #(set-accidental-style 'piano)
1502 \context Staff = "down" {
1509 @item piano-cautionary
1510 @funindex #(set-accidental-style 'piano-cautionary)
1512 Same as @code{#(set-accidental-style 'piano)} but with the extra
1513 accidentals typeset as cautionaries.
1515 @lilypond[quote,ragged-right]
1519 cis'8 fis, d'4 <a cis>8 f bis4 |
1533 \voiceTwo \relative c' {
1537 \change Staff = down
1541 \change Staff = down
1542 <fis, a cis>4 gis <f a d>2 |
1549 \context Staff = "up" {
1550 #(set-accidental-style 'piano-cautionary)
1553 \context Staff = "down" {
1561 @funindex no-reset accidental style
1563 This is the same as @code{default} but with accidentals lasting
1564 @q{forever} and not only within the same measure:
1566 @lilypond[quote,ragged-right]
1570 cis'8 fis, d'4 <a cis>8 f bis4 |
1584 \voiceTwo \relative c' {
1588 \change Staff = down
1592 \change Staff = down
1593 <fis, a cis>4 gis <f a d>2 |
1600 \context Staff = "up" {
1601 #(set-accidental-style 'no-reset)
1604 \context Staff = "down" {
1605 #(set-accidental-style 'no-reset)
1613 @funindex forget accidental style
1615 This is the opposite of @code{no-reset}: Accidentals are not
1616 remembered at all -- and hence all accidentals are typeset
1617 relative to the key signature, regardless of what was before in
1620 @lilypond[quote,ragged-right]
1624 cis'8 fis, d'4 <a cis>8 f bis4 |
1638 \voiceTwo \relative c' {
1642 \change Staff = down
1646 \change Staff = down
1647 <fis, a cis>4 gis <f a d>2 |
1654 \context Staff = "up" {
1655 #(set-accidental-style 'forget)
1658 \context Staff = "down" {
1659 #(set-accidental-style 'forget)
1669 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1670 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
1675 Snippets: @lsrdir{Pitches}.
1677 Internals Reference: @internalsref{Accidental_engraver},
1678 @internalsref{Accidental}, @internalsref{AccidentalSuggestion},
1679 @internalsref{AccidentalPlacement}, @internalsref{GrandStaff} and
1680 @internalsref{PianoStaff}, @internalsref{Staff}.
1685 Simultaneous notes are considered to be entered in sequential
1686 mode. This means that in a chord the accidentals are typeset as
1687 if the notes in the chord happen one at a time, in the order in
1688 which they appear in the input file. This is a problem when
1689 accidentals in a chord depend on each other, which does not happen
1690 for the default accidental style. The problem can be solved by
1691 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
1696 @unnumberedsubsubsec Ambitus
1699 The term @notation{ambitus} or @notation{ambit} denotes a range of
1700 pitches for a given voice in a part of music. It may also denote
1701 the pitch range that a musical instrument is capable of playing.
1702 Ambits are printed on vocal parts, so performers can easily
1703 determine if it matches their capabilities.
1705 Ambits are denoted at the beginning of a piece near the initial
1706 clef. The range is graphically specified by two note heads that
1707 represent the minimum and maximum pitch. Accidentals are only
1708 printed if they are not part of the key signature.
1710 @lilypond[verbatim,quote,ragged-right]
1714 \consists Ambitus_engraver
1726 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1727 {adding-ambiti-per-voice.ly}
1729 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1730 {ambiti-multiple-voices.ly}
1735 Snippets: @lsrdir{Pitches}.
1737 Internals Reference: @internalsref{Ambitus},
1738 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
1739 @internalsref{AmbitusAccidental}, @internalsref{Ambitus_engraver},
1740 @internalsref{Staff}, @internalsref{Voice}.
1745 There is no collision handling in the case of multiple per-voice
1750 @subsection Note heads
1753 * Special note heads::
1754 * Easy notation note heads::
1755 * Shape note heads::
1759 @node Special note heads
1760 @unnumberedsubsubsec Special note heads
1762 @cindex note heads, special
1764 Different note heads are used by various instruments for various
1765 meanings -- crosses are used for @q{parlato} with vocalists,
1766 stopped notes on guitar; diamonds are used for harmonics on string
1767 instruments, etc. There is a shorthand (@code{\harmonic}) for
1768 diamond shapes; the other note head styles are produced by tweaking
1771 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
1773 \override NoteHead #'style = #'cross
1775 \revert NoteHead #'style
1776 e d <c f\harmonic> <d a'\harmonic>
1780 To see all note head styles, please see @ref{Note head styles}.
1785 Snippets: @lsrdir{Pitches}.
1787 Notation Reference: @ref{Note head styles}.
1789 Internals Reference: @internalsref{NoteHead}.
1792 @node Easy notation note heads
1793 @unnumberedsubsubsec Easy notation note heads
1795 @cindex note heads, practice
1796 @cindex note heads, easy notation
1797 @cindex easy notation
1800 The @q{easy play} note head includes a note name inside the head.
1801 It is used in music for beginners
1803 @lilypond[verbatim,quote,ragged-right,fragment,staffsize=26]
1809 The command @code{\setEasyHeads} overrides settings for the
1810 @code{NoteHead} object. To make the letters readable, it
1811 has to be printed in a large font size. To print with a larger
1812 font, see @ref{Setting the staff size}.
1816 @funindex \setEasyHeads
1817 @code{\setEasyHeads}
1821 Notation Reference: @ref{Setting the staff size}.
1823 Snippets: @lsrdir{Pitches},
1825 Internals Reference: @internalsref{NoteHead}.
1828 @node Shape note heads
1829 @unnumberedsubsubsec Shape note heads
1831 @cindex note heads, shape
1833 In shape note head notation, the shape of the note head
1834 corresponds to the harmonic function of a note in the scale. This
1835 notation was popular in nineteenth-century American song books.
1837 Shape note heads can be produced by setting @code{\aikenHeads} or
1838 @code{\sacredHarpHeads}, depending on the style desired.
1840 @lilypond[verbatim,fragment,relative=1]
1847 Shapes are typeset according to the step in the scale, where
1848 the base of the scale is determined by the @code{\key} command.
1851 @funindex shapeNoteStyles
1852 @funindex \aikenHeads
1853 @funindex \sacredHarpHeads
1855 Shape note heads are implemented through the
1856 @code{shapeNoteStyles} property. Its value is a vector of
1857 symbols. The k-th element indicates the style to use for the k-th
1858 step of the scale. Arbitrary combinations are possible, e.g.:
1860 @lilypond[verbatim,fragment,relative=1]
1861 \set shapeNoteStyles =
1862 ##(cross triangle fa #f mensural xcircle diamond)
1868 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1869 {applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
1874 Snippets: @lsrdir{Pitches}.
1878 @unnumberedsubsubsec Improvisation
1880 @cindex improvisation
1881 @cindex slashed note heads
1882 @cindex note heads, improvisation
1883 @cindex note heads, slashed
1885 Improvisation is sometimes denoted with slashed note heads. Such
1886 note heads can be created by adding a @code{Pitch_squash_engraver}
1887 to the @code{Voice} context. Then, the following command
1890 \set squashedPosition = #0
1891 \override NoteHead #'style = #'slash
1895 switches on the slashes.
1897 There are shortcuts @code{\improvisationOn} (and an accompanying
1898 @code{\improvisationOff}) for this command sequence. They are
1899 used in the following example:
1901 @lilypond[verbatim,quote,ragged-right]
1903 \consists Pitch_squash_engraver
1905 e8 e g a a16(bes)(a8) g
1917 Snippets: @lsrdir{Pitches}.
1919 Internals Reference: @internalsref{Pitch_squash_engraver},
1920 @internalsref{Voice}.