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.
33 * Absolute octave entry::
34 * Relative octave entry::
36 * Note names in other languages::
40 @node Absolute octave entry
41 @unnumberedsubsubsec Absolute octave entry
46 A pitch name is specified using lowercase letters@tie{}@code{a}
47 through@tie{}@code{g}. An ascending C-major scale is engraved
50 @lilypond[verbatim,quote,ragged-right,fragment]
56 @cindex absolute octave specification
58 There are two different ways to enter these note names with regard
59 to octave placement: absolute and relative. The relative mode
60 will in most cases be the most convenient, but the absolute mode
61 is more fundamental and will be presented first. In absolute
62 mode, every note is placed explicitly in a specific octave. The
63 note names @code{c} to @code{b} are engraved in the octave below
64 middle C, as in the previous example.
66 @lilypond[verbatim,quote,ragged-right,fragment]
76 If a note should be in another octave than this, an octave
77 specification must be given. It takes the form of a series of
78 single quote@tie{}(@code{'}) or comma@tie{}(@code{,}) characters.
79 Each@tie{}@code{'} raises the pitch by one octave;
80 each@tie{}@code{,} lowers the pitch by an octave.
82 @lilypond[verbatim,quote,ragged-right,fragment]
84 c' c'' e' g d'' d' d c
86 c, c,, e, g d,, d, d c
91 Snippets: @lsrdir{Pitches}.
93 Internals Reference: @internalsref{LedgerLineSpanner},
94 @internalsref{NoteHead}.
97 @node Relative octave entry
98 @unnumberedsubsubsec Relative octave entry
101 @cindex relative octave specification
104 The absolute mode requires a lot of octave specifications, which
105 not only becomes tedious but also easily leads to errors.
106 Therefore, it is usually more convenient to let notes be entered
107 relative to the previous note. This is done with the relative
111 \relative @var{startpitch} @var{musicexpr}
114 In relative mode, each note is assumed to be as close to the
115 previous note as possible. This means that the octave of pitches
116 in @var{musicexpr} is calculated as follows:
120 The pitch of the first note is relative to @code{@var{startpitch}}.
123 If no octave changing mark is used on a pitch, its octave is calculated
124 so that the interval with the previous note is a fourth or less. This
125 interval is determined without regarding alterations or the actual
126 sounding pitches, it is determined only with note names. For example,
127 an augmented fourth is considered a @emph{smaller} interval than a
128 diminished fifth, even though these intervals both span six semitones.
129 Even @qq{worse}, a doubly-augmented fourth is considered a smaller
130 interval than a diminished fifth, even though the doubly-augmented
131 fourth spans seven semitones while the diminished fifth only spans six
132 semitones; that is why a B-sharp following an F will be put above
136 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be added to
137 respectively raise or lower a pitch by an extra octave, relatively to
138 the pitch calculated without octave mark.
141 Multiple octave changing marks can be used. @code{''}@tie{}will
142 raise the pitch by two octaves.
146 Here is the relative mode shown in action:
148 @lilypond[verbatim,quote,ragged-right,fragment]
154 Octave changing marks are used for intervals greater than a
157 @lilypond[verbatim,quote,ragged-right,fragment]
163 A note sequence without a single octave mark can nevertheless span
166 @lilypond[verbatim,quote,ragged-right,fragment]
172 If the preceding item is a chord, the first note of the chord is
173 used as the reference point for the octave placement of a
174 following note or chord. Inside of chords the next note is always
175 relative to the preceding one.
177 @lilypond[verbatim,quote,ragged-right,fragment]
185 The @var{startpitch} (after @code{\relative}) is a note name in
186 absolute mode. In principle it can be any note name, but common
187 practice is to use@tie{}@code{c} in various octave positions or the
188 first note of @var{musicexpr}.
190 When octaves are specified as above by adding@tie{}@code{'}
191 and@tie{}@code{,} to pitch names, it is easy to accidentally put a
192 pitch in the wrong octave. The relative octave mode prevents
193 these errors since most of the time it is not necessary to
194 indicate any octaves at all. Furthermore, in absolute mode, a
195 single mistake may be difficult to spot; in relative mode, a
196 single error puts the rest of the piece off by one octave.
198 As explained above, the octave of pitches is calculated only with the
199 note names, regardless of any alterations. Therefore, an F-sharp
200 following a C will be placed higher than the C, while a G-flat following
201 a C will be placed lower than the C.
203 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
210 Snippets: @lsrdir{Pitches}.
215 The relative conversion will not affect @code{\transpose},
216 @code{\chordmode} or @code{\relative} sections in its argument.
217 To use relative within transposed music, an additional
218 @code{\relative} must be placed inside @code{\transpose}.
221 If no @var{startpitch} is specified for @code{\relative},
222 then@tie{}@code{c'} is assumed. However, this is a deprecated
223 option and may disappear in future versions, so its use is
229 @unnumberedsubsubsec Accidentals
231 @warning{New users are sometimes confused about accidentals and
232 key signatures. In LilyPond, note names are the raw input; key
233 signatures and clefs determine how this raw input is displayed.
234 An unaltered note like@tie{}@code{c} means @q{C natural},
235 regardless of the key signature or clef. For more information,
236 see @rlearning{Accidentals and key signatures}.}
238 @cindex note names, Dutch
239 @cindex note names, default
241 A @notation{sharp} pitch is made by adding @code{is} to the name,
242 and a @notation{flat} pitch by adding @code{es}. As you might
243 expect, a @notation{double sharp} or @notation{double flat} is
244 made by adding @code{isis} or @code{eses}. This syntax is derived
245 from note naming conventions in Nordic and Germanic languages,
246 like German and Dutch. To use other names for accidentals, see
247 @ref{Note names in other languages}.
249 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
255 The above notes are the Dutch note names. In Dutch, @code{aes} is
256 contracted to @code{as}, but both forms are accepted in LilyPond.
257 Similarly, both @code{es} and @code{ees} are accepted:
259 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
263 A natural will cancel the effect of an accidental or key
264 signature. However, naturals are not encoded into the note name
265 syntax with a suffix; a natural pitch is shown as a simple note
268 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
273 @cindex accidental, reminder
274 @cindex accidental, cautionary
275 @cindex accidental, parenthesized
276 @cindex reminder accidental
278 @cindex cautionary accidental
279 @cindex parenthesized accidental
282 Normally accidentals are printed automatically, but you may also
283 print them manually. A reminder accidental can be forced by
284 adding an exclamation mark@tie{}@code{!} after the pitch. A
285 cautionary accidental (i.e., an accidental within parentheses) can
286 be obtained by adding the question mark@tie{}@code{?} after the
287 pitch. These extra accidentals can be used to produce natural
290 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
291 cis cis cis! cis? c c? c! c
295 @cindex quarter tones
296 @cindex semi-flats, semi-sharps
298 Half-flats and half-sharps are formed by adding @code{eh} and
299 @code{ih}; the following is a series of Cs with increasing
302 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
303 \set Staff.extraNatural = ##f
304 ceseh ces ceh c cih cis cisih
310 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
311 {preventing-extra-naturals-from-being-automatically-added.ly}
315 Music Glossary: @rglos{sharp}, @rglos{flat}, @rglos{double sharp},
318 Learning Manual: @rlearning{Accidentals and key signatures}.
320 Notation Reference: @ref{Automatic accidentals},
321 @ref{Musica ficta accidentals},
322 @ref{Note names in other languages}.
324 Snippets: @lsrdir{Pitches},
326 dodecaphonic-style-accidentals-for-each-note-including-naturals.ly},
327 @lsr{Pitches, makam.ly}.
333 There are no generally accepted standards for denoting
334 three-quarter flats, so LilyPond's symbol does not conform to any
339 @node Note names in other languages
340 @unnumberedsubsubsec Note names in other languages
342 There are predefined sets of note names for various other
343 languages. To use them, include the language specific init file.
344 For example, add @code{\include "english.ly"} to the top of the
345 input file. The available language files and the note names they
348 @cindex note names, other languages
351 @multitable @columnfractions .2 .6 .05 .05 .05 .05
354 @tab sharp @tab flat @tab double sharp @tab double flat
356 @tab c d e f g a bes b
357 @tab -is @tab -es @tab -isis @tab -eses
359 @tab c d e f g a bf b
360 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
364 @tab -is @tab -es @tab -isis @tab -eses
367 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
371 @tab -iss @tab -ess @tab -ississ @tab -essess
374 @tab -is @tab -es @tab -isis @tab -eses
376 @tab do re mi fa sol la sib si
377 @tab -d @tab -b @tab -dd @tab -bb
379 @tab do re mi fa sol la sib si
380 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
382 @tab do re mi fa sol la sib si
383 @tab -s @tab -b @tab -ss @tab -bb
385 @tab do re mi fa sol la sib si
386 @tab -s @tab -b @tab -ss @tab -bb
388 @tab do re mi fa sol la sib si
389 @tab -k @tab -b @tab -kk @tab -bb
394 Note that in Dutch, German, Norwegian, and Swedish, the flat
395 alterations of@tie{}@code{a} like for example @code{aes} and
396 @code{aeses} are usually contracted to @code{as} and @code{ases}
397 (or more commonly @code{asas}). Sometimes only these contracted
398 names are defined in the corresponding language files (this also
399 applies to the suffixes for quartertones below).
402 Some music uses microtones whose alterations are fractions of a
403 @q{normal} sharp or flat. The note names for quartertones defined
404 in the various language files are listed in the following table.
405 Here the prefixes @q{semi-} and @q{sesqui-} mean @q{half} and
406 @q{one and a half}, respectively. For the other languages no
407 special names have been defined yet.
411 @multitable @columnfractions .2 .6 .05 .05 .05 .05
414 @tab semi- @tab semi- @tab sesqui- @tab sesqui-
417 @tab c d e f g a bes b
418 @tab -ih @tab -eh @tab -isih @tab -eseh
420 @tab c d e f g a bf b
421 @tab -qs @tab -qf @tab -tqs @tab -tqf
424 @tab -ih @tab -eh @tab -isih @tab -eseh
426 @c @tab c d e f g a b h
428 @c @tab c d e f g a b h
430 @tab do re mi fa sol la sib si
431 @tab -sd @tab -sb @tab -dsd @tab -bsb
433 @c @tab do re mi fa sol la sib si
435 @c @tab do re mi fa sol la sib si
437 @tab do re mi fa sol la sib si
438 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
444 Snippets: @lsrdir{Pitches}.
447 @node Changing multiple pitches
448 @subsection Changing multiple pitches
450 This section discusses how to modify pitches.
458 @unnumberedsubsubsec Octave check
462 In relative mode, it is easy to forget an octave changing mark.
463 Octave checks make such errors easier to correct. A note may be
464 followed by @code{=}@var{quotes} to indicate what its absolute
465 octave should be. In the following example,
468 \relative c'' @{ c g d='' @}
472 the@tie{}@code{d} will generate a warning, because
473 a@tie{}@code{d''} is expected, as indicated by the octave check
474 @code{=''}, but a@tie{}@code{d'} is found, since both
475 @code{c}-@code{g} and @code{g}-@code{d} without octavation marks
476 are descending fourths. In the output, the octave is corrected to
477 be a@tie{}@code{d''} and the next note is calculated relative
478 to@tie{}@code{d''} instead of@tie{}@code{d'}.
480 There is also an octave check that produces no visible output.
484 @var{pitch} \octave @var{controlpitch}
488 where @var{pitch} is a regular note within a music expression in
489 relative mode and @var{controlpitch} is a pitch in absolute mode.
490 This checks that @var{pitch} lies within the octave surrounding
491 @var{controlpitch}, i.e. not more than a fourth above or below it.
492 If this is not the case, a warning is printed and the octave is
493 corrected. The @var{controlpitch} is not printed as a note.
495 In the example below, the first check passes without incident,
496 since the@tie{}@code{e} (in @code{relative} mode) is within the
497 octave range of@tie{}@code{a'}. However, the second check
498 produces a warning, since the@tie{}@code{e} is not within the
499 octave range of@tie{}@code{b'}. The warning message is printed,
500 and the octave is adjusted so that the following notes are in the
501 correct octave once again.
512 The octave of a note following an @code{\octave} check is
513 determined with respect to the note preceding it, as modified by
514 the outcome of the octave check. In the next fragment, the first
515 note, an@tie{}@code{e'}, lies within the octave of@tie{}@code{b},
516 and the @code{\octave} check passes successfully. The second note
517 is then calculated relative to (absolute)@tie{}@code{e'}, which
518 yields an@tie{}@code{a'}, above middle@tie{}C. In this case, the
519 check had no influence on the output of the piece.
521 The second @code{\octave} check fails: @code{a'}@tie{}is not
522 within the range of@tie{}@code{b}. A warning is issued, and the
523 last note is calculated relative to@tie{}@code{a}, not
524 to@tie{}@code{a'}, and we get a@tie{}@code{d'}. Without the last
525 @code{\octave} check, the last note would have been
528 @lilypond[verbatim,quote,ragged-right,fragment]
540 Snippets: @lsrdir{Pitches}.
544 @unnumberedsubsubsec Transpose
547 @cindex transposition of pitches
548 @cindex transposing instruments
551 A music expression can be transposed with @code{\transpose}. The
555 \transpose @var{from} @var{to} @var{musicexpr}
559 This means that @var{musicexpr} is transposed by the interval
560 between the pitches @var{from} and @var{to}: any note with pitch
561 @var{from} is changed to @var{to} and any other note is transposed
562 by the same interval.
564 Consider a piece written in the key of D-major. If this piece is
565 a little too low for its performer, it can be transposed up to
569 \transpose d e @dots{}
572 Consider a part written for violin (a C instrument). If this part is to
573 be played on the A clarinet (for which an A is notated as a C, and thus
574 sounds a minor third lower than notated), the appropriate part will be
578 \transpose a c' @dots{}
581 @code{\transpose} will also transpose key signatures:
583 @lilypond[verbatim,quote,ragged-right]
584 mus = { \key d \major cis d fis g }
593 @code{\transpose} distinguishes between enharmonic pitches: both
594 @code{\transpose c cis} or @code{\transpose c des} will transpose
595 up half a tone. The first version will print sharps and the notes
596 will remain on the same scale step, the second version will print
597 flats on the scale step above.
599 @lilypond[verbatim,quote,ragged-right]
600 mus = \relative c' { c d e f }
602 \transpose c cis { \mus }
603 \transpose c des { \mus }
607 @code{\transpose} may also be used to input written notes for a
608 transposing instrument. The previous examples show how to enter
609 pitches in C (or @notation{concert pitch}) and typeset them for a
610 transposing instrument, but the opposite is also possible if you
611 for example have a set of instrumental parts and want to print a
612 conductor's score. For example, when entering music for a B-flat
613 trumpet which begins on a notated E (concert D), one would write:
616 musicInBflat = @{ e4 @dots{} @}
617 \transpose c bes, \musicInBflat
620 To print this music in F (e.g., rearranging to a French horn) you
621 would wrap the existing music with another @code{\transpose}:
624 musicInBflat = @{ e4 @dots{} @}
625 \transpose f c' @{ \transpose c bes, \musicInBflat @}
630 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
631 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
636 Snippets: @lsrdir{Pitches}.
638 Internals Reference: @internalsref{TransposedMusic}.
642 If you want to use both @code{\transpose} and @code{\relative},
643 you must put @code{\transpose} outside of @code{\relative}, since
644 @code{\relative} will have no effect on music that appears inside
645 a @code{\transpose}. See the previous example.
648 @node Displaying pitches
649 @subsection Displaying pitches
651 This section discusses how to alter the output of pitches.
657 * Instrument transpositions::
658 * Automatic accidentals::
663 @unnumberedsubsubsec Clef
677 @cindex mezzosoprano clef
678 @cindex baritone clef
679 @cindex varbaritone clef
682 The clef is set with the @code{\clef} @var{clefname} command:
684 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
695 The clef can also be changed inside the staff:
697 @lilypond[verbatim,quote,ragged-right,fragment]
715 These same clef symbols are used in different positions on the staff to
716 change the range of notes shown by that staff. The treble (respectively
717 alto, bass) clef is always positioned to show the line on which
718 a@tie{}@code{g'} (resp. @code{c'}, @code{f}) note is printed.
720 Supported clefs include
722 @multitable @columnfractions .4 .6
723 @headitem Clef @tab Position
724 @item @code{treble, violin, G, G2} @tab
725 G clef (g') on 2nd line
726 @item @code{alto, C} @tab
727 C clef (c') on 3rd line
728 @item @code{tenor} @tab
729 C clef (c') on 4th line
730 @item @code{bass, F} @tab
731 F clef (f) on 4th line
732 @item @code{french} @tab
733 G clef (g') on 1st line, so-called French violin clef
734 @item @code{soprano} @tab
735 C clef (c') on 1st line
736 @item @code{mezzosoprano} @tab
737 C clef (c') on 2nd line
738 @item @code{baritone} @tab
739 C clef (c') on 5th line
740 @item @code{varbaritone} @tab
741 F clef (f) on 3rd line
742 @item @code{subbass} @tab
743 F clef (f) on 5th line
744 @item @code{percussion} @tab
746 @item @code{tab} @tab
750 Further supported clefs are described under @ref{Ancient clefs}.
752 By adding @code{_8} or @code{^8} to the clef name, the clef is
753 transposed one octave down or up, respectively, and @code{_15} and
754 @code{^15} transposes by two octaves. The argument @var{clefname}
755 must be enclosed in quotes when it contains underscores or digits.
758 @cindex choral tenor clef
760 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
767 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
768 {clefs-commonly-tweaked-properties.ly}
773 Notation Reference: @ref{Ancient clefs}.
775 Snippets: @lsrdir{Pitches}.
777 Internals Reference: @internalsref{Clef}.
781 @unnumberedsubsubsec Key signature
783 @cindex key signature
786 @warning{New users are sometimes confused about accidentals and
787 key signatures. In LilyPond, note names are the raw input; key
788 signatures and clefs determine how this raw input is displayed.
789 An unaltered note like@tie{}@code{c} means @q{C natural},
790 regardless of the key signature or clef. For more information,
791 see @rlearning{Accidentals and key signatures}.}
793 The key signature indicates the tonality in which a piece is
794 played. It is denoted by a set of alterations (flats or sharps)
795 at the start of the staff.
797 Setting or changing the key signature is done with the @code{\key}
801 \key @var{pitch} @var{mode}
810 @funindex \mixolydian
816 Here, @var{mode} should be @code{\major} or @code{\minor} to get
817 @var{pitch}-major or @var{pitch}-minor, respectively. You may
818 also use the standard mode names, also called @q{church modes}:
819 @code{\ionian}, @code{\locrian}, @code{\aeolian},
820 @code{\mixolydian}, @code{\lydian}, @code{\phrygian}, and
823 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
832 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
833 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
835 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
836 {non-traditional-key-signatures.ly}
841 Music Glossary: @rglos{church mode}, @rglos{scordatura}.
843 Learning Manual: @rlearning{Accidentals and key signatures}.
845 Snippets: @lsrdir{Pitches}.
847 Internals Reference: @internalsref{KeyCancellation},
848 @internalsref{KeySignature}, @internalsref{Key_engraver}.
851 @node Ottava brackets
852 @unnumberedsubsubsec Ottava brackets
860 @notation{Ottava brackets} introduce an extra transposition of an
861 octave for the staff:
863 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
871 The @code{set-octavation} function also takes -1 (for 8va bassa),
872 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
873 Internally the function sets the properties @code{ottavation}
874 (e.g., to @code{"8va"} or @code{"8vb"}) and
875 @code{middleCPosition}. To override the text of the bracket, set
876 @code{ottavation} after invoking @code{set-octavation}, i.e.,
878 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
880 \set Staff.ottavation = #"8"
887 Music Glossary: @rglos{ottava}.
889 Snippets: @lsrdir{Pitches}.
891 Internals Reference: @internalsref{OttavaBracket}.
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 The key of a @notation{transposing instrument} can be specified.
907 This applies to many wind instruments, for example, clarinets
908 (B-flat, A, and E-flat), horn (F) and trumpet (B-flat, C, D, and
911 The transposition is entered with the command
914 \transposition @var{pitch}
918 where @var{pitch} specifies the key in which the instrument plays.
919 For example, a part for B-flat clarinet would include
925 This command sets the property @code{instrumentTransposition}.
926 The value of this property is used for MIDI output and quotations.
927 MIDI output is transposed to play at concert pitch, and cue notes
928 and quotations are automatically transposed to the key of the
929 instrument in which they are quoted. For more information about
930 quotations, see @ref{Quoting other voices}.
932 The pitch to use for @code{\transposition} should correspond to
933 the real sound heard when a@tie{}@code{c'} written on the staff is
934 played by the transposing instrument. @code{\transposition}
935 should be used when the music is entered from an orchestral part
936 written for the instrument. For example, in classical horn parts,
937 the tuning of the instrument is often changed during a piece.
938 Here are a few notes for a violin and a B-flat clarinet where the
939 parts have been entered using the notes and key as they appear in
940 each part or the conductor's score:
942 @lilypond[verbatim,quote,ragged-right]
944 \new Staff = "Violin I" {
945 \set Staff.instrumentName = "Vln"
946 \set Staff.midiInstrument="violin"
949 g'4( c''8) r c'' r c''4
951 \new Staff = "Clarinet" {
952 \set Staff.instrumentName = "Cl"
953 \set Staff.midiInstrument="clarinet"
956 a'4( d''8) r d'' r d''4
961 Without the @code{\transposition} command the MIDI output of this
962 music would play the notes a tone apart; with it the notes are
963 played correctly in unison.
965 However, when entering the notes of a score in concert pitch, when
966 all voices are entered in C, they may be prefaced by (the default)
967 @code{\transposition c'}:
981 to serve as a reminder that these parts are written in C.
986 Notation Reference: @ref{Quoting other voices}, @ref{Transpose}.
988 Snippets: @lsrdir{Pitches}.
991 @node Automatic accidentals
992 @unnumberedsubsubsec Automatic accidentals
993 @cindex automatic accidentals
995 @funindex set-accidental-style
997 There are many different conventions on how to typeset
998 accidentals. LilyPond provides a function to specify which such
999 accidental style to use. This function is called as follows
1003 #(set-accidental-style 'voice)
1008 The accidental style applies to the current @code{Staff} by
1009 default (with the exception of the styles @code{piano} and
1010 @code{piano-cautionary}, see below. Optionally, the function can
1011 take a second argument which determines in which scope the style
1012 should be changed. For example, to use the same style in all
1013 staves of the current @code{StaffGroup}, use
1016 #(set-accidental-style 'voice 'StaffGroup)
1019 The following accidental styles are supported. To demonstrate
1020 each style, we use the following example:
1022 @lilypond[verbatim,quote,ragged-right]
1026 cis'8 fis, d'4 <a cis>8 f bis4 |
1040 \voiceTwo \relative c' {
1044 \change Staff = down
1048 \change Staff = down
1049 <fis, a cis>4 gis <f a d>2 |
1056 \context Staff = "up" {
1057 %%% change the next line as desired:
1058 #(set-accidental-style 'default)
1061 \context Staff = "down" {
1062 %%% change the next line as desired:
1063 #(set-accidental-style 'default)
1070 Note that the last lines of this example can be replaced by the
1071 following, as long as the same accidental style should be used in
1076 \context Staff = "up" @{
1077 %%% change the next line as desired:
1078 #(set-accidental-style 'default 'Score)
1081 \context Staff = "down" @{
1089 @c don't use verbatim in this table.
1092 This is the default typesetting behavior. It corresponds to
1093 eighteenth-century common practice: accidentals are remembered to
1094 the end of the measure in which they occur and only on their own
1095 octave. Thus, in the example below, no natural signs are printed
1096 before the@tie{}@code{b} in the second measure or the
1099 @lilypond[quote,ragged-right]
1103 cis'8 fis, d'4 <a cis>8 f bis4 |
1117 \voiceTwo \relative c' {
1121 \change Staff = down
1125 \change Staff = down
1126 <fis, a cis>4 gis <f a d>2 |
1133 \context Staff = "up" {
1134 #(set-accidental-style 'default)
1137 \context Staff = "down" {
1138 #(set-accidental-style 'default)
1146 The normal behavior is to remember the accidentals on Staff-level.
1147 In this style, however, accidentals are typeset individually for
1148 each voice. Apart from that, the rule is similar to
1151 As a result, accidentals from one voice do not get canceled in
1152 other voices, which is often an unwanted result: in the following
1153 example, it is hard to determine whether the second@tie{}@code{a}
1154 should be played natural or sharp. The @code{voice} option should
1155 therefore be used only if the voices are to be read solely by
1156 individual musicians. If the staff is to be used by one musician
1157 (e.g., a conductor or in a piano score) then @code{modern} or
1158 @code{modern-cautionary} should be used instead.
1161 @lilypond[quote,ragged-right]
1165 cis'8 fis, d'4 <a cis>8 f bis4 |
1179 \voiceTwo \relative c' {
1183 \change Staff = down
1187 \change Staff = down
1188 <fis, a cis>4 gis <f a d>2 |
1195 \context Staff = "up" {
1196 #(set-accidental-style 'voice)
1199 \context Staff = "down" {
1200 #(set-accidental-style 'voice)
1208 @funindex modern style accidentals
1210 This rule corresponds to the common practice in the twentieth
1211 century. It prints the same accidentals as @code{default}, with
1212 two exceptions which serve to avoid ambiguity: after temporary
1213 accidentals, cancellation marks are printed also in the following
1214 measure (for notes in the same octave) and, in the same measure,
1215 for notes in other octaves. Hence the naturals before
1216 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1219 @lilypond[quote,ragged-right]
1223 cis'8 fis, d'4 <a cis>8 f bis4 |
1237 \voiceTwo \relative c' {
1241 \change Staff = down
1245 \change Staff = down
1246 <fis, a cis>4 gis <f a d>2 |
1253 \context Staff = "up" {
1254 #(set-accidental-style 'modern)
1257 \context Staff = "down" {
1258 #(set-accidental-style 'modern)
1265 @item modern-cautionary
1266 @funindex modern-cautionary
1268 This rule is similar to @code{modern}, but the @q{extra}
1269 accidentals (the ones not typeset by @code{default}) are typeset
1270 as cautionary accidentals. They are by default printed with
1271 parentheses, but they can also be printed in reduced size by
1272 defining the @code{cautionary-style} property of
1273 @code{AccidentalSuggestion}.
1276 @lilypond[quote,ragged-right]
1280 cis'8 fis, d'4 <a cis>8 f bis4 |
1294 \voiceTwo \relative c' {
1298 \change Staff = down
1302 \change Staff = down
1303 <fis, a cis>4 gis <f a d>2 |
1310 \context Staff = "up" {
1311 #(set-accidental-style 'modern-cautionary)
1314 \context Staff = "down" {
1315 #(set-accidental-style 'modern-cautionary)
1323 @funindex modern-voice
1325 This rule is used for multivoice accidentals to be read both by
1326 musicians playing one voice and musicians playing all voices.
1327 Accidentals are typeset for each voice, but they @emph{are}
1328 canceled across voices in the same @code{Staff}. Hence,
1329 the@tie{}@code{a} in the last measure is canceled because the
1330 previous cancellation was in a different voice, and
1331 the@tie{}@code{d} in the lower staff is canceled because of the
1332 accidental in a different voice in the previous measure:
1335 @lilypond[quote,ragged-right]
1339 cis'8 fis, d'4 <a cis>8 f bis4 |
1353 \voiceTwo \relative c' {
1357 \change Staff = down
1361 \change Staff = down
1362 <fis, a cis>4 gis <f a d>2 |
1369 \context Staff = "up" {
1370 #(set-accidental-style 'modern-voice)
1373 \context Staff = "down" {
1374 #(set-accidental-style 'modern-voice)
1381 @funindex modern-voice-cautionary
1382 @item modern-voice-cautionary
1384 This rule is the same as @code{modern-voice}, but with the extra
1385 accidentals (the ones not typeset by @code{voice}) typeset
1386 as cautionaries. Even though all accidentals typeset by
1387 @code{default} @emph{are} typeset with this rule,
1388 some of them are typeset as cautionaries.
1390 @lilypond[quote,ragged-right]
1394 cis'8 fis, d'4 <a cis>8 f bis4 |
1408 \voiceTwo \relative c' {
1412 \change Staff = down
1416 \change Staff = down
1417 <fis, a cis>4 gis <f a d>2 |
1424 \context Staff = "up" {
1425 #(set-accidental-style 'modern-voice-cautionary)
1428 \context Staff = "down" {
1429 #(set-accidental-style 'modern-voice-cautionary)
1437 @funindex piano accidentals
1439 This rule reflects twentieth-century practice for piano notation.
1440 Its behavior is very similar to @code{modern} style, but here
1441 accidentals also get canceled across the staves in the same
1442 GrandStaff or PianoStaff, hence all the cancellations of the final
1445 This accidental style applies to the current @code{GrandStaff} or
1446 @code{PianoStaff} by default.
1448 @lilypond[quote,ragged-right]
1452 cis'8 fis, d'4 <a cis>8 f bis4 |
1466 \voiceTwo \relative c' {
1470 \change Staff = down
1474 \change Staff = down
1475 <fis, a cis>4 gis <f a d>2 |
1482 \context Staff = "up" {
1483 #(set-accidental-style 'piano)
1486 \context Staff = "down" {
1493 @item piano-cautionary
1494 @funindex #(set-accidental-style 'piano-cautionary)
1496 Same as @code{#(set-accidental-style 'piano)} but with the extra
1497 accidentals typeset as cautionaries.
1499 @lilypond[quote,ragged-right]
1503 cis'8 fis, d'4 <a cis>8 f bis4 |
1517 \voiceTwo \relative c' {
1521 \change Staff = down
1525 \change Staff = down
1526 <fis, a cis>4 gis <f a d>2 |
1533 \context Staff = "up" {
1534 #(set-accidental-style 'piano-cautionary)
1537 \context Staff = "down" {
1545 @funindex no-reset accidental style
1547 This is the same as @code{default} but with accidentals lasting
1548 @q{forever} and not only within the same measure:
1550 @lilypond[quote,ragged-right]
1554 cis'8 fis, d'4 <a cis>8 f bis4 |
1568 \voiceTwo \relative c' {
1572 \change Staff = down
1576 \change Staff = down
1577 <fis, a cis>4 gis <f a d>2 |
1584 \context Staff = "up" {
1585 #(set-accidental-style 'no-reset)
1588 \context Staff = "down" {
1589 #(set-accidental-style 'no-reset)
1597 @funindex forget accidental style
1599 This is the opposite of @code{no-reset}: Accidentals are not
1600 remembered at all -- and hence all accidentals are typeset
1601 relative to the key signature, regardless of what was before in
1604 @lilypond[quote,ragged-right]
1608 cis'8 fis, d'4 <a cis>8 f bis4 |
1622 \voiceTwo \relative c' {
1626 \change Staff = down
1630 \change Staff = down
1631 <fis, a cis>4 gis <f a d>2 |
1638 \context Staff = "up" {
1639 #(set-accidental-style 'forget)
1642 \context Staff = "down" {
1643 #(set-accidental-style 'forget)
1653 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1654 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
1659 Snippets: @lsrdir{Pitches}.
1661 Internals Reference: @internalsref{Accidental_engraver},
1662 @internalsref{Accidental}, @internalsref{AccidentalSuggestion},
1663 @internalsref{AccidentalPlacement}, @internalsref{GrandStaff} and
1664 @internalsref{PianoStaff}, @internalsref{Staff}.
1669 Simultaneous notes are considered to be entered in sequential
1670 mode. This means that in a chord the accidentals are typeset as
1671 if the notes in the chord happen one at a time, in the order in
1672 which they appear in the input file. This is a problem when
1673 accidentals in a chord depend on each other, which does not happen
1674 for the default accidental style. The problem can be solved by
1675 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
1680 @unnumberedsubsubsec Ambitus
1683 The term @notation{ambitus} or @notation{ambit} denotes a range of
1684 pitches for a given voice in a part of music. It may also denote
1685 the pitch range that a musical instrument is capable of playing.
1686 Ambits are printed on vocal parts, so performers can easily
1687 determine if it matches their capabilities.
1689 Ambits are denoted at the beginning of a piece near the initial
1690 clef. The range is graphically specified by two note heads that
1691 represent the minimum and maximum pitch. Accidentals are only
1692 printed if they are not part of the key signature.
1694 @lilypond[verbatim,quote,ragged-right]
1698 \consists Ambitus_engraver
1710 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1711 {adding-ambiti-per-voice.ly}
1713 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1714 {ambiti-multiple-voices.ly}
1719 Snippets: @lsrdir{Pitches}.
1721 Internals Reference: @internalsref{Ambitus},
1722 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
1723 @internalsref{AmbitusAccidental}, @internalsref{Ambitus_engraver},
1724 @internalsref{Staff}, @internalsref{Voice}.
1729 There is no collision handling in the case of multiple per-voice
1734 @subsection Note heads
1737 * Easy notation note heads::
1738 * Shape note heads::
1740 * Special noteheads::
1743 @node Easy notation note heads
1744 @unnumberedsubsubsec Easy notation note heads
1746 @cindex note heads, practice
1747 @cindex note heads, easy notation
1748 @cindex easy notation
1751 The @q{easy play} note head includes a note name inside the head.
1752 It is used in music for beginners
1754 @lilypond[verbatim,quote,ragged-right,fragment,staffsize=26]
1760 The command @code{\setEasyHeads} overrides settings for the
1761 @code{NoteHead} object. To make the letters readable, it
1762 has to be printed in a large font size. To print with a larger
1763 font, see @ref{Setting the staff size}.
1767 @funindex \setEasyHeads
1768 @code{\setEasyHeads}
1772 Notation Reference: @ref{Setting the staff size}.
1774 Snippets: @lsrdir{Pitches},
1776 Internals Reference: @internalsref{NoteHead}.
1779 @node Shape note heads
1780 @unnumberedsubsubsec Shape note heads
1782 @cindex note heads, shape
1784 In shape note head notation, the shape of the note head
1785 corresponds to the harmonic function of a note in the scale. This
1786 notation was popular in nineteenth-century American song books.
1788 Shape note heads can be produced by setting @code{\aikenHeads} or
1789 @code{\sacredHarpHeads}, depending on the style desired.
1791 @lilypond[verbatim,fragment,relative=1]
1798 Shapes are typeset according to the step in the scale, where
1799 the base of the scale is determined by the @code{\key} command.
1802 @funindex shapeNoteStyles
1803 @funindex \aikenHeads
1804 @funindex \sacredHarpHeads
1806 Shape note heads are implemented through the
1807 @code{shapeNoteStyles} property. Its value is a vector of
1808 symbols. The k-th element indicates the style to use for the k-th
1809 step of the scale. Arbitrary combinations are possible, e.g.:
1811 @lilypond[verbatim,fragment,relative=1]
1812 \set shapeNoteStyles =
1813 ##(cross triangle fa #f mensural xcircle diamond)
1819 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1820 {applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
1825 Snippets: @lsrdir{Pitches}.
1829 @unnumberedsubsubsec Improvisation
1831 Improvisation is sometimes denoted with slashed note heads. Such
1832 note heads can be created by adding a @code{Pitch_squash_engraver}
1833 to the @code{Voice} context. Then, the following command
1836 \set squashedPosition = #0
1837 \override NoteHead #'style = #'slash
1841 switches on the slashes.
1843 There are shortcuts @code{\improvisationOn} (and an accompanying
1844 @code{\improvisationOff}) for this command sequence. They are
1845 used in the following example:
1847 @lilypond[verbatim,quote,ragged-right]
1849 \consists Pitch_squash_engraver
1851 e8 e g a a16(bes)(a8) g
1863 Snippets: @lsrdir{Pitches}.
1865 Internals Reference: @internalsref{Pitch_squash_engraver},
1866 @internalsref{Voice}.
1868 @node Special noteheads
1869 @unnumberedsubsubsec Special noteheads
1871 @cindex note heads, special
1873 Different noteheads are used by various instruments for various
1874 meanings -- crosses are used for @q{parlato} with vocalists,
1875 stopped notes on guitar; diamonds are used for harmonics on string
1876 instruments, etc. There is a shorthand (@code{\harmonic}) for
1877 diamond shapes; the other notehead styles are produced by tweaking
1880 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
1882 \override NoteHead #'style = #'cross
1884 \revert NoteHead #'style
1885 e d <c f\harmonic> <d a'\harmonic>
1889 To see all notehead styles, please see @ref{Note head styles}.
1894 Snippets: @lsrdir{Pitches}.
1896 Notation Reference: @ref{Note head styles}.
1898 Internals Reference: @internalsref{NoteHead}.