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.
15 @lilypondfile[quote]{pitches-headword.ly}
17 This section discusses how to specify the pitch of notes. There
18 are three steps to this process: input, modification, and output.
22 * Changing multiple pitches::
23 * Displaying pitches::
29 @subsection Writing pitches
31 This section discusses how to input pitches. There are two
32 different ways to place notes in octaves: absolute and relative
33 mode. In most cases, relative mode will be more convenient.
36 * Absolute octave entry::
37 * Relative octave entry::
39 * Note names in other languages::
43 @node Absolute octave entry
44 @unnumberedsubsubsec Absolute octave entry
49 @cindex absolute octave specification
50 @cindex octave specification, absolute
51 @cindex absolute octave entry
52 @cindex octave entry, absolute
54 A pitch name is specified using lowercase letters@tie{}@code{a}
55 through@tie{}@code{g}. The note names @code{c} to @code{b} are
56 engraved in the octave below middle C.
59 @lilypond[verbatim,quote,fragment]
66 @cindex octave changing mark
71 Other octaves may be specified with a single quote@tie{}(@code{'})
72 or comma@tie{}(@code{,}) character. Each@tie{}@code{'} raises the
73 pitch by one octave; each@tie{}@code{,} lowers the pitch by an
76 @lilypond[verbatim,quote,fragment]
94 @node Relative octave entry
95 @unnumberedsubsubsec Relative octave entry
98 @cindex relative octave entry
99 @cindex octave entry, relative
100 @cindex relative octave specification
101 @cindex ocatve specification, relative
106 When octaves are specified in absolute mode it is easy to
107 accidentally put a pitch in the wrong octave. Relative octave
108 mode reduces these errors since most of the time it is not
109 necessary to indicate any octaves at all. Furthermore, in
110 absolute mode a single mistake may be difficult to spot, while in
111 relative mode a single error puts the rest of the piece off by one
115 \relative @var{startpitch} @var{musicexpr}
118 In relative mode, each note is assumed to be as close to the
119 previous note as possible. This means that the octave of each
120 pitch inside @var{musicexpr} is calculated as follows:
124 If no octave changing mark is used on a pitch, its octave is
125 calculated so that the interval with the previous note is less
126 than a fifth. This interval is determined without considering
130 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be
131 added to respectively raise or lower a pitch by an extra octave,
132 relative to the pitch calculated without an octave mark.
135 Multiple octave changing marks can be used. For example,
136 @code{''}@tie{}and@tie{}@code{,,} will alter the pitch by two
140 The pitch of the first note is relative to
141 @code{@var{startpitch}}. @var{startpitch} is specified in
142 absolute octave mode, and it is recommended that it be a octave of
147 Here is the relative mode shown in action:
149 @lilypond[verbatim,quote]
158 Octave changing marks are used for intervals greater than a
161 @lilypond[verbatim,quote]
168 A note sequence without a single octave mark can nevertheless span
171 @lilypond[verbatim,quote]
178 When @code{\relative} blocks are nested, the innermost
179 @code{\relative} block applies.
181 @lilypond[verbatim,quote]
190 @code{\relative} has no effect on @code{\chordmode} blocks.
192 @lilypond[verbatim,quote]
201 @code{\relative} is not allowed inside of @code{\chordmode} blocks.
203 Music inside a @code{\transpose} block is absolute unless a
204 @code{\relative} is included.
206 @lilypond[verbatim,quote]
219 @cindex chords and relative octave entry
220 @cindex relative octave entry and chords
222 If the preceding item is a chord, the first note of the chord is
223 used as the reference point for the octave placement of a
224 following note or chord. Inside chords, the next note is always
225 relative to the preceding one. Examine the next example
226 carefully, paying attention to the @code{c} notes.
228 @lilypond[verbatim,quote]
237 As explained above, the octave of pitches is calculated only with
238 the note names, regardless of any alterations. Therefore, an
239 E-double-sharp following a B will be placed higher, while an
240 F-double-flat will be placed lower. In other words, a
241 double-augmented fourth is considered a smaller interval than a
242 double-diminished fifth, regardless of the number of semitones
243 that each interval contains.
245 @lilypond[verbatim,quote]
268 @rinternals{RelativeOctaveMusic}.
271 @cindex relative octave entry and transposition
272 @cindex transposition and relative octave entry
283 If no @var{startpitch} is specified for @code{\relative},
284 then@tie{}@code{c'} is assumed. However, this is a deprecated
285 option and may disappear in future versions, so its use is
291 @unnumberedsubsubsec Accidentals
294 @cindex key signature
297 @c duplicated in Key signature and Accidentals
298 @warning{New users are sometimes confused about accidentals and
299 key signatures. In LilyPond, note names are the raw input; key
300 signatures and clefs determine how this raw input is displayed.
301 An unaltered note like@tie{}@code{c} means @q{C natural},
302 regardless of the key signature or clef. For more information,
303 see @rlearning{Accidentals and key signatures}.}
305 @cindex note names, Dutch
306 @cindex note names, default
307 @cindex default note names
311 @cindex sharp, double
315 @cindex natural pitch
317 A @notation{sharp} pitch is made by adding @code{is} to the note
318 name, and a @notation{flat} pitch by adding @code{es}. As you
319 might expect, a @notation{double sharp} or @notation{double flat}
320 is made by adding @code{isis} or @code{eses}. This syntax is
321 derived from Dutch note naming conventions. To use other names
322 for accidentals, see @ref{Note names in other languages}.
324 @lilypond[verbatim,quote,relative=2]
328 A natural will cancel the effect of an accidental or key
329 signature. However, naturals are not encoded into the note name
330 syntax with a suffix; a natural pitch is shown as a simple note
333 @lilypond[verbatim,quote,relative=2]
337 @cindex quarter tones
341 Quarter tones may be added; the following is a series of Cs with
344 @lilypond[verbatim,quote,relative=2]
345 ceseh1 ces ceh c cih cis cisih
350 @cindex accidental, reminder
351 @cindex accidental, cautionary
352 @cindex accidental, parenthesized
353 @cindex reminder accidental
354 @cindex cautionary accidental
355 @cindex parenthesized accidental
361 Normally accidentals are printed automatically, but you may also
362 print them manually. A reminder accidental can be forced by
363 adding an exclamation mark@tie{}@code{!} after the pitch. A
364 cautionary accidental (i.e., an accidental within parentheses) can
365 be obtained by adding the question mark@tie{}@code{?} after the
366 pitch. These extra accidentals can also be used to produce
369 @lilypond[verbatim,quote,relative=2]
370 cis cis cis! cis? c c c! c?
373 @cindex accidental on tied note
374 @cindex tied note, accidental
376 Accidentals on tied notes are only printed at the beginning of a
379 @lilypond[verbatim,quote,relative=2]
388 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
389 {preventing-extra-naturals-from-being-automatically-added.ly}
391 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
399 @rglos{double sharp},
402 @rglos{quarter tone}.
405 @rlearning{Accidentals and key signatures}.
408 @ref{Automatic accidentals},
409 @ref{Annotational accidentals (musica ficta)},
410 @ref{Note names in other languages}.
416 @rinternals{Accidental_engraver},
417 @rinternals{Accidental},
418 @rinternals{AccidentalCautionary},
419 @rinternals{accidental-interface}.
422 @cindex accidental, quarter-tone
423 @cindex quarter-tone accidental
427 There are no generally accepted standards for denoting
428 quarter-tone accidentals, so LilyPond's symbol does not conform to
433 @node Note names in other languages
434 @unnumberedsubsubsec Note names in other languages
436 @cindex note names, other languages
437 @cindex pitch names, other languages
438 @cindex language, note names in other
439 @cindex language, pitch names in other
441 There are predefined sets of note and accidental names for various
442 other languages. To use them, include the language-specific init
443 file listed below. For example, to use English note names, add
444 @code{@w{\include "english.ly"}} to the input file.
446 @warning{Because some other include files (such as @code{@w{predefined-fretboards.ly}})
447 use default (Nederlands) note names, the @code{@bs{}include}
448 command for the language file should be placed after all other
449 LilyPond distribution files.}
451 The available language files and the note names they define are:
454 @multitable {@file{nederlands.ly}} {do re mi fa sol la sib si}
455 @headitem Language File
457 @item @file{nederlands.ly}
458 @tab c d e f g a bes b
459 @item @file{arabic.ly}
460 @tab do re mi fa sol la sib si
461 @item @file{catalan.ly}
462 @tab do re mi fa sol la sib si
463 @item @file{deutsch.ly}
465 @item @file{english.ly}
466 @tab c d e f g a bf b
467 @item @file{espanol.ly}
468 @tab do re mi fa sol la sib si
469 @item @file{italiano.ly}
470 @tab do re mi fa sol la sib si
471 @item @file{norsk.ly}
473 @item @file{portugues.ly}
474 @tab do re mi fa sol la sib si
475 @item @file{suomi.ly}
477 @item @file{svenska.ly}
479 @item @file{vlaams.ly}
480 @tab do re mi fa sol la sib si
485 and the accidental suffixes they define are:
488 @multitable {@file{nederlands.ly}} {-s/-sharp} {-ess/-es} {-ss/-x/-sharpsharp} {-essess/-eses}
489 @headitem Language File
490 @tab sharp @tab flat @tab double sharp @tab double flat
491 @item @file{nederlands.ly}
492 @tab -is @tab -es @tab -isis @tab -eses
493 @item @file{arabic.ly}
494 @tab -d @tab -b @tab -dd @tab -bb
495 @item @file{catalan.ly}
496 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
497 @item @file{deutsch.ly}
498 @tab -is @tab -es @tab -isis @tab -eses
499 @item @file{english.ly}
500 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
502 @item @file{espanol.ly}
503 @tab -s @tab -b @tab -ss/-x @tab -bb
504 @item @file{italiano.ly}
505 @tab -d @tab -b @tab -dd @tab -bb
506 @item @file{norsk.ly}
507 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
509 @item @file{portugues.ly}
510 @tab -s @tab -b @tab -ss @tab -bb
511 @item @file{suomi.ly}
512 @tab -is @tab -es @tab -isis @tab -eses
513 @item @file{svenska.ly}
514 @tab -iss @tab -ess @tab -ississ @tab -essess
515 @item @file{vlaams.ly}
516 @tab -k @tab -b @tab -kk @tab -bb
520 In Dutch, @code{aes} is contracted to @code{as}, but both forms
521 are accepted in LilyPond. Similarly, both @code{es} and
522 @code{ees} are accepted. This also applies to
523 @code{aeses}@tie{}/@tie{}@code{ases} and
524 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
525 contracted names are defined in the corresponding language files.
527 @lilypond[verbatim,quote,relative=2]
528 a2 as e es a ases e eses
538 Some music uses microtones whose alterations are fractions of a
539 @q{normal} sharp or flat. The note names for quarter-tones
540 defined in the various language files are listed in the following
541 table. Here the prefixes @notation{semi-} and @notation{sesqui-}
542 mean @q{half} and @q{one and a half}, respectively. For the other
543 languages, no special names have been defined yet.
546 @multitable {@file{nederlands.ly}} {@b{semi-sharp}} {@b{semi-flat}} {@b{sesqui-sharp}} {@b{sesqui-flat}}
547 @headitem Language File
548 @tab semi-sharp @tab semi-flat @tab sesqui-sharp @tab sesqui-flat
550 @item @file{nederlands.ly}
551 @tab -ih @tab -eh @tab -isih @tab -eseh
552 @item @file{arabic.ly}
553 @tab -sd @tab -sb @tab -dsd @tab -bsb
554 @item @file{deutsch.ly}
555 @tab -ih @tab -eh @tab -isih @tab -eseh
556 @item @file{english.ly}
557 @tab -qs @tab -qf @tab -tqs @tab -tqf
558 @item @file{espanol.ly}
559 @tab -cs @tab -cb @tab -tcs @tab -tcb
560 @item @file{italiano.ly}
561 @tab -sd @tab -sb @tab -dsd @tab -bsb
562 @item @file{portugues.ly}
563 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
576 @node Changing multiple pitches
577 @subsection Changing multiple pitches
579 This section discusses how to modify pitches.
587 @unnumberedsubsubsec Octave checks
589 @cindex octave correction
591 @cindex control pitch
594 @funindex \octaveCheck
595 @funindex octaveCheck
596 @funindex controlpitch
598 In relative mode, it is easy to forget an octave changing mark.
599 Octave checks make such errors easier to find by displaying a
600 warning and correcting the octave if a note is found in an
603 To check the octave of a note, specify the absolute octave after
604 the @code{=}@tie{}symbol. This example will generate a warning
605 (and change the pitch) because the second note is the absolute
606 octave @code{d''} instead of @code{d'} as indicated by the octave
609 @lilypond[verbatim,quote]
616 The octave of notes may also be checked with the
617 @code{\octaveCheck}@tie{}@var{controlpitch} command.
618 @var{controlpitch} is specified in absolute mode. This checks
619 that the interval between the previous note and the
620 @var{controlpitch} is within a fourth (i.e., the normal
621 calculation of relative mode). If this check fails, a warning is
622 printed, but the previous note is not changed. Future notes are
623 relative to the @var{controlpitch}.
625 @lilypond[verbatim,quote]
633 Compare the two bars below. The first and third @code{\octaveCheck}
634 checks fail, but the second one does not fail.
636 @lilypond[verbatim,quote]
656 @rinternals{RelativeOctaveCheck}.
660 @unnumberedsubsubsec Transpose
664 @cindex transposition
665 @cindex transposition of pitches
666 @cindex transposition of notes
667 @cindex pitches, transposition of
668 @cindex notes, transposition of
673 A music expression can be transposed with @code{\transpose}. The
677 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
681 This means that @var{musicexpr} is transposed by the interval
682 between the pitches @var{frompitch} and @var{topitch}: any note
683 with pitch @var{frompitch} is changed to @var{topitch} and any
684 other note is transposed by the same interval. Both pitches are
685 entered in absolute mode.
687 @warning{Music inside a @code{@bs{}transpose} block is absolute
688 unless a @code{@bs{}relative} is included in the block.}
690 Consider a piece written in the key of D-major. It can be
691 transposed up to E-major; note that the key signature is
692 automatically transposed as well.
694 @lilypond[verbatim,quote]
703 @cindex transposing instruments
704 @cindex instruments, transposing
706 If a part written in C (normal @notation{concert pitch}) is to be
707 played on the A clarinet (for which an A is notated as a C and
708 thus sounds a minor third lower than notated), the appropriate
709 part will be produced with:
711 @lilypond[verbatim,quote]
721 Note that we specify @w{@code{\key c \major}} explicitly. If we
722 do not specify a key signature, the notes will be transposed but
723 no key signature will be printed.
725 @code{\transpose} distinguishes between enharmonic pitches: both
726 @w{@code{\transpose c cis}} or @w{@code{\transpose c des}} will
727 transpose up a semitone. The first version will print sharps and
728 the notes will remain on the same scale step, the second version
729 will print flats on the scale step above.
731 @lilypond[verbatim,quote]
732 music = \relative c' { c d e f }
734 \transpose c cis { \music }
735 \transpose c des { \music }
740 @code{\transpose} may also be used in a different way, to input
741 written notes for a transposing instrument. The previous examples
742 show how to enter pitches in C (or @notation{concert pitch}) and
743 typeset them for a transposing instrument, but the opposite is
744 also possible if you for example have a set of instrumental parts
745 and want to print a conductor's score. For example, when entering
746 music for a B-flat trumpet that begins on a notated E (concert D),
750 musicInBflat = @{ e4 @dots{} @}
751 \transpose c bes, \musicInBflat
755 To print this music in F (e.g., rearranging to a French horn) you
756 could wrap the existing music with another @code{\transpose}:
759 musicInBflat = @{ e4 @dots{} @}
760 \transpose f c' @{ \transpose c bes, \musicInBflat @}
764 For more information about transposing instruments,
765 see @ref{Instrument transpositions}.
770 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
771 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
776 @ref{Relative octave entry},
777 @ref{Instrument transpositions}.
783 @rinternals{TransposedMusic}.
795 The relative conversion will not affect @code{\transpose},
796 @code{\chordmode} or @code{\relative} sections in its argument.
797 To use relative mode within transposed music, an additional
798 @code{\relative} must be placed inside @code{\transpose}.
800 @node Displaying pitches
801 @subsection Displaying pitches
803 This section discusses how to alter the output of pitches.
809 * Instrument transpositions::
810 * Automatic accidentals::
816 @unnumberedsubsubsec Clef
828 @cindex mezzosoprano clef
829 @cindex baritone clef
830 @cindex varbaritone clef
834 @cindex clef, ancient
844 @cindex clef, soprano
845 @cindex clef, mezzosoprano
846 @cindex clef, baritone
847 @cindex clef, varbaritone
848 @cindex subbass clef, subbass
853 The clef may be altered. Middle C is shown in every example.
855 @lilypond[verbatim,quote,relative=1]
868 @lilypond[verbatim,quote,relative=1]
900 Further supported clefs are described under @ref{Mensural clefs}
901 and @ref{Gregorian clefs}.
903 @cindex transposing clefs
904 @cindex clef, transposing
905 @cindex octave transposition
906 @cindex choral tenor clef
907 @cindex tenor clef, choral
909 By adding@tie{}@code{_8} or@tie{}@code{^8} to the clef name, the
910 clef is transposed one octave down or up, respectively,
911 and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves.
912 The clef name must be enclosed in quotes when it contains
913 underscores or digits.
915 @lilypond[verbatim,quote,relative=2]
927 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
928 {tweaking-clef-properties.ly}
933 @ref{Mensural clefs},
934 @ref{Gregorian clefs}.
940 @rinternals{Clef_engraver},
942 @rinternals{OctavateEight},
943 @rinternals{clef-interface}.
947 @unnumberedsubsubsec Key signature
949 @cindex key signature
954 @c duplicated in Key signature and Accidentals
955 @warning{New users are sometimes confused about accidentals and
956 key signatures. In LilyPond, note names are the raw input; key
957 signatures and clefs determine how this raw input is displayed.
958 An unaltered note like@tie{}@code{c} means @q{C natural},
959 regardless of the key signature or clef. For more information,
960 see @rlearning{Accidentals and key signatures}.}
962 The key signature indicates the tonality in which a piece is
963 played. It is denoted by a set of alterations (flats or sharps)
964 at the start of the staff. The key signature may be altered:
967 \key @var{pitch} @var{mode}
980 @funindex \mixolydian
1002 Here, @var{mode} should be @code{\major} or @code{\minor} to get a
1003 key signature of @var{pitch}-major or @var{pitch}-minor,
1004 respectively. You may also use the standard mode names, also
1005 called @notation{church modes}: @code{\ionian}, @code{\dorian},
1006 @code{\phrygian}, @code{\lydian}, @code{\mixolydian},
1007 @code{\aeolian}, and @code{\locrian}.
1009 @lilypond[verbatim,quote,relative=2]
1019 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1020 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
1022 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1023 {non-traditional-key-signatures.ly}
1028 @rglos{church mode},
1032 @rlearning{Accidentals and key signatures}.
1037 Internals Reference:
1038 @rinternals{KeyChangeEvent},
1039 @rinternals{Key_engraver},
1040 @rinternals{Key_performer},
1041 @rinternals{KeyCancellation},
1042 @rinternals{KeySignature},
1043 @rinternals{key-cancellation-interface},
1044 @rinternals{key-signature-interface}.
1047 @node Ottava brackets
1048 @unnumberedsubsubsec Ottava brackets
1056 @funindex set-octavation
1060 @notation{Ottava brackets} introduce an extra transposition of an
1061 octave for the staff:
1063 @lilypond[verbatim,quote,relative=2]
1071 The @code{ottava} function also takes -1 (for 8va bassa),
1072 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
1077 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1088 Internals Reference:
1089 @rinternals{Ottava_spanner_engraver},
1090 @rinternals{OttavaBracket},
1091 @rinternals{ottava-bracket-interface}.
1094 @node Instrument transpositions
1095 @unnumberedsubsubsec Instrument transpositions
1097 @cindex transposition, MIDI
1098 @cindex transposition, instrument
1099 @cindex transposing instrument
1101 @cindex MIDI transposition
1103 @funindex \transposition
1104 @funindex transposition
1106 When typesetting scores that involve transposing instruments, some
1107 parts can be typeset in a different pitch than the
1108 @notation{concert pitch}. In these cases, the key of the
1109 @notation{transposing instrument} should be specified; otherwise
1110 the MIDI output and cues in other parts will produce incorrect
1111 pitches. For more information about quotations, see
1112 @ref{Quoting other voices}.
1115 \transposition @var{pitch}
1118 The pitch to use for @code{\transposition} should correspond to
1119 the real sound heard when a@tie{}@code{c'} written on the staff is
1120 played by the transposing instrument. This pitch is entered in
1121 absolute mode, so an instrument that produces a real sound which
1122 is one tone higher than the printed music should use
1123 @w{@code{\transposition d'}}. @code{\transposition} should
1124 @emph{only} be used if the pitches are @emph{not} being entered in
1127 Here are a few notes for violin and B-flat clarinet where the
1128 parts have been entered using the notes and key as they appear in
1129 each part of the conductor's score. The two instruments are
1132 @lilypond[verbatim,quote]
1134 \new Staff = "violin" {
1136 \set Staff.instrumentName = #"Vln"
1137 \set Staff.midiInstrument = #"violin"
1138 % not strictly necessary, but a good reminder
1145 \new Staff = "clarinet" {
1147 \set Staff.instrumentName = \markup { Cl (B\flat) }
1148 \set Staff.midiInstrument = #"clarinet"
1158 The @code{\transposition} may be changed during a piece. For
1159 example, a clarinetist may switch from an A clarinet to a B-flat
1162 @lilypond[verbatim,quote,relative=2]
1163 \set Staff.instrumentName = #"Cl (A)"
1168 s1*0^\markup { Switch to B\flat clarinet }
1179 @rglos{concert pitch},
1180 @rglos{transposing instrument}.
1183 @ref{Quoting other voices},
1190 @node Automatic accidentals
1191 @unnumberedsubsubsec Automatic accidentals
1193 @cindex accidental style
1194 @cindex accidental style, default
1196 @cindex accidentals, automatic
1197 @cindex automatic accidentals
1198 @cindex default accidental style
1200 @funindex set-accidental-style
1204 There are many different conventions on how to typeset
1205 accidentals. LilyPond provides a function to specify which
1206 accidental style to use. This function is called as follows:
1210 #(set-accidental-style 'voice)
1215 The accidental style applies to the current @code{Staff} by
1216 default (with the exception of the styles @code{piano} and
1217 @code{piano-cautionary}, which are explained below). Optionally,
1218 the function can take a second argument that determines in which
1219 scope the style should be changed. For example, to use the same
1220 style in all staves of the current @code{StaffGroup}, use:
1223 #(set-accidental-style 'voice 'StaffGroup)
1226 The following accidental styles are supported. To demonstrate
1227 each style, we use the following example:
1230 @lilypond[verbatim,quote]
1234 cis'8 fis, d'4 <a cis>8 f bis4 |
1248 \voiceTwo \relative c' {
1252 \change Staff = down
1256 \change Staff = down
1257 <fis, a cis>4 gis <f a d>2 |
1264 \context Staff = "up" {
1265 #(set-accidental-style 'default)
1268 \context Staff = "down" {
1269 #(set-accidental-style 'default)
1276 Note that the last lines of this example can be replaced by the
1277 following, as long as the same accidental style should be used in
1283 \context Staff = "up" @{
1284 %%% change the next line as desired:
1285 #(set-accidental-style 'default 'Score)
1288 \context Staff = "down" @{
1296 @c don't use verbatim in this table.
1300 @cindex default accidental style
1301 @cindex accidental style, default
1305 This is the default typesetting behavior. It corresponds to
1306 eighteenth-century common practice: accidentals are remembered to
1307 the end of the measure in which they occur and only in their own
1308 octave. Thus, in the example below, no natural signs are printed
1309 before the@tie{}@code{b} in the second measure or the
1316 cis'8 fis, d'4 <a cis>8 f bis4 |
1330 \voiceTwo \relative c' {
1334 \change Staff = down
1338 \change Staff = down
1339 <fis, a cis>4 gis <f a d>2 |
1346 \context Staff = "up" {
1347 #(set-accidental-style 'default)
1350 \context Staff = "down" {
1351 #(set-accidental-style 'default)
1360 @cindex accidental style, voice
1361 @cindex voice accidental style
1362 @cindex accidental style, modern
1363 @cindex modern accidental style
1364 @cindex accidental style, modern-cautionary
1365 @cindex modern-cautionary accidental style
1369 The normal behavior is to remember the accidentals at
1370 @code{Staff}-level. In this style, however, accidentals are
1371 typeset individually for each voice. Apart from that, the rule is
1372 similar to @code{default}.
1374 As a result, accidentals from one voice do not get canceled in
1375 other voices, which is often an unwanted result: in the following
1376 example, it is hard to determine whether the second@tie{}@code{a}
1377 should be played natural or sharp. The @code{voice} option should
1378 therefore be used only if the voices are to be read solely by
1379 individual musicians. If the staff is to be used by one musician
1380 (e.g., a conductor or in a piano score) then @code{modern} or
1381 @code{modern-cautionary} should be used instead.
1388 cis'8 fis, d'4 <a cis>8 f bis4 |
1402 \voiceTwo \relative c' {
1406 \change Staff = down
1410 \change Staff = down
1411 <fis, a cis>4 gis <f a d>2 |
1418 \context Staff = "up" {
1419 #(set-accidental-style 'voice)
1422 \context Staff = "down" {
1423 #(set-accidental-style 'voice)
1432 @cindex accidentals, modern style
1433 @cindex modern style accidentals
1437 This rule corresponds to the common practice in the twentieth
1438 century. It prints the same accidentals as @code{default}, with
1439 two exceptions that serve to avoid ambiguity: after temporary
1440 accidentals, cancellation marks are printed also in the following
1441 measure (for notes in the same octave) and, in the same measure,
1442 for notes in other octaves. Hence the naturals before
1443 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1450 cis'8 fis, d'4 <a cis>8 f bis4 |
1464 \voiceTwo \relative c' {
1468 \change Staff = down
1472 \change Staff = down
1473 <fis, a cis>4 gis <f a d>2 |
1480 \context Staff = "up" {
1481 #(set-accidental-style 'modern)
1484 \context Staff = "down" {
1485 #(set-accidental-style 'modern)
1492 @item modern-cautionary
1494 @cindex accidentals, modern cautionary style
1495 @cindex modern accidental style
1496 @cindex modern cautionary accidental style
1497 @cindex modern style accidentals
1498 @cindex modern style cautionary accidentals
1500 @funindex modern-cautionary
1502 This rule is similar to @code{modern}, but the @q{extra}
1503 accidentals (the ones not typeset by @code{default}) are typeset
1504 as cautionary accidentals. They are by default printed with
1505 parentheses, but they can also be printed in reduced size by
1506 defining the @code{cautionary-style} property of
1507 @code{AccidentalSuggestion}.
1513 cis'8 fis, d'4 <a cis>8 f bis4 |
1527 \voiceTwo \relative c' {
1531 \change Staff = down
1535 \change Staff = down
1536 <fis, a cis>4 gis <f a d>2 |
1543 \context Staff = "up" {
1544 #(set-accidental-style 'modern-cautionary)
1547 \context Staff = "down" {
1548 #(set-accidental-style 'modern-cautionary)
1557 @cindex accidental style, modern
1558 @cindex accidentals, modern
1559 @cindex accidentals, multivoice
1560 @cindex modern accidental style
1561 @cindex modern accidentals
1562 @cindex multivoice accidentals
1564 @funindex modern-voice
1566 This rule is used for multivoice accidentals to be read both by
1567 musicians playing one voice and musicians playing all voices.
1568 Accidentals are typeset for each voice, but they @emph{are}
1569 canceled across voices in the same @code{Staff}. Hence,
1570 the@tie{}@code{a} in the last measure is canceled because the
1571 previous cancellation was in a different voice, and
1572 the@tie{}@code{d} in the lower staff is canceled because of the
1573 accidental in a different voice in the previous measure:
1579 cis'8 fis, d'4 <a cis>8 f bis4 |
1593 \voiceTwo \relative c' {
1597 \change Staff = down
1601 \change Staff = down
1602 <fis, a cis>4 gis <f a d>2 |
1609 \context Staff = "up" {
1610 #(set-accidental-style 'modern-voice)
1613 \context Staff = "down" {
1614 #(set-accidental-style 'modern-voice)
1621 @cindex accidental style, cautionary, modern voice
1622 @cindex accidental style, modern voice cautionary
1623 @cindex accidental style, voice, modern cautionary
1625 @funindex modern-voice-cautionary
1627 @item modern-voice-cautionary
1629 This rule is the same as @code{modern-voice}, but with the extra
1630 accidentals (the ones not typeset by @code{voice}) typeset as
1631 cautionaries. Even though all accidentals typeset by
1632 @code{default} @emph{are} typeset with this rule, some of them are
1633 typeset as cautionaries.
1639 cis'8 fis, d'4 <a cis>8 f bis4 |
1653 \voiceTwo \relative c' {
1657 \change Staff = down
1661 \change Staff = down
1662 <fis, a cis>4 gis <f a d>2 |
1669 \context Staff = "up" {
1670 #(set-accidental-style 'modern-voice-cautionary)
1673 \context Staff = "down" {
1674 #(set-accidental-style 'modern-voice-cautionary)
1683 @cindex accidental style, piano
1684 @cindex accidentals, piano
1685 @cindex piano accidental style
1686 @cindex piano accidentals
1690 This rule reflects twentieth-century practice for piano notation.
1691 Its behavior is very similar to @code{modern} style, but here
1692 accidentals also get canceled across the staves in the same
1693 @code{GrandStaff} or @code{PianoStaff}, hence all the
1694 cancellations of the final notes.
1696 This accidental style applies to the current @code{GrandStaff} or
1697 @code{PianoStaff} by default.
1703 cis'8 fis, d'4 <a cis>8 f bis4 |
1717 \voiceTwo \relative c' {
1721 \change Staff = down
1725 \change Staff = down
1726 <fis, a cis>4 gis <f a d>2 |
1733 \context Staff = "up" {
1734 #(set-accidental-style 'piano)
1737 \context Staff = "down" {
1744 @item piano-cautionary
1746 @cindex accidentals, piano cautionary
1747 @cindex cautionary accidentals, piano
1748 @cindex piano cautionary accidentals
1749 @cindex accidental style, piano cautionary
1750 @cindex cautionary accidental style, piano
1751 @cindex piano cautionary accidental style
1753 @funindex piano-cautionary
1755 This is the same as @code{piano} but with the extra accidentals
1756 typeset as cautionaries.
1762 cis'8 fis, d'4 <a cis>8 f bis4 |
1776 \voiceTwo \relative c' {
1780 \change Staff = down
1784 \change Staff = down
1785 <fis, a cis>4 gis <f a d>2 |
1792 \context Staff = "up" {
1793 #(set-accidental-style 'piano-cautionary)
1796 \context Staff = "down" {
1806 @cindex neo-modern accidental style
1807 @cindex accidental style, neo-modern
1809 @funindex neo-modern
1811 This rule reproduces a common practice in contemporary music:
1812 accidentals are printed like with @code{modern}, but they are printed
1813 again if the same note appears later in the same measure -- except
1814 if the note is immediately repeated.
1820 cis'8 fis, d'4 <a cis>8 f bis4 |
1834 \voiceTwo \relative c' {
1838 \change Staff = down
1842 \change Staff = down
1843 <fis, a cis>4 gis <f a d>2 |
1850 \context Staff = "up" {
1851 #(set-accidental-style 'neo-modern)
1854 \context Staff = "down" {
1855 #(set-accidental-style 'neo-modern)
1862 @item neo-modern-cautionary
1864 @cindex neo-modern-cautionary accidental style
1865 @cindex accidental style, neo-modern-cautionary
1867 @funindex neo-modern-cautionary
1869 This rule is similar to @code{neo-modern}, but the extra
1870 accidentals are printed as cautionary accidentals.
1876 cis'8 fis, d'4 <a cis>8 f bis4 |
1890 \voiceTwo \relative c' {
1894 \change Staff = down
1898 \change Staff = down
1899 <fis, a cis>4 gis <f a d>2 |
1906 \context Staff = "up" {
1907 #(set-accidental-style 'neo-modern-cautionary)
1910 \context Staff = "down" {
1911 #(set-accidental-style 'neo-modern-cautionary)
1921 @cindex dodecaphonic accidental style
1922 @cindex dodecaphonic style, neo-modern
1924 @funindex dodecaphonic
1926 This rule reflects a practice introduced by composers at
1927 the beginning of the 20th century, in an attempt to
1928 abolish the hierarchy between natural and non-natural notes.
1929 With this style, @emph{every} note gets an accidental sign,
1930 including natural signs.
1936 cis'8 fis, d'4 <a cis>8 f bis4 |
1950 \voiceTwo \relative c' {
1954 \change Staff = down
1958 \change Staff = down
1959 <fis, a cis>4 gis <f a d>2 |
1966 \context Staff = "up" {
1967 #(set-accidental-style 'dodecaphonic)
1970 \context Staff = "down" {
1971 #(set-accidental-style 'dodecaphonic)
1981 @cindex teaching accidental style
1982 @cindex accidental style, teaching
1986 This rule is intended for students, and makes it easy to create
1987 scale sheets with automagically created cautionary accidentals.
1988 Accidentals are printed like with @code{modern}, but cautionary
1989 accidentals are added for all sharp or flat tones specified by the
1990 key signature, except if the note is immediately repeated.
1996 cis'8 fis, d'4 <a cis>8 f bis4 |
2010 \voiceTwo \relative c' {
2014 \change Staff = down
2018 \change Staff = down
2019 <fis, a cis>4 gis <f a d>2 |
2026 \context Staff = "up" {
2028 #(set-accidental-style 'teaching)
2031 \context Staff = "down" {
2033 #(set-accidental-style 'teaching)
2044 @cindex accidental style, no reset
2045 @cindex no reset accidental style
2049 This is the same as @code{default} but with accidentals lasting
2050 @q{forever} and not only within the same measure:
2056 cis'8 fis, d'4 <a cis>8 f bis4 |
2070 \voiceTwo \relative c' {
2074 \change Staff = down
2078 \change Staff = down
2079 <fis, a cis>4 gis <f a d>2 |
2086 \context Staff = "up" {
2087 #(set-accidental-style 'no-reset)
2090 \context Staff = "down" {
2091 #(set-accidental-style 'no-reset)
2100 @cindex forget accidental style
2101 @cindex accidental style, forget
2105 This is the opposite of @code{no-reset}: Accidentals are not
2106 remembered at all -- and hence all accidentals are typeset
2107 relative to the key signature, regardless of what came before in
2108 the music. Unlike @code{dodecaphonic}, this rule never prints
2115 cis'8 fis, d'4 <a cis>8 f bis4 |
2129 \voiceTwo \relative c' {
2133 \change Staff = down
2137 \change Staff = down
2138 <fis, a cis>4 gis <f a d>2 |
2145 \context Staff = "up" {
2146 #(set-accidental-style 'forget)
2149 \context Staff = "down" {
2150 #(set-accidental-style 'forget)
2160 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2161 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
2168 Internals Reference:
2169 @rinternals{Accidental},
2170 @rinternals{Accidental_engraver},
2171 @rinternals{GrandStaff},
2172 @rinternals{PianoStaff},
2174 @rinternals{AccidentalSuggestion},
2175 @rinternals{AccidentalPlacement},
2176 @rinternals{accidental-suggestion-interface}.
2179 @cindex accidentals and simultaneous notes
2180 @cindex simultaneous notes and accidentals
2181 @cindex accidentals in chords
2182 @cindex chords, accidentals in
2186 Simultaneous notes are considered to be entered in sequential
2187 mode. This means that in a chord the accidentals are typeset as
2188 if the notes in the chord happen one at a time, in the order in
2189 which they appear in the input file. This is a problem when
2190 accidentals in a chord depend on each other, which does not happen
2191 for the default accidental style. The problem can be solved by
2192 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
2197 @unnumberedsubsubsec Ambitus
2200 @cindex range of pitches
2203 The term @notation{ambitus} (pl. ambitus) denotes a range of
2204 pitches for a given voice in a part of music. It may also denote
2205 the pitch range that a musical instrument is capable of playing.
2206 Ambitus are printed on vocal parts so that performers can easily
2207 determine if it matches their capabilities.
2209 Ambitus are denoted at the beginning of a piece near the initial
2210 clef. The range is graphically specified by two note heads that
2211 represent the lowest and highest pitches. Accidentals are only
2212 printed if they are not part of the key signature.
2214 @lilypond[verbatim,quote]
2218 \consists "Ambitus_engraver"
2231 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2232 {adding-ambitus-per-voice.ly}
2234 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2235 {ambitus-with-multiple-voices.ly}
2245 Internals Reference:
2246 @rinternals{Ambitus_engraver},
2249 @rinternals{Ambitus},
2250 @rinternals{AmbitusAccidental},
2251 @rinternals{AmbitusLine},
2252 @rinternals{AmbitusNoteHead},
2253 @rinternals{ambitus-interface}.
2258 There is no collision handling in the case of multiple per-voice
2263 @subsection Note heads
2265 This section suggests ways of altering note heads.
2268 * Special note heads::
2269 * Easy notation note heads::
2270 * Shape note heads::
2274 @node Special note heads
2275 @unnumberedsubsubsec Special note heads
2277 @cindex note heads, special
2278 @cindex note heads, cross
2279 @cindex note heads, diamond
2280 @cindex note heads, parlato
2281 @cindex note heads, harmonic
2282 @cindex note heads, guitar
2283 @cindex special note heads
2284 @cindex cross note heads
2285 @cindex diamond note heads
2286 @cindex parlato note heads
2287 @cindex harmonic note heads
2288 @cindex guitar note heads
2289 @cindex note head styles
2290 @cindex styles, note heads
2294 The appearance of note heads may be altered:
2296 @lilypond[verbatim,quote,relative=2]
2298 \override NoteHead #'style = #'cross
2300 \revert NoteHead #'style
2302 \override NoteHead #'style = #'harmonic
2304 \revert NoteHead #'style
2308 To see all note head styles, see @ref{Note head styles}.
2310 The @code{cross} style is used to represent a variety of musical
2311 intentions. The following generic predefined commands modify the
2312 note head in both staff and tablature contexts and can be used to
2313 represent any musical meaning:
2315 @lilypond[verbatim,quote,relative=2]
2323 The music function form of this predefined command may be used
2324 inside and outside chords to generate crossed note heads in both
2325 staff and tablature contexts:
2327 @lilypond[verbatim,quote,relative=2]
2330 c b < g \xNote c f > b
2333 There is also a shorthand for diamond shapes which can be used
2336 @lilypond[verbatim,quote,relative=2]
2337 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
2352 @ref{Note head styles},
2353 @ref{Chorded notes}.
2355 Internals Reference:
2356 @rinternals{note-event},
2357 @rinternals{Note_heads_engraver},
2358 @rinternals{Ledger_line_engraver},
2359 @rinternals{NoteHead},
2360 @rinternals{LedgerLineSpanner},
2361 @rinternals{note-head-interface},
2362 @rinternals{ledger-line-spanner-interface}.
2365 @node Easy notation note heads
2366 @unnumberedsubsubsec Easy notation note heads
2368 @cindex note heads, practice
2369 @cindex practice note heads
2370 @cindex note heads, easy notation
2371 @cindex easy notation
2373 @cindex beginners' music
2374 @cindex music, beginners'
2375 @cindex easy play note heads
2376 @cindex note heads, easy play
2378 @funindex \easyHeadsOn
2379 @funindex easyHeadsOn
2380 @funindex \easyHeadsOff
2381 @funindex easyHeadsOff
2383 The @q{easy play} note head includes a note name inside the head.
2384 It is used in music for beginners. To make the letters readable,
2385 it should be printed in a large font size. To print with a larger
2386 font, see @ref{Setting the staff size}.
2388 @lilypond[verbatim,quote]
2389 #(set-global-staff-size 26)
2401 @code{\easyHeadsOn},
2402 @code{\easyHeadsOff}.
2408 @ref{Setting the staff size}.
2413 Internals Reference:
2414 @rinternals{note-event},
2415 @rinternals{Note_heads_engraver},
2416 @rinternals{NoteHead},
2417 @rinternals{note-head-interface}.
2420 @node Shape note heads
2421 @unnumberedsubsubsec Shape note heads
2423 @cindex note heads, shape
2424 @cindex note heads, Aiken
2425 @cindex note heads, sacred harp
2427 @cindex Aiken shape note heads
2428 @cindex sacred harp note heads
2432 @funindex \aikenHeads
2433 @funindex aikenHeads
2434 @funindex \sacredHarpHeads
2435 @funindex sacredHarpHeads
2437 In shape note head notation, the shape of the note head
2438 corresponds to the harmonic function of a note in the scale. This
2439 notation was popular in nineteenth-century American song books.
2440 Shape note heads can be produced:
2442 @lilypond[verbatim,quote,relative=2]
2449 Shapes are typeset according to the step in the scale, where the
2450 base of the scale is determined by the @code{\key} command.
2455 @code{\sacredHarpHeads}.
2461 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2462 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
2464 To see all note head styles, see @ref{Note head styles}.
2472 @ref{Note head styles}.
2474 Internals Reference:
2475 @rinternals{note-event},
2476 @rinternals{Note_heads_engraver},
2477 @rinternals{NoteHead},
2478 @rinternals{note-head-interface}.
2482 @unnumberedsubsubsec Improvisation
2484 @cindex improvisation
2485 @cindex slashed note heads
2486 @cindex note heads, improvisation
2487 @cindex note heads, slashed
2489 @funindex \improvisationOn
2490 @funindex improvisationOn
2491 @funindex \improvisationOff
2492 @funindex improvisationOff
2494 Improvisation is sometimes denoted with slashed note heads, where
2495 the performer may choose any pitch but should play the specified
2496 rhythm. Such note heads can be created:
2498 @lilypond[verbatim,quote,relative=2]
2500 \consists "Pitch_squash_engraver"
2502 e8 e g a a16( bes) a8 g
2514 @code{\improvisationOn},
2515 @code{\improvisationOff}.
2523 Internals Reference:
2524 @rinternals{Pitch_squash_engraver},
2526 @rinternals{RhythmicStaff}.