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
176 the note names, regardless of any alterations. Therefore, an
177 E-double-sharp sharp following a B will be placed higher, while an
178 F-double-flat would be placed lower. In other words, a
179 double-augmented fourth is considered a smaller interval than a
180 double-diminished fifth, regardless of the number of semitones
181 that each interval contains.
183 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
193 Music Glossary: @rglos{fifth}, @rglos{interval}.
195 Snippets: @lsrdir{Pitches}.
200 The relative conversion will not affect @code{\transpose},
201 @code{\chordmode} or @code{\relative} sections in its argument.
202 To use relative mode within transposed music, an additional
203 @code{\relative} must be placed inside @code{\transpose}.
206 If no @var{startpitch} is specified for @code{\relative},
207 then@tie{}@code{c'} is assumed. However, this is a deprecated
208 option and may disappear in future versions, so its use is
214 @unnumberedsubsubsec Accidentals
216 @warning{New users are sometimes confused about accidentals and
217 key signatures. In LilyPond, note names are the raw input; key
218 signatures and clefs determine how this raw input is displayed.
219 An unaltered note like@tie{}@code{c} means @q{C natural},
220 regardless of the key signature or clef. For more information,
221 see @rlearning{Accidentals and key signatures}.}
223 @cindex note names, Dutch
224 @cindex note names, default
226 A @notation{sharp} pitch is made by adding @code{is} to the name,
227 and a @notation{flat} pitch by adding @code{es}. As you might
228 expect, a @notation{double sharp} or @notation{double flat} is
229 made by adding @code{isis} or @code{eses}. This syntax is derived
230 from Dutch note naming conventions. To use other names for
231 accidentals, see @ref{Note names in other languages}.
233 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
238 A natural will cancel the effect of an accidental or key
239 signature. However, naturals are not encoded into the note name
240 syntax with a suffix; a natural pitch is shown as a simple note
243 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
246 @cindex quarter tones
247 @cindex semi-flats, semi-sharps
249 Half-flats and half-sharps are formed by adding @code{eh} and
250 @code{ih}; the following is a series of Cs with increasing
253 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
254 ceseh1 ces ceh c cih cis cisih
259 @cindex accidental, reminder
260 @cindex accidental, cautionary
261 @cindex accidental, parenthesized
262 @cindex reminder accidental
264 @cindex cautionary accidental
265 @cindex parenthesized accidental
268 Normally accidentals are printed automatically, but you may also
269 print them manually. A reminder accidental can be forced by
270 adding an exclamation mark@tie{}@code{!} after the pitch. A
271 cautionary accidental (i.e., an accidental within parentheses) can
272 be obtained by adding the question mark@tie{}@code{?} after the
273 pitch. These extra accidentals can be used to produce natural
276 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
277 cis cis cis! cis? c c? c! c
280 Accidentals are only printed on tied notes which begin a new
283 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
284 cis1~ cis~ \break cis
290 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
291 {preventing-extra-naturals-from-being-automatically-added.ly}
295 Music Glossary: @rglos{sharp}, @rglos{flat}, @rglos{double sharp},
296 @rglos{double flat}, @rglos{Pitch names}.
298 Learning Manual: @rlearning{Accidentals and key signatures}.
300 Notation Reference: @ref{Automatic accidentals},
301 @ref{Musica ficta accidentals},
302 @ref{Note names in other languages}.
304 Snippets: @lsrdir{Pitches},
306 dodecaphonic-style-accidentals-for-each-note-including-naturals.ly},
307 @lsr{Pitches, makam.ly}.
312 There are no generally accepted standards for denoting
313 three-quarter flats, so LilyPond's symbol does not conform to any
318 @node Note names in other languages
319 @unnumberedsubsubsec Note names in other languages
321 There are predefined sets of note names for various other
322 languages. To use them, include the language specific init file.
323 For example, add @code{\include "english.ly"} to the top of the
324 input file. The available language files and the note names they
327 @cindex note names, other languages
330 @multitable {nederlands.ly a} {do re mi fa sol la sib si a} {-iss/-is a} {-ess/-es a} {-ississ/-isis a} {-ississ/-isis a}
333 @tab sharp @tab flat @tab double sharp @tab double flat
335 @tab c d e f g a bes b
336 @tab -is @tab -es @tab -isis @tab -eses
338 @tab c d e f g a bf b
339 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
343 @tab -is @tab -es @tab -isis @tab -eses
346 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
350 @tab -iss @tab -ess @tab -ississ @tab -essess
353 @tab -is @tab -es @tab -isis @tab -eses
355 @tab do re mi fa sol la sib si
356 @tab -d @tab -b @tab -dd @tab -bb
358 @tab do re mi fa sol la sib si
359 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
361 @tab do re mi fa sol la sib si
362 @tab -s @tab -b @tab -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 -k @tab -b @tab -kk @tab -bb
372 Some music uses microtones whose alterations are fractions of a
373 @q{normal} sharp or flat. The note names for quartertones defined
374 in the various language files are listed in the following table.
375 Here the prefixes @notation{semi-} and @notation{sesqui-} mean
376 @q{half} and @q{one and a half}, respectively. For the other
377 languages, no special names have been defined yet.
380 @multitable {nederlands.ly a} {do re mi fa sol la sib si a} {-iss/-is a} {-ess/-es a} {-ississ/-isis a} {-ississ/-isis a}
383 @tab semi- @tab semi- @tab sesqui- @tab sesqui-
386 @tab c d e f g a bes b
387 @tab -ih @tab -eh @tab -isih @tab -eseh
389 @tab c d e f g a bf b
390 @tab -qs @tab -qf @tab -tqs @tab -tqf
393 @tab -ih @tab -eh @tab -isih @tab -eseh
395 @tab do re mi fa sol la sib si
396 @tab -sd @tab -sb @tab -dsd @tab -bsb
398 @tab do re mi fa sol la sib si
399 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
403 In Dutch, @code{aes} is contracted to @code{as}, but both forms
404 are accepted in LilyPond. Similarly, both @code{es} and
405 @code{ees} are accepted. This also applies to
406 @code{aeses}@tie{}/@tie{}@code{ases} and
407 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
408 contracted names are defined in the corresponding language files.
410 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
411 a2 as e es a ases e eses
414 Note that in some languages such as Norwegian and Swedish, the
415 usual spelling for accidentals is a double @q{s} such as in
416 @code{ciss} or @code{cess}. For both historical reasons and a
417 greater simplicity, LilyPond uses a single @q{s} for all these
422 Snippets: @lsrdir{Pitches}.
425 @node Changing multiple pitches
426 @subsection Changing multiple pitches
428 This section discusses how to modify pitches.
436 @unnumberedsubsubsec Octave check
440 In relative mode, it is easy to forget an octave changing mark.
441 Octave checks make such errors easier to correct. A note may be
442 followed by @code{=}@var{quotes} to indicate what its absolute
443 octave should be. In the following example,
452 the@tie{}@code{d} will generate a warning, because
453 a@tie{}@code{d''} is expected, as indicated by the octave check
454 @code{=''}, but a@tie{}@code{d'} is found, since both
455 @code{c}-@code{g} and @code{g}-@code{d} without octavation marks
456 are descending fourths. In the output, the octave is corrected to
457 be a@tie{}@code{d''} and the next note is calculated relative
458 to@tie{}@code{d''} instead of@tie{}@code{d'}.
460 There is also an octave check which produces no visible output.
464 @var{pitch} \octave @var{controlpitch}
468 where @var{pitch} is a regular note within a music expression in
469 relative mode and @var{controlpitch} is a pitch in absolute mode.
470 This checks that @var{pitch} lies within the octave surrounding
471 @var{controlpitch}, i.e. not more than a fourth above or below it.
472 If this is not the case, a warning is printed and the octave is
473 corrected. The @var{controlpitch} is not printed as a note.
475 In the example below, the first check passes without incident,
476 since the@tie{}@code{e} (in @code{relative} mode) is within the
477 octave range of@tie{}@code{a'}. However, the second check
478 produces a warning, since the@tie{}@code{e} is not within the
479 octave range of@tie{}@code{b'}. The warning message is printed,
480 and the octave is adjusted so that the following notes are in the
481 correct octave once again.
491 The octave of a note following an @code{\octave} check is
492 determined with respect to the note preceding it, as modified by
493 the outcome of the octave check. In the next fragment, the first
494 note, an@tie{}@code{e'}, lies within the octave of@tie{}@code{b},
495 and the @code{\octave} check passes successfully. The second note
496 is then calculated relative to (absolute)@tie{}@code{e'}, which
497 yields an@tie{}@code{a'}, above middle@tie{}C. In this case, the
498 check had no influence on the output of the piece.
500 The second @code{\octave} check fails: @code{a'}@tie{}is not
501 within the range of@tie{}@code{b}. A warning is issued, and the
502 last note is calculated relative to@tie{}@code{a}, not
503 to@tie{}@code{a'}, and we get a@tie{}@code{d'}. Without the last
504 @code{\octave} check, the last note would have been
507 @lilypond[verbatim,quote,ragged-right,fragment]
519 Snippets: @lsrdir{Pitches}.
523 @unnumberedsubsubsec Transpose
526 @cindex transposition of pitches
529 A music expression can be transposed with @code{\transpose}. The
533 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
537 This means that @var{musicexpr} is transposed by the interval
538 between the pitches @var{frompitch} and @var{topitch}: any note
539 with pitch @var{frompitch} is changed to @var{topitch} and any
540 other note is transposed by the same interval.
542 Consider a piece written in the key of D-major. It can be
543 transposed up to E-major with:
546 \transpose d e @dots{}
549 Consider a part written for violin (a C instrument). If this part
550 is to be played on the A clarinet (for which an A is notated as a
551 C and thus sounds a minor third lower than notated), the
552 appropriate part will be produced with:
555 \transpose a c' @dots{}
558 @code{\transpose} will also transpose key signatures:
560 @lilypond[verbatim,quote,ragged-right]
561 mus = { \key d \major cis d fis g }
570 @code{\transpose} distinguishes between enharmonic pitches: both
571 @code{\transpose c cis} or @code{\transpose c des} will transpose
572 up half a tone. The first version will print sharps and the notes
573 will remain on the same scale step, the second version will print
574 flats on the scale step above.
576 @lilypond[verbatim,quote,ragged-right]
577 mus = \relative c' { c d e f }
579 \transpose c cis { \mus }
580 \transpose c des { \mus }
584 @cindex transposing instruments
586 @code{\transpose} may also be used in a different way, to input
587 written notes for a transposing instrument. The previous examples
588 show how to enter pitches in C (or @notation{concert pitch}) and
589 typeset them for a transposing instrument, but the opposite is
590 also possible if you for example have a set of instrumental parts
591 and want to print a conductor's score. For example, when entering
592 music for a B-flat trumpet which begins on a notated E (concert
596 musicInBflat = @{ e4 @dots{} @}
597 \transpose c bes, \musicInBflat
601 To print this music in F (e.g., rearranging to a French horn) you
602 could wrap the existing music with another @code{\transpose}:
605 musicInBflat = @{ e4 @dots{} @}
606 \transpose f c' @{ \transpose c bes, \musicInBflat @}
610 For more information about transposing instruments,
611 see @ref{Instrument transpositions}.
615 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
616 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
621 Notation Reference: @ref{Instrument transpositions}.
623 Snippets: @lsrdir{Pitches}.
625 Internals Reference: @internalsref{TransposedMusic}.
629 If you want to use both @code{\transpose} and @code{\relative},
630 you must put @code{\transpose} outside of @code{\relative}, since
631 @code{\relative} will have no effect on music that appears inside
635 @node Displaying pitches
636 @subsection Displaying pitches
638 This section discusses how to alter the output of pitches.
644 * Instrument transpositions::
645 * Automatic accidentals::
651 @unnumberedsubsubsec Clef
665 @cindex mezzosoprano clef
666 @cindex baritone clef
667 @cindex varbaritone clef
670 The clef is set with the @code{\clef} @var{clefname} command:
672 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
683 The clef can also be changed inside the staff:
685 @lilypond[verbatim,quote,ragged-right,fragment,relative=0]
703 These same clef symbols are used in different positions on the staff to
704 change the range of notes shown by that staff. The treble (respectively
705 alto, bass) clef is always positioned to show the line on which
706 a@tie{}@code{g'} (resp. @code{c'}, @code{f}) note is printed.
708 Supported clefs include
710 @multitable @columnfractions .4 .6
711 @headitem Clef @tab Position
712 @item @code{treble, violin, G, G2} @tab
713 G clef (g') on 2nd line
714 @item @code{alto, C} @tab
715 C clef (c') on 3rd line
716 @item @code{tenor} @tab
717 C clef (c') on 4th line
718 @item @code{bass, F} @tab
719 F clef (f) on 4th line
720 @item @code{french} @tab
721 G clef (g') on 1st line, so-called French violin clef
722 @item @code{soprano} @tab
723 C clef (c') on 1st line
724 @item @code{mezzosoprano} @tab
725 C clef (c') on 2nd line
726 @item @code{baritone} @tab
727 C clef (c') on 5th line
728 @item @code{varbaritone} @tab
729 F clef (f) on 3rd line
730 @item @code{subbass} @tab
731 F clef (f) on 5th line
732 @item @code{percussion} @tab
734 @item @code{tab} @tab
738 Further supported clefs are described under @ref{Ancient clefs}.
740 By adding @code{_8} or @code{^8} to the clef name, the clef is
741 transposed one octave down or up, respectively, and @code{_15} and
742 @code{^15} transposes by two octaves. The argument @var{clefname}
743 must be enclosed in quotes when it contains underscores or digits.
746 @cindex choral tenor clef
748 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
755 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
756 {clefs-commonly-tweaked-properties.ly}
761 Notation Reference: @ref{Ancient clefs}.
763 Snippets: @lsrdir{Pitches}.
765 Internals Reference: @internalsref{Clef}.
769 @unnumberedsubsubsec Key signature
771 @cindex key signature
774 @warning{New users are sometimes confused about accidentals and
775 key signatures. In LilyPond, note names are the raw input; key
776 signatures and clefs determine how this raw input is displayed.
777 An unaltered note like@tie{}@code{c} means @q{C natural},
778 regardless of the key signature or clef. For more information,
779 see @rlearning{Accidentals and key signatures}.}
781 The key signature indicates the tonality in which a piece is
782 played. It is denoted by a set of alterations (flats or sharps)
783 at the start of the staff.
785 Setting or changing the key signature is done with the @code{\key}
789 \key @var{pitch} @var{mode}
798 @funindex \mixolydian
804 Here, @var{mode} should be @code{\major} or @code{\minor} to get a
805 key signature of @var{pitch}-major or @var{pitch}-minor,
806 respectively. You may also use the standard mode names, also
807 called @q{church modes}: @code{\ionian}, @code{\locrian},
808 @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
809 @code{\phrygian}, and @code{\dorian}.
811 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
820 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
821 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
823 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
824 {non-traditional-key-signatures.ly}
829 Music Glossary: @rglos{church mode}, @rglos{scordatura}.
831 Learning Manual: @rlearning{Accidentals and key signatures}.
833 Snippets: @lsrdir{Pitches}.
835 Internals Reference: @internalsref{KeyCancellation},
836 @internalsref{KeySignature}, @internalsref{Key_engraver}.
839 @node Ottava brackets
840 @unnumberedsubsubsec Ottava brackets
848 @notation{Ottava brackets} introduce an extra transposition of an
849 octave for the staff:
851 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
859 The @code{set-octavation} function also takes -1 (for 8va bassa),
860 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
866 Internally the function sets the properties @code{ottavation}
867 (e.g., to @code{"8va"} or @code{"8vb"}) and
868 @code{middleCPosition}. To override the text of the bracket, set
869 @code{ottavation} after invoking @code{set-octavation}, i.e.,
871 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
873 \set Staff.ottavation = #"8"
878 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
884 Music Glossary: @rglos{ottava}.
886 Snippets: @lsrdir{Pitches}.
888 Internals Reference: @internalsref{OttavaBracket}.
893 @c FIXME: This should have been fixed by Joe.
894 @c If it hasn't, we should mention the appropriate
895 @c workaround (there is a snippet in the LSR) -vv
896 @code{set-octavation} will get confused when clef changes happen
897 during an octavation bracket.
900 @node Instrument transpositions
901 @unnumberedsubsubsec Instrument transpositions
903 @cindex transposition, MIDI
904 @cindex transposition, instrument
906 When typesetting scores that involve transposing instruments, some
907 parts can be typeset in a different pitch than the
908 @notation{concert pitch}.
910 The key of a @notation{transposing instrument} can be specified.
911 This applies to many wind instruments, for example, clarinets
912 (B-flat, A, and E-flat), horn (F) and trumpet (B-flat, C, D,
915 For such instruments, LilyPond will print a correct part, but is
916 not aware whether the instrument is playing in concert pitch or
917 not. This can lead to problems if you want a MIDI output, or if
918 you quote other parts in a transposing staff. In such cases, an
919 explicit transposition must be specified:
922 \transposition @var{pitch}
926 where @var{pitch} specifies the key in which the instrument plays.
927 For example, a part for B-flat clarinet would include:
933 This command sets the property @code{instrumentTransposition}.
934 The value of this property is used for MIDI output and quotations.
935 MIDI output is transposed to play at concert pitch, and cue notes
936 and quotations are automatically transposed to the key of the
937 instrument in which they are quoted. For more information about
938 quotations, see @ref{Quoting other voices}.
940 The pitch to use for @code{\transposition} should correspond to
941 the real sound heard when a@tie{}@code{c'} written on the staff is
942 played by the transposing instrument. @code{\transposition}
943 should be used when the music is entered from an orchestral part
944 written for the instrument. For example, in classical horn parts,
945 the tuning of the instrument is often changed during a piece.
946 Here are a few notes for a violin and a B-flat clarinet where the
947 parts have been entered using the notes and key as they appear in
948 each part or the conductor's score:
950 @lilypond[verbatim,quote,ragged-right]
952 \new Staff = "Violin I" {
953 \set Staff.instrumentName = "Vln"
954 \set Staff.midiInstrument="violin"
957 g'4( c''8) r c'' r c''4
959 \new Staff = "Clarinet" {
960 \set Staff.instrumentName = "Cl"
961 \set Staff.midiInstrument="clarinet"
964 a'4( d''8) r d'' r d''4
969 Without the @code{\transposition} command the MIDI output of this
970 music would play the notes a tone apart; with it the notes are
971 played correctly in unison.
973 However, when entering the notes of a score in concert pitch, when
974 all voices are entered in C, they may be prefaced by (the default)
975 @code{\transposition c'}:
989 to serve as a reminder that these parts are written in C.
994 Music Glossary: @c TODO @rglos{concert pitch}
996 Notation Reference: @ref{Quoting other voices}, @ref{Transpose}.
998 Snippets: @lsrdir{Pitches}.
1001 @node Automatic accidentals
1002 @unnumberedsubsubsec Automatic accidentals
1003 @cindex automatic accidentals
1005 @funindex set-accidental-style
1007 There are many different conventions on how to typeset
1008 accidentals. LilyPond provides a function to specify which such
1009 accidental style to use. This function is called as follows
1013 #(set-accidental-style 'voice)
1018 The accidental style applies to the current @code{Staff} by
1019 default (with the exception of the styles @code{piano} and
1020 @code{piano-cautionary}, which are explained below). Optionally,
1021 the function can take a second argument which determines in which
1022 scope the style should be changed. For example, to use the same
1023 style in all staves of the current @code{StaffGroup}, use
1026 #(set-accidental-style 'voice 'StaffGroup)
1029 The following accidental styles are supported. To demonstrate
1030 each style, we use the following example:
1032 @lilypond[verbatim,quote,ragged-right]
1036 cis'8 fis, d'4 <a cis>8 f bis4 |
1050 \voiceTwo \relative c' {
1054 \change Staff = down
1058 \change Staff = down
1059 <fis, a cis>4 gis <f a d>2 |
1066 \context Staff = "up" {
1067 %%% change the next line as desired:
1068 #(set-accidental-style 'default)
1071 \context Staff = "down" {
1072 %%% change the next line as desired:
1073 #(set-accidental-style 'default)
1080 Note that the last lines of this example can be replaced by the
1081 following, as long as the same accidental style should be used in
1086 \context Staff = "up" @{
1087 %%% change the next line as desired:
1088 #(set-accidental-style 'default 'Score)
1091 \context Staff = "down" @{
1099 @c NOTE: don't use verbatim in this table.
1102 This is the default typesetting behavior. It corresponds to
1103 eighteenth-century common practice: accidentals are remembered to
1104 the end of the measure in which they occur and only on their own
1105 octave. Thus, in the example below, no natural signs are printed
1106 before the@tie{}@code{b} in the second measure or the
1109 @lilypond[quote,ragged-right]
1113 cis'8 fis, d'4 <a cis>8 f bis4 |
1127 \voiceTwo \relative c' {
1131 \change Staff = down
1135 \change Staff = down
1136 <fis, a cis>4 gis <f a d>2 |
1143 \context Staff = "up" {
1144 #(set-accidental-style 'default)
1147 \context Staff = "down" {
1148 #(set-accidental-style 'default)
1156 The normal behavior is to remember the accidentals on Staff-level.
1157 In this style, however, accidentals are typeset individually for
1158 each voice. Apart from that, the rule is similar to
1161 As a result, accidentals from one voice do not get canceled in
1162 other voices, which is often an unwanted result: in the following
1163 example, it is hard to determine whether the second@tie{}@code{a}
1164 should be played natural or sharp. The @code{voice} option should
1165 therefore be used only if the voices are to be read solely by
1166 individual musicians. If the staff is to be used by one musician
1167 (e.g., a conductor or in a piano score) then @code{modern} or
1168 @code{modern-cautionary} should be used instead.
1171 @lilypond[quote,ragged-right]
1175 cis'8 fis, d'4 <a cis>8 f bis4 |
1189 \voiceTwo \relative c' {
1193 \change Staff = down
1197 \change Staff = down
1198 <fis, a cis>4 gis <f a d>2 |
1205 \context Staff = "up" {
1206 #(set-accidental-style 'voice)
1209 \context Staff = "down" {
1210 #(set-accidental-style 'voice)
1218 @funindex modern style accidentals
1220 This rule corresponds to the common practice in the twentieth
1221 century. It prints the same accidentals as @code{default}, with
1222 two exceptions which serve to avoid ambiguity: after temporary
1223 accidentals, cancellation marks are printed also in the following
1224 measure (for notes in the same octave) and, in the same measure,
1225 for notes in other octaves. Hence the naturals before
1226 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1229 @lilypond[quote,ragged-right]
1233 cis'8 fis, d'4 <a cis>8 f bis4 |
1247 \voiceTwo \relative c' {
1251 \change Staff = down
1255 \change Staff = down
1256 <fis, a cis>4 gis <f a d>2 |
1263 \context Staff = "up" {
1264 #(set-accidental-style 'modern)
1267 \context Staff = "down" {
1268 #(set-accidental-style 'modern)
1275 @item modern-cautionary
1276 @funindex modern-cautionary
1278 This rule is similar to @code{modern}, but the @q{extra}
1279 accidentals (the ones not typeset by @code{default}) are typeset
1280 as cautionary accidentals. They are by default printed with
1281 parentheses, but they can also be printed in reduced size by
1282 defining the @code{cautionary-style} property of
1283 @code{AccidentalSuggestion}.
1286 @lilypond[quote,ragged-right]
1290 cis'8 fis, d'4 <a cis>8 f bis4 |
1304 \voiceTwo \relative c' {
1308 \change Staff = down
1312 \change Staff = down
1313 <fis, a cis>4 gis <f a d>2 |
1320 \context Staff = "up" {
1321 #(set-accidental-style 'modern-cautionary)
1324 \context Staff = "down" {
1325 #(set-accidental-style 'modern-cautionary)
1333 @funindex modern-voice
1335 This rule is used for multivoice accidentals to be read both by
1336 musicians playing one voice and musicians playing all voices.
1337 Accidentals are typeset for each voice, but they @emph{are}
1338 canceled across voices in the same @code{Staff}. Hence,
1339 the@tie{}@code{a} in the last measure is canceled because the
1340 previous cancellation was in a different voice, and
1341 the@tie{}@code{d} in the lower staff is canceled because of the
1342 accidental in a different voice in the previous measure:
1345 @lilypond[quote,ragged-right]
1349 cis'8 fis, d'4 <a cis>8 f bis4 |
1363 \voiceTwo \relative c' {
1367 \change Staff = down
1371 \change Staff = down
1372 <fis, a cis>4 gis <f a d>2 |
1379 \context Staff = "up" {
1380 #(set-accidental-style 'modern-voice)
1383 \context Staff = "down" {
1384 #(set-accidental-style 'modern-voice)
1391 @funindex modern-voice-cautionary
1392 @item modern-voice-cautionary
1394 This rule is the same as @code{modern-voice}, but with the extra
1395 accidentals (the ones not typeset by @code{voice}) typeset
1396 as cautionaries. Even though all accidentals typeset by
1397 @code{default} @emph{are} typeset with this rule,
1398 some of them are typeset as cautionaries.
1400 @lilypond[quote,ragged-right]
1404 cis'8 fis, d'4 <a cis>8 f bis4 |
1418 \voiceTwo \relative c' {
1422 \change Staff = down
1426 \change Staff = down
1427 <fis, a cis>4 gis <f a d>2 |
1434 \context Staff = "up" {
1435 #(set-accidental-style 'modern-voice-cautionary)
1438 \context Staff = "down" {
1439 #(set-accidental-style 'modern-voice-cautionary)
1447 @funindex piano accidentals
1449 This rule reflects twentieth-century practice for piano notation.
1450 Its behavior is very similar to @code{modern} style, but here
1451 accidentals also get canceled across the staves in the same
1452 GrandStaff or PianoStaff, hence all the cancellations of the final
1455 This accidental style applies to the current @code{GrandStaff} or
1456 @code{PianoStaff} by default.
1458 @lilypond[quote,ragged-right]
1462 cis'8 fis, d'4 <a cis>8 f bis4 |
1476 \voiceTwo \relative c' {
1480 \change Staff = down
1484 \change Staff = down
1485 <fis, a cis>4 gis <f a d>2 |
1492 \context Staff = "up" {
1493 #(set-accidental-style 'piano)
1496 \context Staff = "down" {
1503 @item piano-cautionary
1504 @funindex #(set-accidental-style 'piano-cautionary)
1506 Same as @code{#(set-accidental-style 'piano)} but with the extra
1507 accidentals typeset as cautionaries.
1509 @lilypond[quote,ragged-right]
1513 cis'8 fis, d'4 <a cis>8 f bis4 |
1527 \voiceTwo \relative c' {
1531 \change Staff = down
1535 \change Staff = down
1536 <fis, a cis>4 gis <f a d>2 |
1543 \context Staff = "up" {
1544 #(set-accidental-style 'piano-cautionary)
1547 \context Staff = "down" {
1555 @funindex no-reset accidental style
1557 This is the same as @code{default} but with accidentals lasting
1558 @q{forever} and not only within the same measure:
1560 @lilypond[quote,ragged-right]
1564 cis'8 fis, d'4 <a cis>8 f bis4 |
1578 \voiceTwo \relative c' {
1582 \change Staff = down
1586 \change Staff = down
1587 <fis, a cis>4 gis <f a d>2 |
1594 \context Staff = "up" {
1595 #(set-accidental-style 'no-reset)
1598 \context Staff = "down" {
1599 #(set-accidental-style 'no-reset)
1607 @funindex forget accidental style
1609 This is the opposite of @code{no-reset}: Accidentals are not
1610 remembered at all -- and hence all accidentals are typeset
1611 relative to the key signature, regardless of what was before in
1614 @lilypond[quote,ragged-right]
1618 cis'8 fis, d'4 <a cis>8 f bis4 |
1632 \voiceTwo \relative c' {
1636 \change Staff = down
1640 \change Staff = down
1641 <fis, a cis>4 gis <f a d>2 |
1648 \context Staff = "up" {
1649 #(set-accidental-style 'forget)
1652 \context Staff = "down" {
1653 #(set-accidental-style 'forget)
1663 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1664 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
1669 Snippets: @lsrdir{Pitches}.
1671 Internals Reference: @internalsref{Accidental_engraver},
1672 @internalsref{Accidental}, @internalsref{AccidentalSuggestion},
1673 @internalsref{AccidentalPlacement}, @internalsref{GrandStaff} and
1674 @internalsref{PianoStaff}, @internalsref{Staff}.
1679 Simultaneous notes are considered to be entered in sequential
1680 mode. This means that in a chord the accidentals are typeset as
1681 if the notes in the chord happen one at a time, in the order in
1682 which they appear in the input file. This is a problem when
1683 accidentals in a chord depend on each other, which does not happen
1684 for the default accidental style. The problem can be solved by
1685 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
1690 @unnumberedsubsubsec Ambitus
1693 The term @notation{ambitus} or @notation{ambit} denotes a range of
1694 pitches for a given voice in a part of music. It may also denote
1695 the pitch range that a musical instrument is capable of playing.
1696 Ambits are printed on vocal parts, so performers can easily
1697 determine if it matches their capabilities.
1699 Ambits are denoted at the beginning of a piece near the initial
1700 clef. The range is graphically specified by two note heads that
1701 represent the minimum and maximum pitch. Accidentals are only
1702 printed if they are not part of the key signature.
1704 @lilypond[verbatim,quote,ragged-right]
1708 \consists Ambitus_engraver
1720 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1721 {adding-ambiti-per-voice.ly}
1723 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1724 {ambiti-multiple-voices.ly}
1729 Snippets: @lsrdir{Pitches}.
1731 Internals Reference: @internalsref{Ambitus},
1732 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
1733 @internalsref{AmbitusAccidental}, @internalsref{Ambitus_engraver},
1734 @internalsref{Staff}, @internalsref{Voice}.
1739 There is no collision handling in the case of multiple per-voice
1744 @subsection Note heads
1747 * Special note heads::
1748 * Easy notation note heads::
1749 * Shape note heads::
1753 @node Special note heads
1754 @unnumberedsubsubsec Special note heads
1756 @cindex note heads, special
1758 Different note heads are used by various instruments for various
1759 meanings -- crosses are used for @q{parlato} with vocalists,
1760 stopped notes on guitar; diamonds are used for harmonics on string
1761 instruments, etc. There is a shorthand (@code{\harmonic}) for
1762 diamond shapes; the other note head styles are produced by
1763 tweaking the property:
1765 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
1767 \override NoteHead #'style = #'cross
1769 \revert NoteHead #'style
1770 e d <c f\harmonic> <d a'\harmonic>
1774 To see all note head styles, please see @ref{Note head styles}.
1779 Snippets: @lsrdir{Pitches}.
1781 Notation Reference: @ref{Note head styles}.
1783 Internals Reference: @internalsref{NoteHead},
1784 @internalsref{LedgerLineSpanner}.
1787 @node Easy notation note heads
1788 @unnumberedsubsubsec Easy notation note heads
1790 @cindex note heads, practice
1791 @cindex note heads, easy notation
1792 @cindex easy notation
1795 The @q{easy play} note head includes a note name inside the head.
1796 It is used in music for beginners
1798 @lilypond[verbatim,quote,ragged-right]
1799 #(set-global-staff-size 26)
1807 The command @code{\setEasyHeads} overrides settings for the
1808 @code{NoteHead} object. To make the letters readable, it
1809 has to be printed in a large font size. To print with a larger
1810 font, see @ref{Setting the staff size}.
1814 @funindex \setEasyHeads
1815 @code{\setEasyHeads}
1819 Notation Reference: @ref{Setting the staff size}.
1821 Snippets: @lsrdir{Pitches},
1823 Internals Reference: @internalsref{NoteHead}.
1826 @node Shape note heads
1827 @unnumberedsubsubsec Shape note heads
1829 @cindex note heads, shape
1831 @funindex shapeNoteStyles
1832 @funindex \aikenHeads
1833 @funindex \sacredHarpHeads
1835 In shape note head notation, the shape of the note head
1836 corresponds to the harmonic function of a note in the scale. This
1837 notation was popular in nineteenth-century American song books.
1839 Shape note heads can be produced by setting @code{\aikenHeads} or
1840 @code{\sacredHarpHeads}, depending on the style desired.
1842 @lilypond[verbatim,fragment,relative=1]
1849 Shapes are typeset according to the step in the scale, where
1850 the base of the scale is determined by the @code{\key} command.
1854 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1855 {applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
1860 Snippets: @lsrdir{Pitches}.
1864 @unnumberedsubsubsec Improvisation
1866 @cindex improvisation
1867 @cindex slashed note heads
1868 @cindex note heads, improvisation
1869 @cindex note heads, slashed
1871 Improvisation is sometimes denoted with slashed note heads, where
1872 the performer may choose any pitch but should play the specified
1873 rhythm. Such note heads can be created:
1875 @lilypond[verbatim,quote,ragged-right]
1877 \consists Pitch_squash_engraver
1879 e8 e g a a16( bes) a8 g
1891 Snippets: @lsrdir{Pitches}.
1893 Internals Reference: @internalsref{Pitch_squash_engraver},
1894 @internalsref{Voice}.