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]
57 c d e f g a b c d e f g
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 Music Glossary: @rglos{Pitch names}.
79 Snippets: @lsrdir{Pitches}.
82 @node Relative octave entry
83 @unnumberedsubsubsec Relative octave entry
86 @cindex relative octave specification
89 The absolute mode requires a lot of octave specifications, which
90 not only becomes tedious but also easily leads to errors.
91 Therefore, it is usually more convenient to let notes be entered
92 relative to the previous note. This is done with the relative
96 \relative @var{startpitch} @var{musicexpr}
99 In relative mode, each note is assumed to be as close to the
100 previous note as possible. This means that the octave of pitches
101 in @var{musicexpr} is calculated as follows:
105 If no octave changing mark is used on a pitch, its octave is calculated
106 so that the interval with the previous note is less than a fifth. This
107 interval is determined without considering accidentals.
110 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be added to
111 respectively raise or lower a pitch by an extra octave, relatively to
112 the pitch calculated without octave mark.
115 Multiple octave changing marks can be used. For example, @code{''}@tie{}and
116 @code{,,}@tie{} will alter the pitch by two octaves.
119 The pitch of the first note is relative to
120 @code{@var{startpitch}}. @var{startpitch} is specified in
121 absolute octave mode, and it is recommended that it be a octave of
126 Here is the relative mode shown in action:
128 @lilypond[verbatim,quote,ragged-right]
131 c d e f g a b c d e f g
135 Octave changing marks are used for intervals greater than a
138 @lilypond[verbatim,quote,ragged-right]
144 A note sequence without a single octave mark can nevertheless span
147 @lilypond[verbatim,quote,ragged-right]
153 If the preceding item is a chord, the first note of the chord is
154 used as the reference point for the octave placement of a
155 following note or chord. Inside of chords the next note is always
156 relative to the preceding one.
158 @lilypond[verbatim,quote,ragged-right]
162 % the C is now an octave higher
164 % the C returns to the original pitch
169 When octaves are specified in absolute mode it is easy to
170 accidentally put a pitch in the wrong octave. Relative octave
171 mode reduces these errors since most of the time it is not
172 necessary to indicate any octaves at all. Furthermore, in
173 absolute mode a single mistake may be difficult to spot, while in
174 relative mode a single error puts the rest of the piece off by one
177 As explained above, the octave of pitches is calculated only with
178 the note names, regardless of any alterations. Therefore, an
179 E-double-sharp sharp following a B will be placed higher, while an
180 F-double-flat would be placed lower. In other words, a
181 double-augmented fourth is considered a smaller interval than a
182 double-diminished fifth, regardless of the number of semitones
183 that each interval contains.
185 @lilypond[verbatim,quote,ragged-right]
197 Music Glossary: @rglos{fifth}, @rglos{interval}, @rglos{Pitch names}.
199 Notation Reference: @ref{Octave check}.
201 Snippets: @lsrdir{Pitches}.
206 The relative conversion will not affect @code{\transpose},
207 @code{\chordmode} or @code{\relative} sections in its argument.
208 To use relative mode within transposed music, an additional
209 @code{\relative} must be placed inside @code{\transpose}.
212 If no @var{startpitch} is specified for @code{\relative},
213 then@tie{}@code{c'} is assumed. However, this is a deprecated
214 option and may disappear in future versions, so its use is
220 @unnumberedsubsubsec Accidentals
222 @warning{New users are sometimes confused about accidentals and
223 key signatures. In LilyPond, note names are the raw input; key
224 signatures and clefs determine how this raw input is displayed.
225 An unaltered note like@tie{}@code{c} means @q{C natural},
226 regardless of the key signature or clef. For more information,
227 see @rlearning{Accidentals and key signatures}.}
229 @cindex note names, Dutch
230 @cindex note names, default
232 A @notation{sharp} pitch is made by adding @code{is} to the name,
233 and a @notation{flat} pitch by adding @code{es}. As you might
234 expect, a @notation{double sharp} or @notation{double flat} is
235 made by adding @code{isis} or @code{eses}. This syntax is derived
236 from Dutch note naming conventions. To use other names for
237 accidentals, see @ref{Note names in other languages}.
239 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
244 A natural will cancel the effect of an accidental or key
245 signature. However, naturals are not encoded into the note name
246 syntax with a suffix; a natural pitch is shown as a simple note
249 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
253 @cindex quarter tones
254 @cindex semi-flats, semi-sharps
256 Half-flats and half-sharps are formed by adding @code{eh} and
257 @code{ih}; the following is a series of Cs with increasing
260 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
261 ceseh1 ces ceh c cih cis cisih
266 @cindex accidental, reminder
267 @cindex accidental, cautionary
268 @cindex accidental, parenthesized
269 @cindex reminder accidental
271 @cindex cautionary accidental
272 @cindex parenthesized accidental
275 Normally accidentals are printed automatically, but you may also
276 print them manually. A reminder accidental can be forced by
277 adding an exclamation mark@tie{}@code{!} after the pitch. A
278 cautionary accidental (i.e., an accidental within parentheses) can
279 be obtained by adding the question mark@tie{}@code{?} after the
280 pitch. These extra accidentals can be used to produce natural
283 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
284 cis cis cis! cis? c c? c! c
287 Accidentals are only printed on tied notes which begin a new
290 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
291 cis1~ cis~ \break cis
297 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
298 {preventing-extra-naturals-from-being-automatically-added.ly}
302 Music Glossary: @rglos{sharp}, @rglos{flat}, @rglos{double sharp},
303 @rglos{double flat}, @rglos{Pitch names}.
305 Learning Manual: @rlearning{Accidentals and key signatures}.
307 Notation Reference: @ref{Automatic accidentals},
308 @ref{Musica ficta accidentals},
309 @ref{Note names in other languages}.
311 Snippets: @lsrdir{Pitches},
313 dodecaphonic-style-accidentals-for-each-note-including-naturals.ly},
314 @lsr{Pitches, makam.ly}.
319 There are no generally accepted standards for denoting
320 three-quarter flats, so LilyPond's symbol does not conform to any
325 @node Note names in other languages
326 @unnumberedsubsubsec Note names in other languages
328 There are predefined sets of note names for various other
329 languages. To use them, include the language specific init file.
330 For example, add @code{\include "english.ly"} to the top of the
331 input file. The available language files and the note names they
334 @cindex note names, other languages
337 @multitable {nederlands.ly} {do re mi fa sol la sib si} {-iss/-is} {-ess/-es} {-ss/-x/-sharpsharp} {-essess/-eses}
340 @tab sharp @tab flat @tab double sharp @tab double flat
342 @tab c d e f g a bes b
343 @tab -is @tab -es @tab -isis @tab -eses
345 @tab c d e f g a bf b
346 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
350 @tab -is @tab -es @tab -isis @tab -eses
353 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
357 @tab -iss @tab -ess @tab -ississ @tab -essess
360 @tab -is @tab -es @tab -isis @tab -eses
362 @tab do re mi fa sol la sib si
363 @tab -d @tab -b @tab -dd @tab -bb
365 @tab do re mi fa sol la sib si
366 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
368 @tab do re mi fa sol la sib si
369 @tab -s @tab -b @tab -ss @tab -bb
371 @tab do re mi fa sol la sib si
372 @tab -s @tab -b @tab -ss @tab -bb
374 @tab do re mi fa sol la sib si
375 @tab -k @tab -b @tab -kk @tab -bb
379 Some music uses microtones whose alterations are fractions of a
380 @q{normal} sharp or flat. The note names for quartertones defined
381 in the various language files are listed in the following table.
382 Here the prefixes @notation{semi-} and @notation{sesqui-} mean
383 @q{half} and @q{one and a half}, respectively. For the other
384 languages, no special names have been defined yet.
387 @multitable {nederlands.ly} {do re mi fa sol la sib si} {-iss/-is} {-ess/-es} {-ississ/-isis} {-ississ/-isis}
390 @tab semi- @tab semi- @tab sesqui- @tab sesqui-
393 @tab c d e f g a bes b
394 @tab -ih @tab -eh @tab -isih @tab -eseh
396 @tab c d e f g a bf b
397 @tab -qs @tab -qf @tab -tqs @tab -tqf
400 @tab -ih @tab -eh @tab -isih @tab -eseh
402 @tab do re mi fa sol la sib si
403 @tab -sd @tab -sb @tab -dsd @tab -bsb
405 @tab do re mi fa sol la sib si
406 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
410 In Dutch, @code{aes} is contracted to @code{as}, but both forms
411 are accepted in LilyPond. Similarly, both @code{es} and
412 @code{ees} are accepted. This also applies to
413 @code{aeses}@tie{}/@tie{}@code{ases} and
414 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
415 contracted names are defined in the corresponding language files.
417 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
418 a2 as e es a ases e eses
421 In some languages such as Norwegian and Swedish, the usual
422 spelling for accidentals is a double @q{s} such as in @code{ciss}
423 or @code{cess}. For both historical reasons and a greater
424 simplicity, LilyPond uses a single @q{s} for all these languages.
428 Music Glossary: @lsrdir{Pitch names}.
430 Snippets: @lsrdir{Pitches}.
433 @node Changing multiple pitches
434 @subsection Changing multiple pitches
436 This section discusses how to modify pitches.
444 @unnumberedsubsubsec Octave check
448 In relative mode, it is easy to forget an octave changing mark.
449 Octave checks make such errors easier to correct by displaying a
450 warning if a note is found in an unexpected octave. There are two
451 types of octave checks: the first changes the pitch, while the
452 second does not change the pitch. Both checks print warnings and
453 change the octave for future notes.
455 Consider the simple example:
457 @lilypond[verbatim,quote,ragged-right,fragment]
464 To check the octave of the @code{d} (changing the pitch
465 automatically if necessary), add @code{=}@var{quotes} after the
466 pitch. The @var{quotes} indicate what its absolute octave should
467 be. This example will generate a warning, because the second note
468 is the absolute octave @code{d''} instead of @code{d'} indicated
471 @lilypond[verbatim,quote,ragged-right,fragment]
478 To check the octave of the@tie{}@code{d} (without changing the
479 pitch), add @code{\octave}@tie{}@var{controlpitch} to the note.
480 This checks that the note lies within the octave surrounding
481 @var{controlpitch}, i.e. not more than a fourth above or below it.
482 If this is not the case, a warning is printed and the octave is
483 corrected. The @var{controlpitch} is not printed as a note.
485 @lilypond[verbatim,quote,ragged-right,fragment]
492 In both cases, the following note (the@tie{}@code{e}) is adjusted
493 to be relative to@tie{}@code{d'} instead of@tie{}@code{d''}.
497 Snippets: @lsrdir{Pitches}.
501 @unnumberedsubsubsec Transpose
504 @cindex transposition of pitches
507 A music expression can be transposed with @code{\transpose}. The
511 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
515 This means that @var{musicexpr} is transposed by the interval
516 between the pitches @var{frompitch} and @var{topitch}: any note
517 with pitch @var{frompitch} is changed to @var{topitch} and any
518 other note is transposed by the same interval.
520 Consider a piece written in the key of D-major. It can be
521 transposed up to E-major:
523 @lilypond[verbatim,quote,ragged-right]
532 If a part written in C (normal concert pitch) is to be played on
533 the A clarinet (for which an A is notated as a C and thus sounds a
534 minor third lower than notated), the appropriate part will be
537 @lilypond[verbatim,quote,ragged-right]
545 @code{\transpose} distinguishes between enharmonic pitches: both
546 @code{\transpose c cis} or @code{\transpose c des} will transpose
547 up half a tone. The first version will print sharps and the notes
548 will remain on the same scale step, the second version will print
549 flats on the scale step above.
551 @lilypond[verbatim,quote,ragged-right]
552 mus = \relative c' { c d e f }
554 \transpose c cis { \mus }
555 \transpose c des { \mus }
559 @cindex transposing instruments
561 @code{\transpose} may also be used in a different way, to input
562 written notes for a transposing instrument. The previous examples
563 show how to enter pitches in C (or @notation{concert pitch}) and
564 typeset them for a transposing instrument, but the opposite is
565 also possible if you for example have a set of instrumental parts
566 and want to print a conductor's score. For example, when entering
567 music for a B-flat trumpet which begins on a notated E (concert
571 musicInBflat = @{ e4 @dots{} @}
572 \transpose c bes, \musicInBflat
576 To print this music in F (e.g., rearranging to a French horn) you
577 could wrap the existing music with another @code{\transpose}:
580 musicInBflat = @{ e4 @dots{} @}
581 \transpose f c' @{ \transpose c bes, \musicInBflat @}
585 For more information about transposing instruments,
586 see @ref{Instrument transpositions}.
591 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
592 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
597 Notation Reference: @ref{Instrument transpositions}.
599 Snippets: @lsrdir{Pitches}.
601 Internals Reference: @internalsref{TransposedMusic}.
605 If you want to use both @code{\transpose} and @code{\relative},
606 you must put @code{\transpose} outside of @code{\relative}, since
607 @code{\relative} will have no effect on music that appears inside
611 @node Displaying pitches
612 @subsection Displaying pitches
614 This section discusses how to alter the output of pitches.
620 * Instrument transpositions::
621 * Automatic accidentals::
627 @unnumberedsubsubsec Clef
641 @cindex mezzosoprano clef
642 @cindex baritone clef
643 @cindex varbaritone clef
646 The clef is set with the @code{\clef} @var{clefname} command:
648 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
659 The clef can also be changed inside the staff:
661 @lilypond[verbatim,quote,ragged-right,fragment,relative=0]
679 These same clef symbols are used in different positions on the staff to
680 change the range of notes shown by that staff. The treble (respectively
681 alto, bass) clef is always positioned to show the line on which
682 a@tie{}@code{g'} (resp. @code{c'}, @code{f}) note is printed.
684 Supported clefs include
686 @multitable @columnfractions .4 .6
687 @headitem Clef @tab Position
688 @item @code{treble, violin, G, G2} @tab
689 G clef (g') on 2nd line
690 @item @code{alto, C} @tab
691 C clef (c') on 3rd line
692 @item @code{tenor} @tab
693 C clef (c') on 4th line
694 @item @code{bass, F} @tab
695 F clef (f) on 4th line
696 @item @code{french} @tab
697 G clef (g') on 1st line, so-called French violin clef
698 @item @code{soprano} @tab
699 C clef (c') on 1st line
700 @item @code{mezzosoprano} @tab
701 C clef (c') on 2nd line
702 @item @code{baritone} @tab
703 C clef (c') on 5th line
704 @item @code{varbaritone} @tab
705 F clef (f) on 3rd line
706 @item @code{subbass} @tab
707 F clef (f) on 5th line
708 @item @code{percussion} @tab
710 @item @code{tab} @tab
714 Further supported clefs are described under @ref{Ancient clefs}.
716 By adding @code{_8} or @code{^8} to the clef name, the clef is
717 transposed one octave down or up, respectively, and @code{_15} and
718 @code{^15} transposes by two octaves. The argument @var{clefname}
719 must be enclosed in quotes when it contains underscores or digits.
722 @cindex choral tenor clef
724 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
731 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
732 {clefs-commonly-tweaked-properties.ly}
737 Notation Reference: @ref{Ancient clefs}.
739 Snippets: @lsrdir{Pitches}.
741 Internals Reference: @internalsref{Clef}.
745 @unnumberedsubsubsec Key signature
747 @cindex key signature
750 @warning{New users are sometimes confused about accidentals and
751 key signatures. In LilyPond, note names are the raw input; key
752 signatures and clefs determine how this raw input is displayed.
753 An unaltered note like@tie{}@code{c} means @q{C natural},
754 regardless of the key signature or clef. For more information,
755 see @rlearning{Accidentals and key signatures}.}
757 The key signature indicates the tonality in which a piece is
758 played. It is denoted by a set of alterations (flats or sharps)
759 at the start of the staff.
761 Setting or changing the key signature is done with the @code{\key}
765 \key @var{pitch} @var{mode}
774 @funindex \mixolydian
780 Here, @var{mode} should be @code{\major} or @code{\minor} to get a
781 key signature of @var{pitch}-major or @var{pitch}-minor,
782 respectively. You may also use the standard mode names, also
783 called @q{church modes}: @code{\ionian}, @code{\locrian},
784 @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
785 @code{\phrygian}, and @code{\dorian}.
787 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
796 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
797 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
799 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
800 {non-traditional-key-signatures.ly}
805 Music Glossary: @rglos{church mode}, @rglos{scordatura}.
807 Learning Manual: @rlearning{Accidentals and key signatures}.
809 Snippets: @lsrdir{Pitches}.
811 Internals Reference: @internalsref{KeyCancellation},
812 @internalsref{KeySignature}, @internalsref{Key_engraver}.
815 @node Ottava brackets
816 @unnumberedsubsubsec Ottava brackets
824 @notation{Ottava brackets} introduce an extra transposition of an
825 octave for the staff:
827 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
835 The @code{set-octavation} function also takes -1 (for 8va bassa),
836 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
842 Internally the function sets the properties @code{ottavation}
843 (e.g., to @code{"8va"} or @code{"8vb"}) and
844 @code{middleCPosition}. To override the text of the bracket, set
845 @code{ottavation} after invoking @code{set-octavation}, i.e.,
847 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
849 \set Staff.ottavation = #"8"
854 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
860 Music Glossary: @rglos{ottava}.
862 Snippets: @lsrdir{Pitches}.
864 Internals Reference: @internalsref{OttavaBracket}.
869 @c FIXME: This should have been fixed by Joe.
870 @c If it hasn't, we should mention the appropriate
871 @c workaround (there is a snippet in the LSR) -vv
872 @code{set-octavation} will get confused when clef changes happen
873 during an octavation bracket.
876 @node Instrument transpositions
877 @unnumberedsubsubsec Instrument transpositions
879 @cindex transposition, MIDI
880 @cindex transposition, instrument
882 When typesetting scores that involve transposing instruments, some
883 parts can be typeset in a different pitch than the
884 @notation{concert pitch}.
886 The key of a @notation{transposing instrument} can be specified.
887 This applies to many wind instruments, for example, clarinets
888 (B-flat, A, and E-flat), horn (F) and trumpet (B-flat, C, D,
891 For such instruments, LilyPond will print a correct part, but is
892 not aware whether the instrument is playing in concert pitch or
893 not. This can lead to problems if you want a MIDI output, or if
894 you quote other parts in a transposing staff. In such cases, an
895 explicit transposition must be specified:
898 \transposition @var{pitch}
902 where @var{pitch} specifies the key in which the instrument plays.
903 For example, a part for B-flat clarinet would include:
909 This command sets the property @code{instrumentTransposition}.
910 The value of this property is used for MIDI output and quotations.
911 MIDI output is transposed to play at concert pitch, and cue notes
912 and quotations are automatically transposed to the key of the
913 instrument in which they are quoted. For more information about
914 quotations, see @ref{Quoting other voices}.
916 The pitch to use for @code{\transposition} should correspond to
917 the real sound heard when a@tie{}@code{c'} written on the staff is
918 played by the transposing instrument. @code{\transposition}
919 should be used when the music is entered from an orchestral part
920 written for the instrument. For example, in classical horn parts,
921 the tuning of the instrument is often changed during a piece.
922 Here are a few notes for a violin and a B-flat clarinet where the
923 parts have been entered using the notes and key as they appear in
924 each part or the conductor's score:
926 @lilypond[verbatim,quote,ragged-right]
928 \new Staff = "Violin I" {
929 \set Staff.instrumentName = "Vln"
930 \set Staff.midiInstrument="violin"
933 g'4( c''8) r c'' r c''4
935 \new Staff = "Clarinet" {
936 \set Staff.instrumentName = "Cl"
937 \set Staff.midiInstrument="clarinet"
940 a'4( d''8) r d'' r d''4
945 Without the @code{\transposition} command the MIDI output of this
946 music would play the notes a tone apart; with it the notes are
947 played correctly in unison.
949 However, when entering the notes of a score in concert pitch, when
950 all voices are entered in C, they may be prefaced by (the default)
951 @code{\transposition c'}:
965 to serve as a reminder that these parts are written in C.
970 Music Glossary: @c TODO @rglos{concert pitch}
972 Notation Reference: @ref{Quoting other voices}, @ref{Transpose}.
974 Snippets: @lsrdir{Pitches}.
977 @node Automatic accidentals
978 @unnumberedsubsubsec Automatic accidentals
979 @cindex automatic accidentals
981 @funindex set-accidental-style
983 There are many different conventions on how to typeset
984 accidentals. LilyPond provides a function to specify which such
985 accidental style to use. This function is called as follows
989 #(set-accidental-style 'voice)
994 The accidental style applies to the current @code{Staff} by
995 default (with the exception of the styles @code{piano} and
996 @code{piano-cautionary}, which are explained below). Optionally,
997 the function can take a second argument which determines in which
998 scope the style should be changed. For example, to use the same
999 style in all staves of the current @code{StaffGroup}, use
1002 #(set-accidental-style 'voice 'StaffGroup)
1005 The following accidental styles are supported. To demonstrate
1006 each style, we use the following example:
1008 @lilypond[verbatim,quote,ragged-right]
1012 cis'8 fis, d'4 <a cis>8 f bis4 |
1026 \voiceTwo \relative c' {
1030 \change Staff = down
1034 \change Staff = down
1035 <fis, a cis>4 gis <f a d>2 |
1042 \context Staff = "up" {
1043 %%% change the next line as desired:
1044 #(set-accidental-style 'default)
1047 \context Staff = "down" {
1048 %%% change the next line as desired:
1049 #(set-accidental-style 'default)
1056 Note that the last lines of this example can be replaced by the
1057 following, as long as the same accidental style should be used in
1062 \context Staff = "up" @{
1063 %%% change the next line as desired:
1064 #(set-accidental-style 'default 'Score)
1067 \context Staff = "down" @{
1075 @c NOTE: don't use verbatim in this table.
1078 This is the default typesetting behavior. It corresponds to
1079 eighteenth-century common practice: accidentals are remembered to
1080 the end of the measure in which they occur and only on their own
1081 octave. Thus, in the example below, no natural signs are printed
1082 before the@tie{}@code{b} in the second measure or the
1085 @lilypond[quote,ragged-right]
1089 cis'8 fis, d'4 <a cis>8 f bis4 |
1103 \voiceTwo \relative c' {
1107 \change Staff = down
1111 \change Staff = down
1112 <fis, a cis>4 gis <f a d>2 |
1119 \context Staff = "up" {
1120 #(set-accidental-style 'default)
1123 \context Staff = "down" {
1124 #(set-accidental-style 'default)
1132 The normal behavior is to remember the accidentals on Staff-level.
1133 In this style, however, accidentals are typeset individually for
1134 each voice. Apart from that, the rule is similar to
1137 As a result, accidentals from one voice do not get canceled in
1138 other voices, which is often an unwanted result: in the following
1139 example, it is hard to determine whether the second@tie{}@code{a}
1140 should be played natural or sharp. The @code{voice} option should
1141 therefore be used only if the voices are to be read solely by
1142 individual musicians. If the staff is to be used by one musician
1143 (e.g., a conductor or in a piano score) then @code{modern} or
1144 @code{modern-cautionary} should be used instead.
1147 @lilypond[quote,ragged-right]
1151 cis'8 fis, d'4 <a cis>8 f bis4 |
1165 \voiceTwo \relative c' {
1169 \change Staff = down
1173 \change Staff = down
1174 <fis, a cis>4 gis <f a d>2 |
1181 \context Staff = "up" {
1182 #(set-accidental-style 'voice)
1185 \context Staff = "down" {
1186 #(set-accidental-style 'voice)
1194 @funindex modern style accidentals
1196 This rule corresponds to the common practice in the twentieth
1197 century. It prints the same accidentals as @code{default}, with
1198 two exceptions which serve to avoid ambiguity: after temporary
1199 accidentals, cancellation marks are printed also in the following
1200 measure (for notes in the same octave) and, in the same measure,
1201 for notes in other octaves. Hence the naturals before
1202 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1205 @lilypond[quote,ragged-right]
1209 cis'8 fis, d'4 <a cis>8 f bis4 |
1223 \voiceTwo \relative c' {
1227 \change Staff = down
1231 \change Staff = down
1232 <fis, a cis>4 gis <f a d>2 |
1239 \context Staff = "up" {
1240 #(set-accidental-style 'modern)
1243 \context Staff = "down" {
1244 #(set-accidental-style 'modern)
1251 @item modern-cautionary
1252 @funindex modern-cautionary
1254 This rule is similar to @code{modern}, but the @q{extra}
1255 accidentals (the ones not typeset by @code{default}) are typeset
1256 as cautionary accidentals. They are by default printed with
1257 parentheses, but they can also be printed in reduced size by
1258 defining the @code{cautionary-style} property of
1259 @code{AccidentalSuggestion}.
1262 @lilypond[quote,ragged-right]
1266 cis'8 fis, d'4 <a cis>8 f bis4 |
1280 \voiceTwo \relative c' {
1284 \change Staff = down
1288 \change Staff = down
1289 <fis, a cis>4 gis <f a d>2 |
1296 \context Staff = "up" {
1297 #(set-accidental-style 'modern-cautionary)
1300 \context Staff = "down" {
1301 #(set-accidental-style 'modern-cautionary)
1309 @funindex modern-voice
1311 This rule is used for multivoice accidentals to be read both by
1312 musicians playing one voice and musicians playing all voices.
1313 Accidentals are typeset for each voice, but they @emph{are}
1314 canceled across voices in the same @code{Staff}. Hence,
1315 the@tie{}@code{a} in the last measure is canceled because the
1316 previous cancellation was in a different voice, and
1317 the@tie{}@code{d} in the lower staff is canceled because of the
1318 accidental in a different voice in the previous measure:
1321 @lilypond[quote,ragged-right]
1325 cis'8 fis, d'4 <a cis>8 f bis4 |
1339 \voiceTwo \relative c' {
1343 \change Staff = down
1347 \change Staff = down
1348 <fis, a cis>4 gis <f a d>2 |
1355 \context Staff = "up" {
1356 #(set-accidental-style 'modern-voice)
1359 \context Staff = "down" {
1360 #(set-accidental-style 'modern-voice)
1367 @funindex modern-voice-cautionary
1368 @item modern-voice-cautionary
1370 This rule is the same as @code{modern-voice}, but with the extra
1371 accidentals (the ones not typeset by @code{voice}) typeset
1372 as cautionaries. Even though all accidentals typeset by
1373 @code{default} @emph{are} typeset with this rule,
1374 some of them are typeset as cautionaries.
1376 @lilypond[quote,ragged-right]
1380 cis'8 fis, d'4 <a cis>8 f bis4 |
1394 \voiceTwo \relative c' {
1398 \change Staff = down
1402 \change Staff = down
1403 <fis, a cis>4 gis <f a d>2 |
1410 \context Staff = "up" {
1411 #(set-accidental-style 'modern-voice-cautionary)
1414 \context Staff = "down" {
1415 #(set-accidental-style 'modern-voice-cautionary)
1423 @funindex piano accidentals
1425 This rule reflects twentieth-century practice for piano notation.
1426 Its behavior is very similar to @code{modern} style, but here
1427 accidentals also get canceled across the staves in the same
1428 GrandStaff or PianoStaff, hence all the cancellations of the final
1431 This accidental style applies to the current @code{GrandStaff} or
1432 @code{PianoStaff} by default.
1434 @lilypond[quote,ragged-right]
1438 cis'8 fis, d'4 <a cis>8 f bis4 |
1452 \voiceTwo \relative c' {
1456 \change Staff = down
1460 \change Staff = down
1461 <fis, a cis>4 gis <f a d>2 |
1468 \context Staff = "up" {
1469 #(set-accidental-style 'piano)
1472 \context Staff = "down" {
1479 @item piano-cautionary
1480 @funindex #(set-accidental-style 'piano-cautionary)
1482 Same as @code{#(set-accidental-style 'piano)} but with the extra
1483 accidentals typeset as cautionaries.
1485 @lilypond[quote,ragged-right]
1489 cis'8 fis, d'4 <a cis>8 f bis4 |
1503 \voiceTwo \relative c' {
1507 \change Staff = down
1511 \change Staff = down
1512 <fis, a cis>4 gis <f a d>2 |
1519 \context Staff = "up" {
1520 #(set-accidental-style 'piano-cautionary)
1523 \context Staff = "down" {
1531 @funindex no-reset accidental style
1533 This is the same as @code{default} but with accidentals lasting
1534 @q{forever} and not only within the same measure:
1536 @lilypond[quote,ragged-right]
1540 cis'8 fis, d'4 <a cis>8 f bis4 |
1554 \voiceTwo \relative c' {
1558 \change Staff = down
1562 \change Staff = down
1563 <fis, a cis>4 gis <f a d>2 |
1570 \context Staff = "up" {
1571 #(set-accidental-style 'no-reset)
1574 \context Staff = "down" {
1575 #(set-accidental-style 'no-reset)
1583 @funindex forget accidental style
1585 This is the opposite of @code{no-reset}: Accidentals are not
1586 remembered at all -- and hence all accidentals are typeset
1587 relative to the key signature, regardless of what was before in
1590 @lilypond[quote,ragged-right]
1594 cis'8 fis, d'4 <a cis>8 f bis4 |
1608 \voiceTwo \relative c' {
1612 \change Staff = down
1616 \change Staff = down
1617 <fis, a cis>4 gis <f a d>2 |
1624 \context Staff = "up" {
1625 #(set-accidental-style 'forget)
1628 \context Staff = "down" {
1629 #(set-accidental-style 'forget)
1639 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1640 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
1645 Snippets: @lsrdir{Pitches}.
1647 Internals Reference: @internalsref{Accidental_engraver},
1648 @internalsref{Accidental}, @internalsref{AccidentalSuggestion},
1649 @internalsref{AccidentalPlacement}, @internalsref{GrandStaff} and
1650 @internalsref{PianoStaff}, @internalsref{Staff}.
1655 Simultaneous notes are considered to be entered in sequential
1656 mode. This means that in a chord the accidentals are typeset as
1657 if the notes in the chord happen one at a time, in the order in
1658 which they appear in the input file. This is a problem when
1659 accidentals in a chord depend on each other, which does not happen
1660 for the default accidental style. The problem can be solved by
1661 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
1666 @unnumberedsubsubsec Ambitus
1669 The term @notation{ambitus} or @notation{ambit} denotes a range of
1670 pitches for a given voice in a part of music. It may also denote
1671 the pitch range that a musical instrument is capable of playing.
1672 Ambits are printed on vocal parts, so performers can easily
1673 determine if it matches their capabilities.
1675 Ambits are denoted at the beginning of a piece near the initial
1676 clef. The range is graphically specified by two note heads that
1677 represent the minimum and maximum pitch. Accidentals are only
1678 printed if they are not part of the key signature.
1680 @lilypond[verbatim,quote,ragged-right]
1684 \consists Ambitus_engraver
1696 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1697 {adding-ambiti-per-voice.ly}
1699 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1700 {ambiti-multiple-voices.ly}
1705 Snippets: @lsrdir{Pitches}.
1707 Internals Reference: @internalsref{Ambitus},
1708 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
1709 @internalsref{AmbitusAccidental}, @internalsref{Ambitus_engraver},
1710 @internalsref{Staff}, @internalsref{Voice}.
1715 There is no collision handling in the case of multiple per-voice
1720 @subsection Note heads
1723 * Special note heads::
1724 * Easy notation note heads::
1725 * Shape note heads::
1729 @node Special note heads
1730 @unnumberedsubsubsec Special note heads
1732 @cindex note heads, special
1734 Different note heads are used by various instruments for various
1735 meanings -- crosses are used for @q{parlato} with vocalists,
1736 stopped notes on guitar; diamonds are used for harmonics on string
1737 instruments, etc. There is a shorthand (@code{\harmonic}) for
1738 diamond shapes; the other note head styles are produced by
1739 tweaking the property:
1741 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
1743 \override NoteHead #'style = #'cross
1745 \revert NoteHead #'style
1746 e d <c f\harmonic> <d a'\harmonic>
1750 To see all note head styles, please see @ref{Note head styles}.
1755 Snippets: @lsrdir{Pitches}.
1757 Notation Reference: @ref{Note head styles}.
1759 Internals Reference: @internalsref{NoteHead},
1760 @internalsref{LedgerLineSpanner}.
1763 @node Easy notation note heads
1764 @unnumberedsubsubsec Easy notation note heads
1766 @cindex note heads, practice
1767 @cindex note heads, easy notation
1768 @cindex easy notation
1771 The @q{easy play} note head includes a note name inside the head.
1772 It is used in music for beginners
1774 @lilypond[verbatim,quote,ragged-right]
1775 #(set-global-staff-size 26)
1783 The command @code{\setEasyHeads} overrides settings for the
1784 @code{NoteHead} object. To make the letters readable, it
1785 has to be printed in a large font size. To print with a larger
1786 font, see @ref{Setting the staff size}.
1790 @funindex \setEasyHeads
1791 @code{\setEasyHeads}
1795 Notation Reference: @ref{Setting the staff size}.
1797 Snippets: @lsrdir{Pitches},
1799 Internals Reference: @internalsref{NoteHead}.
1802 @node Shape note heads
1803 @unnumberedsubsubsec Shape note heads
1805 @cindex note heads, shape
1807 @funindex shapeNoteStyles
1808 @funindex \aikenHeads
1809 @funindex \sacredHarpHeads
1811 In shape note head notation, the shape of the note head
1812 corresponds to the harmonic function of a note in the scale. This
1813 notation was popular in nineteenth-century American song books.
1815 Shape note heads can be produced by setting @code{\aikenHeads} or
1816 @code{\sacredHarpHeads}, depending on the style desired.
1818 @lilypond[verbatim,fragment,relative=1]
1825 Shapes are typeset according to the step in the scale, where
1826 the base of the scale is determined by the @code{\key} command.
1830 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1831 {applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
1836 Snippets: @lsrdir{Pitches}.
1840 @unnumberedsubsubsec Improvisation
1842 @cindex improvisation
1843 @cindex slashed note heads
1844 @cindex note heads, improvisation
1845 @cindex note heads, slashed
1847 Improvisation is sometimes denoted with slashed note heads, where
1848 the performer may choose any pitch but should play the specified
1849 rhythm. Such note heads can be created:
1851 @lilypond[verbatim,quote,ragged-right]
1853 \consists Pitch_squash_engraver
1855 e8 e g a a16( bes) a8 g
1867 Snippets: @lsrdir{Pitches}.
1869 Internals Reference: @internalsref{Pitch_squash_engraver},
1870 @internalsref{Voice}.