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 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]
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; in
174 relative mode, a single error puts the rest of the piece off by
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 Snippets: @lsrdir{Pitches}.
204 The relative conversion will not affect @code{\transpose},
205 @code{\chordmode} or @code{\relative} sections in its argument.
206 To use relative mode within transposed music, an additional
207 @code{\relative} must be placed inside @code{\transpose}.
210 If no @var{startpitch} is specified for @code{\relative},
211 then@tie{}@code{c'} is assumed. However, this is a deprecated
212 option and may disappear in future versions, so its use is
218 @unnumberedsubsubsec Accidentals
220 @warning{New users are sometimes confused about accidentals and
221 key signatures. In LilyPond, note names are the raw input; key
222 signatures and clefs determine how this raw input is displayed.
223 An unaltered note like@tie{}@code{c} means @q{C natural},
224 regardless of the key signature or clef. For more information,
225 see @rlearning{Accidentals and key signatures}.}
227 @cindex note names, Dutch
228 @cindex note names, default
230 A @notation{sharp} pitch is made by adding @code{is} to the name,
231 and a @notation{flat} pitch by adding @code{es}. As you might
232 expect, a @notation{double sharp} or @notation{double flat} is
233 made by adding @code{isis} or @code{eses}. This syntax is derived
234 from Dutch note naming conventions. To use other names for
235 accidentals, see @ref{Note names in other languages}.
237 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
242 A natural will cancel the effect of an accidental or key
243 signature. However, naturals are not encoded into the note name
244 syntax with a suffix; a natural pitch is shown as a simple note
247 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
251 @cindex quarter tones
252 @cindex semi-flats, semi-sharps
254 Half-flats and half-sharps are formed by adding @code{eh} and
255 @code{ih}; the following is a series of Cs with increasing
258 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
259 ceseh1 ces ceh c cih cis cisih
264 @cindex accidental, reminder
265 @cindex accidental, cautionary
266 @cindex accidental, parenthesized
267 @cindex reminder accidental
269 @cindex cautionary accidental
270 @cindex parenthesized accidental
273 Normally accidentals are printed automatically, but you may also
274 print them manually. A reminder accidental can be forced by
275 adding an exclamation mark@tie{}@code{!} after the pitch. A
276 cautionary accidental (i.e., an accidental within parentheses) can
277 be obtained by adding the question mark@tie{}@code{?} after the
278 pitch. These extra accidentals can be used to produce natural
281 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
282 cis cis cis! cis? c c? c! c
285 Accidentals are only printed on tied notes which begin a new
288 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
289 cis1~ cis~ \break cis
295 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
296 {preventing-extra-naturals-from-being-automatically-added.ly}
300 Music Glossary: @rglos{sharp}, @rglos{flat}, @rglos{double sharp},
301 @rglos{double flat}, @rglos{Pitch names}.
303 Learning Manual: @rlearning{Accidentals and key signatures}.
305 Notation Reference: @ref{Automatic accidentals},
306 @ref{Musica ficta accidentals},
307 @ref{Note names in other languages}.
309 Snippets: @lsrdir{Pitches},
311 dodecaphonic-style-accidentals-for-each-note-including-naturals.ly},
312 @lsr{Pitches, makam.ly}.
317 There are no generally accepted standards for denoting
318 three-quarter flats, so LilyPond's symbol does not conform to any
323 @node Note names in other languages
324 @unnumberedsubsubsec Note names in other languages
326 There are predefined sets of note names for various other
327 languages. To use them, include the language specific init file.
328 For example, add @code{\include "english.ly"} to the top of the
329 input file. The available language files and the note names they
332 @cindex note names, other languages
335 @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}
338 @tab sharp @tab flat @tab double sharp @tab double flat
340 @tab c d e f g a bes b
341 @tab -is @tab -es @tab -isis @tab -eses
343 @tab c d e f g a bf b
344 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
348 @tab -is @tab -es @tab -isis @tab -eses
351 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
355 @tab -iss @tab -ess @tab -ississ @tab -essess
358 @tab -is @tab -es @tab -isis @tab -eses
360 @tab do re mi fa sol la sib si
361 @tab -d @tab -b @tab -dd @tab -bb
363 @tab do re mi fa sol la sib si
364 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
366 @tab do re mi fa sol la sib si
367 @tab -s @tab -b @tab -ss @tab -bb
369 @tab do re mi fa sol la sib si
370 @tab -s @tab -b @tab -ss @tab -bb
372 @tab do re mi fa sol la sib si
373 @tab -k @tab -b @tab -kk @tab -bb
377 Some music uses microtones whose alterations are fractions of a
378 @q{normal} sharp or flat. The note names for quartertones defined
379 in the various language files are listed in the following table.
380 Here the prefixes @notation{semi-} and @notation{sesqui-} mean
381 @q{half} and @q{one and a half}, respectively. For the other
382 languages, no special names have been defined yet.
385 @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}
388 @tab semi- @tab semi- @tab sesqui- @tab sesqui-
391 @tab c d e f g a bes b
392 @tab -ih @tab -eh @tab -isih @tab -eseh
394 @tab c d e f g a bf b
395 @tab -qs @tab -qf @tab -tqs @tab -tqf
398 @tab -ih @tab -eh @tab -isih @tab -eseh
400 @tab do re mi fa sol la sib si
401 @tab -sd @tab -sb @tab -dsd @tab -bsb
403 @tab do re mi fa sol la sib si
404 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
408 In Dutch, @code{aes} is contracted to @code{as}, but both forms
409 are accepted in LilyPond. Similarly, both @code{es} and
410 @code{ees} are accepted. This also applies to
411 @code{aeses}@tie{}/@tie{}@code{ases} and
412 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
413 contracted names are defined in the corresponding language files.
415 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
416 a2 as e es a ases e eses
419 In some languages such as Norwegian and Swedish, the usual
420 spelling for accidentals is a double @q{s} such as in @code{ciss}
421 or @code{cess}. For both historical reasons and a greater
422 simplicity, LilyPond uses a single @q{s} for all these languages.
426 Music Glossary: @lsrdir{Pitch names}.
428 Snippets: @lsrdir{Pitches}.
431 @node Changing multiple pitches
432 @subsection Changing multiple pitches
434 This section discusses how to modify pitches.
442 @unnumberedsubsubsec Octave check
446 In relative mode, it is easy to forget an octave changing mark.
447 Octave checks make such errors easier to correct. A note may be
448 followed by @code{=}@var{quotes} to indicate what its absolute
449 octave should be. In the following example,
458 the@tie{}@code{d} will generate a warning, because
459 a@tie{}@code{d''} is expected, as indicated by the octave check
460 @code{=''}, but a@tie{}@code{d'} is found, since both
461 @code{c}-@code{g} and @code{g}-@code{d} without octavation marks
462 are descending fourths. In the output, the octave is corrected to
463 be a@tie{}@code{d''} and the next note is calculated relative
464 to@tie{}@code{d''} instead of@tie{}@code{d'}.
466 There is also an octave check which produces no visible output.
470 @var{pitch} \octave @var{controlpitch}
474 where @var{pitch} is a regular note within a music expression in
475 relative mode and @var{controlpitch} is a pitch in absolute mode.
476 This checks that @var{pitch} lies within the octave surrounding
477 @var{controlpitch}, i.e. not more than a fourth above or below it.
478 If this is not the case, a warning is printed and the octave is
479 corrected. The @var{controlpitch} is not printed as a note.
481 In the example below, the first check passes without incident,
482 since the@tie{}@code{e} (in @code{relative} mode) is within the
483 octave range of@tie{}@code{a'}. However, the second check
484 produces a warning, since the@tie{}@code{e} is not within the
485 octave range of@tie{}@code{b'}. The warning message is printed,
486 and the octave is adjusted so that the following notes are in the
487 correct octave once again.
497 The octave of a note following an @code{\octave} check is
498 determined with respect to the note preceding it, as modified by
499 the outcome of the octave check. In the next fragment, the first
500 note, an@tie{}@code{e'}, lies within the octave of@tie{}@code{b},
501 and the @code{\octave} check passes successfully. The second note
502 is then calculated relative to (absolute)@tie{}@code{e'}, which
503 yields an@tie{}@code{a'}, above middle@tie{}C. In this case, the
504 check had no influence on the output of the piece.
506 The second @code{\octave} check fails: @code{a'}@tie{}is not
507 within the range of@tie{}@code{b}. A warning is issued, and the
508 last note is calculated relative to@tie{}@code{a}, not
509 to@tie{}@code{a'}, and we get a@tie{}@code{d'}. Without the last
510 @code{\octave} check, the last note would have been
513 @lilypond[verbatim,quote,ragged-right,fragment]
525 Snippets: @lsrdir{Pitches}.
529 @unnumberedsubsubsec Transpose
532 @cindex transposition of pitches
535 A music expression can be transposed with @code{\transpose}. The
539 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
543 This means that @var{musicexpr} is transposed by the interval
544 between the pitches @var{frompitch} and @var{topitch}: any note
545 with pitch @var{frompitch} is changed to @var{topitch} and any
546 other note is transposed by the same interval.
548 Consider a piece written in the key of D-major. It can be
549 transposed up to E-major with:
552 \transpose d e @dots{}
555 Consider a part written for violin (a C instrument). If this part
556 is to be played on the A clarinet (for which an A is notated as a
557 C and thus sounds a minor third lower than notated), the
558 appropriate part will be produced with:
561 \transpose a c' @dots{}
564 @code{\transpose} will also transpose key signatures:
566 @lilypond[verbatim,quote,ragged-right]
567 mus = { \key d \major cis d fis g }
576 @code{\transpose} distinguishes between enharmonic pitches: both
577 @code{\transpose c cis} or @code{\transpose c des} will transpose
578 up half a tone. The first version will print sharps and the notes
579 will remain on the same scale step, the second version will print
580 flats on the scale step above.
582 @lilypond[verbatim,quote,ragged-right]
583 mus = \relative c' { c d e f }
585 \transpose c cis { \mus }
586 \transpose c des { \mus }
590 @cindex transposing instruments
592 @code{\transpose} may also be used in a different way, to input
593 written notes for a transposing instrument. The previous examples
594 show how to enter pitches in C (or @notation{concert pitch}) and
595 typeset them for a transposing instrument, but the opposite is
596 also possible if you for example have a set of instrumental parts
597 and want to print a conductor's score. For example, when entering
598 music for a B-flat trumpet which begins on a notated E (concert
602 musicInBflat = @{ e4 @dots{} @}
603 \transpose c bes, \musicInBflat
607 To print this music in F (e.g., rearranging to a French horn) you
608 could wrap the existing music with another @code{\transpose}:
611 musicInBflat = @{ e4 @dots{} @}
612 \transpose f c' @{ \transpose c bes, \musicInBflat @}
616 For more information about transposing instruments,
617 see @ref{Instrument transpositions}.
621 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
622 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
627 Notation Reference: @ref{Instrument transpositions}.
629 Snippets: @lsrdir{Pitches}.
631 Internals Reference: @internalsref{TransposedMusic}.
635 If you want to use both @code{\transpose} and @code{\relative},
636 you must put @code{\transpose} outside of @code{\relative}, since
637 @code{\relative} will have no effect on music that appears inside
641 @node Displaying pitches
642 @subsection Displaying pitches
644 This section discusses how to alter the output of pitches.
650 * Instrument transpositions::
651 * Automatic accidentals::
657 @unnumberedsubsubsec Clef
671 @cindex mezzosoprano clef
672 @cindex baritone clef
673 @cindex varbaritone clef
676 The clef is set with the @code{\clef} @var{clefname} command:
678 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
689 The clef can also be changed inside the staff:
691 @lilypond[verbatim,quote,ragged-right,fragment,relative=0]
709 These same clef symbols are used in different positions on the staff to
710 change the range of notes shown by that staff. The treble (respectively
711 alto, bass) clef is always positioned to show the line on which
712 a@tie{}@code{g'} (resp. @code{c'}, @code{f}) note is printed.
714 Supported clefs include
716 @multitable @columnfractions .4 .6
717 @headitem Clef @tab Position
718 @item @code{treble, violin, G, G2} @tab
719 G clef (g') on 2nd line
720 @item @code{alto, C} @tab
721 C clef (c') on 3rd line
722 @item @code{tenor} @tab
723 C clef (c') on 4th line
724 @item @code{bass, F} @tab
725 F clef (f) on 4th line
726 @item @code{french} @tab
727 G clef (g') on 1st line, so-called French violin clef
728 @item @code{soprano} @tab
729 C clef (c') on 1st line
730 @item @code{mezzosoprano} @tab
731 C clef (c') on 2nd line
732 @item @code{baritone} @tab
733 C clef (c') on 5th line
734 @item @code{varbaritone} @tab
735 F clef (f) on 3rd line
736 @item @code{subbass} @tab
737 F clef (f) on 5th line
738 @item @code{percussion} @tab
740 @item @code{tab} @tab
744 Further supported clefs are described under @ref{Ancient clefs}.
746 By adding @code{_8} or @code{^8} to the clef name, the clef is
747 transposed one octave down or up, respectively, and @code{_15} and
748 @code{^15} transposes by two octaves. The argument @var{clefname}
749 must be enclosed in quotes when it contains underscores or digits.
752 @cindex choral tenor clef
754 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
761 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
762 {clefs-commonly-tweaked-properties.ly}
767 Notation Reference: @ref{Ancient clefs}.
769 Snippets: @lsrdir{Pitches}.
771 Internals Reference: @internalsref{Clef}.
775 @unnumberedsubsubsec Key signature
777 @cindex key signature
780 @warning{New users are sometimes confused about accidentals and
781 key signatures. In LilyPond, note names are the raw input; key
782 signatures and clefs determine how this raw input is displayed.
783 An unaltered note like@tie{}@code{c} means @q{C natural},
784 regardless of the key signature or clef. For more information,
785 see @rlearning{Accidentals and key signatures}.}
787 The key signature indicates the tonality in which a piece is
788 played. It is denoted by a set of alterations (flats or sharps)
789 at the start of the staff.
791 Setting or changing the key signature is done with the @code{\key}
795 \key @var{pitch} @var{mode}
804 @funindex \mixolydian
810 Here, @var{mode} should be @code{\major} or @code{\minor} to get a
811 key signature of @var{pitch}-major or @var{pitch}-minor,
812 respectively. You may also use the standard mode names, also
813 called @q{church modes}: @code{\ionian}, @code{\locrian},
814 @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
815 @code{\phrygian}, and @code{\dorian}.
817 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
826 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
827 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
829 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
830 {non-traditional-key-signatures.ly}
835 Music Glossary: @rglos{church mode}, @rglos{scordatura}.
837 Learning Manual: @rlearning{Accidentals and key signatures}.
839 Snippets: @lsrdir{Pitches}.
841 Internals Reference: @internalsref{KeyCancellation},
842 @internalsref{KeySignature}, @internalsref{Key_engraver}.
845 @node Ottava brackets
846 @unnumberedsubsubsec Ottava brackets
854 @notation{Ottava brackets} introduce an extra transposition of an
855 octave for the staff:
857 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
865 The @code{set-octavation} function also takes -1 (for 8va bassa),
866 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
872 Internally the function sets the properties @code{ottavation}
873 (e.g., to @code{"8va"} or @code{"8vb"}) and
874 @code{middleCPosition}. To override the text of the bracket, set
875 @code{ottavation} after invoking @code{set-octavation}, i.e.,
877 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
879 \set Staff.ottavation = #"8"
884 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
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,
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
1769 tweaking the property:
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},
1790 @internalsref{LedgerLineSpanner}.
1793 @node Easy notation note heads
1794 @unnumberedsubsubsec Easy notation note heads
1796 @cindex note heads, practice
1797 @cindex note heads, easy notation
1798 @cindex easy notation
1801 The @q{easy play} note head includes a note name inside the head.
1802 It is used in music for beginners
1804 @lilypond[verbatim,quote,ragged-right]
1805 #(set-global-staff-size 26)
1813 The command @code{\setEasyHeads} overrides settings for the
1814 @code{NoteHead} object. To make the letters readable, it
1815 has to be printed in a large font size. To print with a larger
1816 font, see @ref{Setting the staff size}.
1820 @funindex \setEasyHeads
1821 @code{\setEasyHeads}
1825 Notation Reference: @ref{Setting the staff size}.
1827 Snippets: @lsrdir{Pitches},
1829 Internals Reference: @internalsref{NoteHead}.
1832 @node Shape note heads
1833 @unnumberedsubsubsec Shape note heads
1835 @cindex note heads, shape
1837 @funindex shapeNoteStyles
1838 @funindex \aikenHeads
1839 @funindex \sacredHarpHeads
1841 In shape note head notation, the shape of the note head
1842 corresponds to the harmonic function of a note in the scale. This
1843 notation was popular in nineteenth-century American song books.
1845 Shape note heads can be produced by setting @code{\aikenHeads} or
1846 @code{\sacredHarpHeads}, depending on the style desired.
1848 @lilypond[verbatim,fragment,relative=1]
1855 Shapes are typeset according to the step in the scale, where
1856 the base of the scale is determined by the @code{\key} command.
1860 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1861 {applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
1866 Snippets: @lsrdir{Pitches}.
1870 @unnumberedsubsubsec Improvisation
1872 @cindex improvisation
1873 @cindex slashed note heads
1874 @cindex note heads, improvisation
1875 @cindex note heads, slashed
1877 Improvisation is sometimes denoted with slashed note heads, where
1878 the performer may choose any pitch but should play the specified
1879 rhythm. Such note heads can be created:
1881 @lilypond[verbatim,quote,ragged-right]
1883 \consists Pitch_squash_engraver
1885 e8 e g a a16( bes) a8 g
1897 Snippets: @lsrdir{Pitches}.
1899 Internals Reference: @internalsref{Pitch_squash_engraver},
1900 @internalsref{Voice}.