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. For details, see the Contributors'
7 Guide, node Updating translation committishes..
16 @lilypondfile[quote]{pitches-headword.ly}
18 This section discusses how to specify the pitch of notes. There
19 are three steps to this process: input, modification, and output.
23 * Changing multiple pitches::
24 * Displaying pitches::
30 @subsection Writing pitches
32 This section discusses how to input pitches. There are two
33 different ways to place notes in octaves: absolute and relative
34 mode. In most cases, relative mode will be more convenient.
37 * Absolute octave entry::
38 * Relative octave entry::
40 * Note names in other languages::
44 @node Absolute octave entry
45 @unnumberedsubsubsec Absolute octave entry
50 @cindex absolute octave specification
51 @cindex octave specification, absolute
52 @cindex absolute octave entry
53 @cindex octave entry, absolute
55 A pitch name is specified using lowercase letters@tie{}@code{a}
56 through@tie{}@code{g}. The note names @code{c} to @code{b} are
57 engraved in the octave below middle C.
60 @lilypond[verbatim,quote]
69 @cindex octave changing mark
74 Other octaves may be specified with a single quote@tie{}(@code{'})
75 or comma@tie{}(@code{,}) character. Each@tie{}@code{'} raises the
76 pitch by one octave; each@tie{}@code{,} lowers the pitch by an
79 @lilypond[verbatim,quote]
92 Music can be marked explicitly as being in absolute octave
93 notation by preceding it with @code{\absolute}:
96 \absolute @var{musicexpr}
99 will be interpreted in absolute octave entry mode regardless of
100 the context it appears in.
110 @node Relative octave entry
111 @unnumberedsubsubsec Relative octave entry
114 @cindex relative octave entry
115 @cindex octave entry, relative
116 @cindex relative octave specification
117 @cindex octave specification, relative
122 Absolute octave entry requires specifying the octave for every
123 single note. Relative octave entry, in contrast, specifies each
124 octave in relation to the last note: changing one note's octave
125 will affect all of the following notes.
127 Relative note mode has to be entered explicitly using the
128 @code{\relative} command:
131 \relative @var{startpitch} @var{musicexpr}
134 In relative mode, each note is assumed to be as close to the
135 previous note as possible. This means that the octave of each
136 pitch inside @code{@var{musicexpr}} is calculated as follows:
140 If no octave changing mark is used on a pitch, its octave is
141 calculated so that the interval with the previous note is less
142 than a fifth. This interval is determined without considering
146 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be
147 added to respectively raise or lower a pitch by an extra octave,
148 relative to the pitch calculated without an octave mark.
151 Multiple octave changing marks can be used. For example,
152 @code{''}@tie{}and@tie{}@code{,,} will alter the pitch by two
156 The pitch of the first note is relative to
157 @code{@var{startpitch}}. @code{@var{startpitch}} is specified in
158 absolute octave mode. Which choices are meaningful?
161 @item an octave of @code{c}
162 Identifying middle C with @code{c'} is quite basic, so finding
163 octaves of @code{c} tends to be straightforward. If your music
164 starts with @code{gis} above @code{c'''}, you'd write something
165 like @code{\relative c''' @{ gis' @dots{} @}}
167 @item an octave of the first note inside
168 Writing @code{\relative gis''' @{ gis @dots{} @}} makes it easy to
169 determine the absolute pitch of the first note inside.
171 @item no explicit starting pitch
172 This (namely writing @code{\relative @{ gis''' @dots{} @}}) can be
173 viewed as a compact version of the previous option: the first note
174 inside is written in absolute pitch itself. This happens to be
175 equivalent to choosing @code{f} as the reference pitch.
178 The documentation will usually employ the first option.
181 Here is the relative mode shown in action:
183 @lilypond[verbatim,quote]
192 Octave changing marks are used for intervals greater than a
195 @lilypond[verbatim,quote]
202 A note sequence without a single octave mark can nevertheless span
205 @lilypond[verbatim,quote]
212 When @code{\relative} blocks are nested, the innermost
213 @code{\relative} block applies.
215 @lilypond[verbatim,quote]
224 @code{\relative} has no effect on @code{\chordmode} blocks.
226 @lilypond[verbatim,quote]
235 @code{\relative} is not allowed inside of @code{\chordmode} blocks.
237 Music inside a @code{\transpose} block is absolute unless a
238 @code{\relative} is included.
240 @lilypond[verbatim,quote]
253 @cindex chords and relative octave entry
254 @cindex relative octave entry and chords
256 If the preceding item is a chord, the first note of the chord is
257 used as the reference point for the octave placement of a
258 following note or chord. Inside chords, the next note is always
259 relative to the preceding one. Examine the next example
260 carefully, paying attention to the @code{c} notes.
262 @lilypond[verbatim,quote]
271 As explained above, the octave of pitches is calculated only with
272 the note names, regardless of any alterations. Therefore, an
273 E-double-sharp following a B will be placed higher, while an
274 F-double-flat will be placed lower. In other words, a
275 double-augmented fourth is considered a smaller interval than a
276 double-diminished fifth, regardless of the number of semitones
277 that each interval contains.
279 @lilypond[verbatim,quote]
288 One consequence of these rules is that the first note inside
289 @code{@w{\relative f}} music is interpreted just the same as
290 if it was written in absolute pitch mode.
305 @rinternals{RelativeOctaveMusic}.
307 @cindex relative octave entry and transposition
308 @cindex transposition and relative octave entry
319 @unnumberedsubsubsec Accidentals
322 @cindex key signature
325 @c duplicated in Key signature and Accidentals
326 @warning{New users are sometimes confused about accidentals and
327 key signatures. In LilyPond, note names are the raw input; key
328 signatures and clefs determine how this raw input is displayed.
329 An unaltered note like@tie{}@code{c} means @q{C natural},
330 regardless of the key signature or clef. For more information,
331 see @rlearning{Accidentals and key signatures}.}
333 @cindex note names, Dutch
334 @cindex note names, default
335 @cindex default note names
339 @cindex sharp, double
343 @cindex natural pitch
345 A @notation{sharp} pitch is made by adding @code{is} to the note
346 name, and a @notation{flat} pitch by adding @code{es}. As you
347 might expect, a @notation{double sharp} or @notation{double flat}
348 is made by adding @code{isis} or @code{eses}. This syntax is
349 derived from Dutch note naming conventions. To use other names
350 for accidentals, see @ref{Note names in other languages}.
352 @lilypond[verbatim,quote,relative=2]
356 A natural will cancel the effect of an accidental or key
357 signature. However, naturals are not encoded into the note name
358 syntax with a suffix; a natural pitch is shown as a simple note
361 @lilypond[verbatim,quote,relative=2]
365 @cindex quarter tones
369 Quarter tones may be added; the following is a series of Cs with
372 @lilypond[verbatim,quote,relative=2]
373 ceseh1 ces ceh c cih cis cisih
378 @cindex accidental, reminder
379 @cindex accidental, cautionary
380 @cindex accidental, parenthesized
381 @cindex reminder accidental
382 @cindex cautionary accidental
383 @cindex parenthesized accidental
389 Normally accidentals are printed automatically, but you may also
390 print them manually. A reminder accidental can be forced by
391 adding an exclamation mark@tie{}@code{!} after the pitch. A
392 cautionary accidental (i.e., an accidental within parentheses) can
393 be obtained by adding the question mark@tie{}@code{?} after the
394 pitch. These extra accidentals can also be used to produce
397 @lilypond[verbatim,quote,relative=2]
398 cis cis cis! cis? c c c! c?
401 @cindex accidental on tied note
402 @cindex tied note, accidental
404 Accidentals on tied notes are only printed at the beginning of a
407 @lilypond[verbatim,quote,relative=2,ragged-right]
416 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
417 {hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly}
419 @lilypondfile[verbatim,quote,texidoc,doctitle]
420 {preventing-extra-naturals-from-being-automatically-added.ly}
426 @rglos{double sharp},
429 @rglos{quarter tone}.
432 @rlearning{Accidentals and key signatures}.
435 @ref{Automatic accidentals},
436 @ref{Annotational accidentals (musica ficta)},
437 @ref{Note names in other languages}.
443 @rinternals{Accidental_engraver},
444 @rinternals{Accidental},
445 @rinternals{AccidentalCautionary},
446 @rinternals{accidental-interface}.
448 @cindex accidental, quarter-tone
449 @cindex quarter-tone accidental
452 There are no generally accepted standards for denoting
453 quarter-tone accidentals, so LilyPond's symbol does not conform to
457 @node Note names in other languages
458 @unnumberedsubsubsec Note names in other languages
460 @cindex note names, other languages
461 @cindex pitch names, other languages
462 @cindex language, note names in other
463 @cindex language, pitch names in other
465 There are predefined sets of note and accidental names for various
466 other languages. Selecting the note name language is usually done
467 at the beginning of the file; the following example is written
468 using Italian note names:
470 @lilypond[quote,verbatim]
478 The available languages and the note names they define are:
481 @multitable {@code{nederlands}} {do re mi fa sol la sib si}
484 @item @code{nederlands}
485 @tab c d e f g a bes b
487 @tab do re mi fa sol la sib si
491 @tab c d e f g a bf b
492 @item @code{espanol} or @code{español}
493 @tab do re mi fa sol la sib si
494 @item @code{italiano} or @code{français}
495 @tab do re mi fa sol la sib si
498 @item @code{portugues}
499 @tab do re mi fa sol la sib si
505 @tab do re mi fa sol la sib si
509 In addition to note names, accidental suffixes may
510 also vary depending on the language:
513 @multitable {@code{nederlands}} {-s/-sharp} {-ess/-es} {-ss/-x/-sharpsharp} {-essess/-eses}
515 @tab sharp @tab flat @tab double sharp @tab double flat
516 @item @code{nederlands}
517 @tab -is @tab -es @tab -isis @tab -eses
519 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
521 @tab -is @tab -es @tab -isis @tab -eses
523 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
525 @item @code{espanol} or @code{español}
526 @tab -s @tab -b @tab -ss/-x @tab -bb
527 @item @code{italiano} or @code{français}
528 @tab -d @tab -b @tab -dd @tab -bb
530 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
532 @item @code{portugues}
533 @tab -s @tab -b @tab -ss @tab -bb
535 @tab -is @tab -es @tab -isis @tab -eses
537 @tab -iss @tab -ess @tab -ississ @tab -essess
539 @tab -k @tab -b @tab -kk @tab -bb
543 In Dutch, @code{aes} is contracted to @code{as}, but both forms
544 are accepted in LilyPond. Similarly, both @code{es} and
545 @code{ees} are accepted. This also applies to
546 @code{aeses}@tie{}/@tie{}@code{ases} and
547 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
548 contracted names are defined in the corresponding language files.
550 @lilypond[verbatim,quote,relative=2]
551 a2 as e es a ases e eses
561 Some music uses microtones whose alterations are fractions of a
562 @q{normal} sharp or flat. The following table lists note names
563 for quarter-tone accidentals in various languages; here the prefixes
564 @notation{semi-} and @notation{sesqui-} respectively
565 mean @q{half} and @q{one and a half}. Languages that do not
566 appear in this table do not provide special note names yet.
569 @multitable {@code{nederlands}} {@b{semi-sharp}} {@b{semi-flat}} {@b{sesqui-sharp}} {@b{sesqui-flat}}
571 @tab semi-sharp @tab semi-flat @tab sesqui-sharp @tab sesqui-flat
573 @item @code{nederlands}
574 @tab -ih @tab -eh @tab -isih @tab -eseh
576 @tab -ih @tab -eh @tab -isih @tab -eseh
578 @tab -qs @tab -qf @tab -tqs @tab -tqf
579 @item @code{espanol} or @code{español}
580 @tab -cs @tab -cb @tab -tcs @tab -tcb
581 @item @code{italiano} or @code{français}
582 @tab -sd @tab -sb @tab -dsd @tab -bsb
583 @item @code{portugues}
584 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
588 Most languages presented here are commonly associated with
589 Western classical music, also referred to as
590 @notation{Common Practice Period}. However, alternate
591 pitches and tuning systems are also supported: see
592 @ref{Common notation for non-Western music}.
597 @rglos{Common Practice Period}.
600 @ref{Common notation for non-Western music}.
603 @file{scm/define-note-names.scm}.
609 @node Changing multiple pitches
610 @subsection Changing multiple pitches
612 This section discusses how to modify pitches.
619 * Modal transformations::
623 @unnumberedsubsubsec Octave checks
625 @cindex octave correction
627 @cindex control pitch
630 @funindex \octaveCheck
631 @funindex octaveCheck
632 @funindex controlpitch
634 In relative mode, it is easy to forget an octave changing mark.
635 Octave checks make such errors easier to find by displaying a
636 warning and correcting the octave if a note is found in an
639 To check the octave of a note, specify the absolute octave after
640 the @code{=}@tie{}symbol. This example will generate a warning
641 (and change the pitch) because the second note is the absolute
642 octave @code{d''} instead of @code{d'} as indicated by the octave
645 @lilypond[verbatim,quote]
652 The octave of notes may also be checked with the
653 @code{\octaveCheck@tie{}@var{controlpitch}} command.
654 @code{@var{controlpitch}} is specified in absolute mode. This
655 checks that the interval between the previous note and the
656 @code{@var{controlpitch}} is within a fourth (i.e., the normal
657 calculation of relative mode). If this check fails, a warning is
658 printed, but the previous note is not changed. Future notes are
659 relative to the @code{@var{controlpitch}}.
661 @lilypond[verbatim,quote]
669 Compare the two bars below. The first and third @code{\octaveCheck}
670 checks fail, but the second one does not fail.
672 @lilypond[verbatim,quote]
691 @rinternals{RelativeOctaveCheck}.
695 @unnumberedsubsubsec Transpose
699 @cindex transposition
700 @cindex transposition of pitches
701 @cindex transposition of notes
702 @cindex pitches, transposition of
703 @cindex notes, transposition of
708 A music expression can be transposed with @code{\transpose}. The
712 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
716 This means that @code{@var{musicexpr}} is transposed by the
717 interval between the pitches @code{@var{frompitch}} and
718 @code{@var{topitch}}: any note with pitch @code{@var{frompitch}}
719 is changed to @code{@var{topitch}} and any other note is
720 transposed by the same interval. Both pitches are entered in
723 @warning{Music inside a @code{@bs{}transpose} block is absolute
724 unless a @code{@bs{}relative} is included in the block.}
726 Consider a piece written in the key of D-major. It can be
727 transposed up to E-major; note that the key signature is
728 automatically transposed as well.
730 @lilypond[verbatim,quote]
739 @cindex transposing instruments
740 @cindex instruments, transposing
742 If a part written in C (normal @notation{concert pitch}) is to be
743 played on the A clarinet (for which an A is notated as a C and
744 thus sounds a minor third lower than notated), the appropriate
745 part will be produced with:
747 @lilypond[verbatim,quote]
757 Note that we specify @w{@code{\key c \major}} explicitly. If we
758 do not specify a key signature, the notes will be transposed but
759 no key signature will be printed.
761 @code{\transpose} distinguishes between enharmonic pitches: both
762 @w{@code{\transpose c cis}} or @w{@code{\transpose c des}} will
763 transpose up a semitone. The first version will print sharps and
764 the notes will remain on the same scale step, the second version
765 will print flats on the scale step above.
767 @lilypond[verbatim,quote]
768 music = \relative c' { c d e f }
770 \transpose c cis { \music }
771 \transpose c des { \music }
776 @code{\transpose} may also be used in a different way, to input
777 written notes for a transposing instrument. The previous examples
778 show how to enter pitches in C (or @notation{concert pitch}) and
779 typeset them for a transposing instrument, but the opposite is
780 also possible if you for example have a set of instrumental parts
781 and want to print a conductor's score. For example, when entering
782 music for a B-flat trumpet that begins on a notated E (concert D),
786 musicInBflat = @{ e4 @dots{} @}
787 \transpose c bes, \musicInBflat
791 To print this music in F (e.g., rearranging to a French horn) you
792 could wrap the existing music with another @code{\transpose}:
795 musicInBflat = @{ e4 @dots{} @}
796 \transpose f c' @{ \transpose c bes, \musicInBflat @}
800 For more information about transposing instruments,
801 see @ref{Instrument transpositions}.
806 @lilypondfile[verbatim,quote,texidoc,doctitle]
807 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
811 @ref{Instrument transpositions},
813 @ref{Modal transformations},
814 @ref{Relative octave entry},
821 @rinternals{TransposedMusic}.
831 The relative conversion will not affect @code{\transpose},
832 @code{\chordmode} or @code{\relative} sections in its argument. To use
833 relative mode within transposed music, an additional @code{\relative}
834 must be placed inside @code{\transpose}.
836 Triple accidentals will not be printed if using @code{\transpose}. An
837 @q{enharmonically equivalent} pitch will be used instead (e.g. d-flat
838 rather than e-triple-flat).
842 @unnumberedsubsubsec Inversion
845 @cindex operation, inversion
848 A music expression can be inverted and transposed in a single
852 \inversion @var{around-pitch} @var{to-pitch} @var{musicexpr}
855 The @code{@var{musicexpr}} is inverted interval-by-interval around
856 @code{@var{around-pitch}}, and then transposed so that
857 @code{@var{around-pitch}} is mapped to @code{@var{to-pitch}}.
859 @lilypond[verbatim,quote]
860 music = \relative c' { c d e f }
863 \inversion d' d' \music
864 \inversion d' ees' \music
868 @warning{Motifs to be inverted should be expressed in absolute form
869 or be first converted to absolute form by enclosing them in a
870 @code{\relative} block.}
874 @ref{Modal transformations},
880 @unnumberedsubsubsec Retrograde
882 @cindex retrograde transformation
883 @cindex transformation, retrograde
884 @cindex operation, retrograde
885 @funindex \retrograde
888 A music expression can be reversed to produce its retrograde:
890 @lilypond[verbatim,quote]
891 music = \relative c' { c8. ees16( fis8. a16 b8.) gis16 f8. d16 }
900 Manual ties inside @code{\retrograde} will be broken and
901 generate warnings. Some ties can be generated automatically
902 by enabling @ref{Automatic note splitting}.
907 @ref{Modal transformations},
911 @node Modal transformations
912 @unnumberedsubsubsec Modal transformations
914 @cindex modal transformations
915 @cindex transformations, modal
916 @cindex operations, modal
918 In a musical composition that is based on a scale, a motif is
919 frequently transformed in various ways. It may be
920 @notation{transposed} to start at different places in the scale or
921 it may be @notation{inverted} around a pivot point in the scale.
922 It may also be reversed to produce its @notation{retrograde}, see
925 @warning{Any note that does not lie within the given scale will be
928 @subsubsubheading Modal transposition
930 @cindex modal transposition
931 @cindex transposition, modal
932 @cindex operation, transposition
933 @funindex \modalTranspose
934 @funindex modalTranspose
936 A motif can be transposed within a given scale with:
939 \modalTranspose @var{from-pitch} @var{to-pitch} @var{scale} @var{motif}
942 The notes of @var{motif} are shifted within the @var{scale} by the
943 number of scale degrees given by the interval between @var{to-pitch}
944 and @var{from-pitch}:
946 @lilypond[verbatim,quote]
947 diatonicScale = \relative c' { c d e f g a b }
948 motif = \relative c' { c8 d e f g a b c }
952 \modalTranspose c f \diatonicScale \motif
953 \modalTranspose c b, \diatonicScale \motif
957 An ascending scale of any length and with any intervals may be
960 @lilypond[verbatim,quote]
961 pentatonicScale = \relative c' { ges aes bes des ees }
962 motif = \relative c' { ees8 des ges,4 <ges' bes,> <ges bes,> }
966 \modalTranspose ges ees' \pentatonicScale \motif
970 When used with a chromatic scale @code{\modalTranspose} has a
971 similar effect to @code{\transpose}, but with the ability to
972 specify the names of the notes to be used:
974 @lilypond[verbatim,quote]
975 chromaticScale = \relative c' { c cis d dis e f fis g gis a ais b }
976 motif = \relative c' { c8 d e f g a b c }
980 \transpose c f \motif
981 \modalTranspose c f \chromaticScale \motif
985 @subsubsubheading Modal inversion
987 @cindex modal inversion
988 @cindex inversion, modal
989 @cindex operation, modal inversion
990 @funindex \modalInversion
991 @funindex modalInversion
993 A motif can be inverted within a given scale around a given pivot
994 note and transposed in a single operation with:
997 \modalInversion @var{around-pitch} @var{to-pitch} @var{scale} @var{motif}
1000 The notes of @var{motif} are placed the same number of scale degrees
1001 from the @var{around-pitch} note within the @var{scale}, but in the
1002 opposite direction, and the result is then shifted within the
1003 @var{scale} by the number of scale degrees given by the interval between
1004 @var{to-pitch} and @var{around-pitch}.
1006 So to simply invert around a note in the scale use the same value for
1007 @var{around-pitch} and @var{to-pitch}:
1009 @lilypond[verbatim,quote]
1010 octatonicScale = \relative c' { ees f fis gis a b c d }
1011 motif = \relative c' { c8. ees16 fis8. a16 b8. gis16 f8. d16 }
1015 \modalInversion fis' fis' \octatonicScale \motif
1019 To invert around a pivot between two notes in the scale, invert around
1020 one of the notes and then transpose by one scale degree. The two notes
1021 specified can be interpreted as bracketing the pivot point:
1023 @lilypond[verbatim,quote]
1024 scale = \relative c' { c g' }
1025 motive = \relative c' { c c g' c, }
1029 \modalInversion c' g' \scale \motive
1033 The combined operation of inversion and retrograde produce the
1034 retrograde-inversion:
1036 @lilypond[verbatim,quote]
1037 octatonicScale = \relative c' { ees f fis gis a b c d }
1038 motif = \relative c' { c8. ees16 fis8. a16 b8. gis16 f8. d16 }
1042 \retrograde \modalInversion c' c' \octatonicScale \motif
1053 @node Displaying pitches
1054 @subsection Displaying pitches
1056 This section discusses how to alter the output of pitches.
1062 * Instrument transpositions::
1063 * Automatic accidentals::
1069 @unnumberedsubsubsec Clef
1080 @cindex soprano clef
1081 @cindex mezzosoprano clef
1082 @cindex baritone clef
1083 @cindex varbaritone clef
1084 @cindex subbass clef
1086 @cindex ancient clef
1087 @cindex clef, ancient
1091 @cindex clef, treble
1092 @cindex clef, violin
1096 @cindex clef, french
1097 @cindex clef, soprano
1098 @cindex clef, mezzosoprano
1099 @cindex clef, baritone
1100 @cindex clef, varbaritone
1101 @cindex clef, subbass
1107 Without any explicit command, the default clef for LilyPond is the
1108 treble (or @emph{G}) clef.
1110 @lilypond[verbatim,quote,relative=1,ragged-right]
1114 However, the clef can be changed by using the @code{\clef} command and
1115 an appropriate clef name. @emph{Middle C} is shown in each of the
1118 @lilypond[verbatim,quote,relative=1]
1129 For the full range of possible clef names see @ref{Clef styles}.
1131 Specialized clefs, such as those used in @emph{Ancient} music, are
1132 described in @ref{Mensural clefs} and @ref{Gregorian clefs}. Music that
1133 requires tablature clefs is discussed in @ref{Default tablatures} and
1134 @ref{Custom tablatures}.
1137 @cindex Clefs with cue notes
1138 For mixing clefs when using cue notes, see the @code{\cueClef} and
1139 @code{\cueDuringWithClef} commands in @ref{Formatting cue notes}.
1141 @cindex transposing clef
1142 @cindex clef, transposing
1143 @cindex octave transposition
1144 @cindex optional octave transposition
1145 @cindex octave transposition, optional
1146 @cindex choral tenor clef
1147 @cindex tenor clef, choral
1149 By adding@tie{}@code{_8} or@tie{}@code{^8} to the clef name, the
1150 clef is transposed one octave down or up respectively,
1151 and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves.
1152 Other integers can be used if required. Clef names containing
1153 non-alphabetic characters must be enclosed in quotes
1155 @lilypond[verbatim,quote,relative=1]
1170 Optional octavation can be obtained by enclosing the numeric
1171 argument in parentheses or brackets:
1173 @lilypond[verbatim,quote,relative=1]
1180 The pitches are displayed as if the numeric argument were
1181 given without parentheses/brackets.
1184 @lilypondfile[verbatim,quote,texidoc,doctitle]
1185 {forcing-a-clef-symbol-to-be-displayed.ly}
1187 @lilypondfile[verbatim,quote,texidoc,doctitle]
1188 {keep-change-clefs-full-sized.ly}
1190 @lilypondfile[verbatim,quote,texidoc,doctitle]
1191 {tweaking-clef-properties.ly}
1195 @ref{Mensural clefs},
1196 @ref{Gregorian clefs},
1197 @ref{Default tablatures},
1198 @ref{Custom tablatures},
1199 @ref{Formatting cue notes}.
1202 @file{../scm/parser-clef.scm}.
1207 Internals Reference:
1208 @rinternals{Clef_engraver},
1210 @rinternals{ClefModifier},
1211 @rinternals{clef-interface}.
1214 Ottavation numbers attached to clefs are treated as separate grobs. So
1215 any @code{\override} done to the @var{Clef} will also need to be
1216 applied, as a separate @code{\override}, to the @var{ClefModifier}
1219 @lilypond[fragment,quote,verbatim,relative=1]
1221 \override Clef.color = #blue
1222 \override ClefModifier.color = #red
1230 @unnumberedsubsubsec Key signature
1232 @cindex key signature
1237 @c duplicated in Key signature and Accidentals
1238 @warning{New users are sometimes confused about accidentals and
1239 key signatures. In LilyPond, note names are the raw input; key
1240 signatures and clefs determine how this raw input is displayed.
1241 An unaltered note like@tie{}@code{c} means @q{C natural},
1242 regardless of the key signature or clef. For more information,
1243 see @rlearning{Accidentals and key signatures}.}
1245 The key signature indicates the tonality in which a piece is
1246 played. It is denoted by a set of alterations (flats or sharps)
1247 at the start of the staff. The key signature may be altered:
1250 \key @var{pitch} @var{mode}
1263 @funindex \mixolydian
1264 @funindex mixolydian
1272 @cindex church modes
1285 Here, @code{@var{mode}} should be @code{\major} or @code{\minor}
1286 to get a key signature of @code{@var{pitch}}-major or
1287 @code{@var{pitch}}-minor, respectively. You may also use the
1288 standard mode names, also called @notation{church modes}:
1289 @code{\ionian}, @code{\dorian}, @code{\phrygian}, @code{\lydian},
1290 @code{\mixolydian}, @code{\aeolian}, and @code{\locrian}.
1292 @lilypond[verbatim,quote,relative=2]
1299 Additional modes can be defined, by listing the alterations
1300 for each scale step when the mode starts on C.
1302 @lilypond[verbatim,quote]
1303 freygish = #`((0 . ,NATURAL) (1 . ,FLAT) (2 . ,NATURAL)
1304 (3 . ,NATURAL) (4 . ,NATURAL) (5 . ,FLAT) (6 . ,FLAT))
1307 \key c \freygish c4 des e f
1308 \bar "||" \key d \freygish d es fis g
1312 Accidentals in the key signature may be printed in octaves other
1313 than their traditional positions, or in multiple octaves, by
1314 using the @code{flat-positions} and @code{sharp-positions}
1315 properties of @code{KeySignature}. Entries in these properties
1316 specify the range of staff-positions where accidentals will be
1317 printed. If a single position is specified in an entry, the
1318 accidentals are placed within the octave ending at that staff
1321 @lilypond[verbatim, quote,relative=0]
1322 \override Staff.KeySignature.flat-positions = #'((-5 . 5))
1323 \override Staff.KeyCancellation.flat-positions = #'((-5 . 5))
1324 \clef bass \key es \major es g bes d
1325 \clef treble \bar "||" \key es \major es g bes d
1327 \override Staff.KeySignature.sharp-positions = #'(2)
1328 \bar "||" \key b \major b fis b2
1333 @lilypondfile[verbatim,quote,texidoc,doctitle]
1334 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
1336 @lilypondfile[verbatim,quote,texidoc,doctitle]
1337 {non-traditional-key-signatures.ly}
1341 @rglos{church mode},
1345 @rlearning{Accidentals and key signatures}.
1350 Internals Reference:
1351 @rinternals{KeyChangeEvent},
1352 @rinternals{Key_engraver},
1353 @rinternals{Key_performer},
1354 @rinternals{KeyCancellation},
1355 @rinternals{KeySignature},
1356 @rinternals{key-signature-interface}.
1359 @node Ottava brackets
1360 @unnumberedsubsubsec Ottava brackets
1368 @funindex set-octavation
1372 @notation{Ottava brackets} introduce an extra transposition of an
1373 octave for the staff:
1375 @lilypond[verbatim,quote,relative=2]
1391 @lilypondfile[verbatim,quote,texidoc,doctitle]
1394 @lilypondfile[verbatim,quote,texidoc,doctitle]
1395 {adding-an-ottava-marking-to-a-single-voice.ly}
1404 Internals Reference:
1405 @rinternals{Ottava_spanner_engraver},
1406 @rinternals{OttavaBracket},
1407 @rinternals{ottava-bracket-interface}.
1410 @node Instrument transpositions
1411 @unnumberedsubsubsec Instrument transpositions
1413 @cindex transposition, MIDI
1414 @cindex transposition, instrument
1415 @cindex transposing instrument
1417 @cindex MIDI transposition
1419 @funindex \transposition
1420 @funindex transposition
1422 When typesetting scores that involve transposing instruments, some
1423 parts can be typeset in a different pitch than the
1424 @notation{concert pitch}. In these cases, the key of the
1425 @notation{transposing instrument} should be specified; otherwise
1426 the MIDI output and cues in other parts will produce incorrect
1427 pitches. For more information about quotations, see
1428 @ref{Quoting other voices}.
1431 \transposition @var{pitch}
1434 The pitch to use for @code{\transposition} should correspond to
1435 the real sound heard when a@tie{}@code{c'} written on the staff is
1436 played by the transposing instrument. This pitch is entered in
1437 absolute mode, so an instrument that produces a real sound which
1438 is one tone higher than the printed music should use
1439 @w{@code{\transposition d'}}. @code{\transposition} should
1440 @emph{only} be used if the pitches are @emph{not} being entered in
1443 Here are a few notes for violin and B-flat clarinet where the
1444 parts have been entered using the notes and key as they appear in
1445 each part of the conductor's score. The two instruments are
1448 @lilypond[verbatim,quote]
1450 \new Staff = "violin" {
1452 \set Staff.instrumentName = #"Vln"
1453 \set Staff.midiInstrument = #"violin"
1454 % not strictly necessary, but a good reminder
1461 \new Staff = "clarinet" {
1463 \set Staff.instrumentName = \markup { Cl (B\flat) }
1464 \set Staff.midiInstrument = #"clarinet"
1474 The @code{\transposition} may be changed during a piece. For
1475 example, a clarinetist may be required to switch from an A clarinet
1476 to a B-flat clarinet.
1478 @lilypond[verbatim,quote]
1479 flute = \relative c'' {
1481 \cueDuring #"clarinet" #DOWN {
1482 R1 _\markup\tiny "clarinet"
1484 R1 _\markup\tiny "clarinet"
1487 clarinet = \relative c'' {
1491 R1^\markup { muta in B\flat }
1496 \addQuote "clarinet" \clarinet
1498 \new Staff \with { instrumentName = #"Flute" }
1500 \new Staff \with { instrumentName = #"Cl (A)" }
1507 @rglos{concert pitch},
1508 @rglos{transposing instrument}.
1511 @ref{Quoting other voices},
1518 @node Automatic accidentals
1519 @unnumberedsubsubsec Automatic accidentals
1521 @cindex accidental style
1522 @cindex accidental style, default
1524 @cindex accidentals, automatic
1525 @cindex automatic accidentals
1526 @cindex default accidental style
1528 @funindex \accidentalStyle
1532 There are many different conventions on how to typeset
1533 accidentals. LilyPond provides a function to specify which
1534 accidental style to use. This function is called as follows:
1538 \accidentalStyle voice
1543 The accidental style applies to the current @code{Staff} by
1544 default (with the exception of the styles @code{piano} and
1545 @code{piano-cautionary}, which are explained below). Optionally,
1546 the function can take a second argument that determines in which
1547 scope the style should be changed. For example, to use the same
1548 style in all staves of the current @code{StaffGroup}, use:
1551 \accidentalStyle StaffGroup.voice
1554 The following accidental styles are supported. To demonstrate
1555 each style, we use the following example:
1558 @lilypond[verbatim,quote]
1562 cis'8 fis, bes4 <a cis>8 f bis4 |
1576 \voiceTwo \relative c' {
1577 <fis, a cis>8[ <fis a cis>
1580 \change Staff = down
1585 \change Staff = down
1586 <fis, a cis>4 gis <f a d>2 |
1593 \context Staff = "up" {
1594 \accidentalStyle default
1597 \context Staff = "down" {
1598 \accidentalStyle default
1605 Note that the last lines of this example can be replaced by the
1606 following, as long as the same accidental style should be used in
1612 \context Staff = "up" @{
1613 %%% change the next line as desired:
1614 \accidentalStyle Score.default
1617 \context Staff = "down" @{
1625 @c don't use verbatim in this table.
1629 @cindex default accidental style
1630 @cindex accidental style, default
1634 This is the default typesetting behavior. It corresponds to
1635 eighteenth-century common practice: accidentals are remembered to
1636 the end of the measure in which they occur and only in their own
1637 octave. Thus, in the example below, no natural signs are printed
1638 before the@tie{}@code{b} in the second measure or the
1645 cis'8 fis, bes4 <a cis>8 f bis4 |
1659 \voiceTwo \relative c' {
1660 <fis, a cis>8[ <fis a cis>
1663 \change Staff = down
1668 \change Staff = down
1669 <fis, a cis>4 gis <f a d>2 |
1676 \context Staff = "up" {
1677 \accidentalStyle default
1680 \context Staff = "down" {
1681 \accidentalStyle default
1690 @cindex accidental style, voice
1691 @cindex voice accidental style
1692 @cindex accidental style, modern
1693 @cindex modern accidental style
1694 @cindex accidental style, modern-cautionary
1695 @cindex modern-cautionary accidental style
1699 The normal behavior is to remember the accidentals at
1700 @code{Staff}-level. In this style, however, accidentals are
1701 typeset individually for each voice. Apart from that, the rule is
1702 similar to @code{default}.
1704 As a result, accidentals from one voice do not get canceled in
1705 other voices, which is often an unwanted result: in the following
1706 example, it is hard to determine whether the second@tie{}@code{a}
1707 should be played natural or sharp. The @code{voice} option should
1708 therefore be used only if the voices are to be read solely by
1709 individual musicians. If the staff is to be used by one musician
1710 (e.g., a conductor or in a piano score) then @code{modern} or
1711 @code{modern-cautionary} should be used instead.
1718 cis'8 fis, bes4 <a cis>8 f bis4 |
1732 \voiceTwo \relative c' {
1733 <fis, a cis>8[ <fis a cis>
1736 \change Staff = down
1741 \change Staff = down
1742 <fis, a cis>4 gis <f a d>2 |
1749 \context Staff = "up" {
1750 \accidentalStyle voice
1753 \context Staff = "down" {
1754 \accidentalStyle voice
1763 @cindex accidentals, modern style
1764 @cindex modern style accidentals
1768 This rule corresponds to the common practice in the twentieth
1769 century. It omits some extra natural signs, which were
1770 traditionally prefixed to a sharp following a double sharp,
1771 or a flat following a double flat. The @code{modern} rule
1772 prints the same accidentals as @code{default}, with
1773 two additions that serve to avoid ambiguity: after temporary
1774 accidentals, cancellation marks are printed also in the following
1775 measure (for notes in the same octave) and, in the same measure,
1776 for notes in other octaves. Hence the naturals before
1777 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1784 cis'8 fis, bes4 <a cis>8 f bis4 |
1798 \voiceTwo \relative c' {
1799 <fis, a cis>8[ <fis a cis>
1802 \change Staff = down
1807 \change Staff = down
1808 <fis, a cis>4 gis <f a d>2 |
1815 \context Staff = "up" {
1816 \accidentalStyle modern
1819 \context Staff = "down" {
1820 \accidentalStyle modern
1827 @item modern-cautionary
1829 @cindex accidentals, modern cautionary style
1830 @cindex modern accidental style
1831 @cindex modern cautionary accidental style
1832 @cindex modern style accidentals
1833 @cindex modern style cautionary accidentals
1835 @funindex modern-cautionary
1837 This rule is similar to @code{modern}, but the @q{extra}
1838 accidentals (the ones not typeset by @code{default}) are typeset
1839 as cautionary accidentals. They are by default printed with
1840 parentheses, but they can also be printed in reduced size by
1841 defining the @code{cautionary-style} property of
1842 @code{AccidentalSuggestion}.
1848 cis'8 fis, bes4 <a cis>8 f bis4 |
1862 \voiceTwo \relative c' {
1863 <fis, a cis>8[ <fis a cis>
1866 \change Staff = down
1871 \change Staff = down
1872 <fis, a cis>4 gis <f a d>2 |
1879 \context Staff = "up" {
1880 \accidentalStyle modern-cautionary
1883 \context Staff = "down" {
1884 \accidentalStyle modern-cautionary
1893 @cindex accidental style, modern
1894 @cindex accidentals, modern
1895 @cindex accidentals, multivoice
1896 @cindex modern accidental style
1897 @cindex modern accidentals
1898 @cindex multivoice accidentals
1900 @funindex modern-voice
1902 This rule is used for multivoice accidentals to be read both by
1903 musicians playing one voice and musicians playing all voices.
1904 Accidentals are typeset for each voice, but they @emph{are}
1905 canceled across voices in the same @code{Staff}. Hence,
1906 the@tie{}@code{a} in the last measure is canceled because the
1907 previous cancellation was in a different voice, and
1908 the@tie{}@code{d} in the lower staff is canceled because of the
1909 accidental in a different voice in the previous measure:
1915 cis'8 fis, bes4 <a cis>8 f bis4 |
1929 \voiceTwo \relative c' {
1930 <fis, a cis>8[ <fis a cis>
1933 \change Staff = down
1938 \change Staff = down
1939 <fis, a cis>4 gis <f a d>2 |
1946 \context Staff = "up" {
1947 \accidentalStyle modern-voice
1950 \context Staff = "down" {
1951 \accidentalStyle modern-voice
1958 @cindex accidental style, cautionary, modern voice
1959 @cindex accidental style, modern voice cautionary
1960 @cindex accidental style, voice, modern cautionary
1962 @funindex modern-voice-cautionary
1964 @item modern-voice-cautionary
1966 This rule is the same as @code{modern-voice}, but with the extra
1967 accidentals (the ones not typeset by @code{voice}) typeset as
1968 cautionaries. Even though all accidentals typeset by
1969 @code{default} @emph{are} typeset with this rule, some of them are
1970 typeset as cautionaries.
1976 cis'8 fis, bes4 <a cis>8 f bis4 |
1990 \voiceTwo \relative c' {
1991 <fis, a cis>8[ <fis a cis>
1994 \change Staff = down
1999 \change Staff = down
2000 <fis, a cis>4 gis <f a d>2 |
2007 \context Staff = "up" {
2008 \accidentalStyle modern-voice-cautionary
2011 \context Staff = "down" {
2012 \accidentalStyle modern-voice-cautionary
2021 @cindex accidental style, piano
2022 @cindex accidentals, piano
2023 @cindex piano accidental style
2024 @cindex piano accidentals
2028 This rule reflects twentieth-century practice for piano notation.
2029 Its behavior is very similar to @code{modern} style, but here
2030 accidentals also get canceled across the staves in the same
2031 @code{GrandStaff} or @code{PianoStaff}, hence all the
2032 cancellations of the final notes.
2034 This accidental style applies to the current @code{GrandStaff} or
2035 @code{PianoStaff} by default.
2041 cis'8 fis, bes4 <a cis>8 f bis4 |
2055 \voiceTwo \relative c' {
2056 <fis, a cis>8[ <fis a cis>
2059 \change Staff = down
2064 \change Staff = down
2065 <fis, a cis>4 gis <f a d>2 |
2072 \context Staff = "up" {
2073 \accidentalStyle piano
2076 \context Staff = "down" {
2083 @item piano-cautionary
2085 @cindex accidentals, piano cautionary
2086 @cindex cautionary accidentals, piano
2087 @cindex piano cautionary accidentals
2088 @cindex accidental style, piano cautionary
2089 @cindex cautionary accidental style, piano
2090 @cindex piano cautionary accidental style
2092 @funindex piano-cautionary
2094 This is the same as @code{piano} but with the extra accidentals
2095 typeset as cautionaries.
2101 cis'8 fis, bes4 <a cis>8 f bis4 |
2115 \voiceTwo \relative c' {
2116 <fis, a cis>8[ <fis a cis>
2119 \change Staff = down
2124 \change Staff = down
2125 <fis, a cis>4 gis <f a d>2 |
2132 \context Staff = "up" {
2133 \accidentalStyle piano-cautionary
2136 \context Staff = "down" {
2146 @cindex neo-modern accidental style
2147 @cindex accidental style, neo-modern
2149 @funindex neo-modern
2151 This rule reproduces a common practice in contemporary music:
2152 accidentals are printed like with @code{modern}, but they are printed
2153 again if the same note appears later in the same measure -- except
2154 if the note is immediately repeated.
2160 cis'8 fis, bes4 <a cis>8 f bis4 |
2174 \voiceTwo \relative c' {
2175 <fis, a cis>8[ <fis a cis>
2178 \change Staff = down
2183 \change Staff = down
2184 <fis, a cis>4 gis <f a d>2 |
2191 \context Staff = "up" {
2192 \accidentalStyle neo-modern
2195 \context Staff = "down" {
2196 \accidentalStyle neo-modern
2203 @item neo-modern-cautionary
2205 @cindex neo-modern-cautionary accidental style
2206 @cindex accidental style, neo-modern-cautionary
2208 @funindex neo-modern-cautionary
2210 This rule is similar to @code{neo-modern}, but the extra
2211 accidentals are printed as cautionary accidentals.
2217 cis'8 fis, bes4 <a cis>8 f bis4 |
2231 \voiceTwo \relative c' {
2232 <fis, a cis>8[ <fis a cis>
2235 \change Staff = down
2240 \change Staff = down
2241 <fis, a cis>4 gis <f a d>2 |
2248 \context Staff = "up" {
2249 \accidentalStyle neo-modern-cautionary
2252 \context Staff = "down" {
2253 \accidentalStyle neo-modern-cautionary
2261 @item neo-modern-voice
2263 @cindex neo-modern-voice accidental style
2264 @cindex accidental style, neo-modern-voice
2266 @funindex neo-modern-voice
2268 This rule is used for multivoice accidentals to be read both by
2269 musicians playing one voice and musicians playing all voices.
2270 Accidentals are typeset for each voice as with @code{neo-modern},
2271 but they are canceled across voices in the same @code{Staff}.
2277 cis'8 fis, bes4 <a cis>8 f bis4 |
2291 \voiceTwo \relative c' {
2292 <fis, a cis>8[ <fis a cis>
2295 \change Staff = down
2300 \change Staff = down
2301 <fis, a cis>4 gis <f a d>2 |
2308 \context Staff = "up" {
2309 \accidentalStyle neo-modern-voice
2312 \context Staff = "down" {
2313 \accidentalStyle neo-modern-voice
2320 @item neo-modern-voice-cautionary
2322 @cindex neo-modern-voice-cautionary accidental style
2323 @cindex accidental style, neo-modern-voice-cautionary
2325 @funindex neo-modern-voice-cautionary
2327 This rule is similar to @code{neo-modern-voice}, but the extra
2328 accidentals are printed as cautionary accidentals.
2334 cis'8 fis, bes4 <a cis>8 f bis4 |
2348 \voiceTwo \relative c' {
2349 <fis, a cis>8[ <fis a cis>
2352 \change Staff = down
2357 \change Staff = down
2358 <fis, a cis>4 gis <f a d>2 |
2365 \context Staff = "up" {
2366 \accidentalStyle neo-modern-voice-cautionary
2369 \context Staff = "down" {
2370 \accidentalStyle neo-modern-voice-cautionary
2379 @cindex dodecaphonic accidental style
2380 @cindex dodecaphonic style, neo-modern
2382 @funindex dodecaphonic
2384 This rule reflects a practice introduced by composers at
2385 the beginning of the 20th century, in an attempt to
2386 abolish the hierarchy between natural and non-natural notes.
2387 With this style, @emph{every} note gets an accidental sign,
2388 including natural signs.
2394 cis'8 fis, bes4 <a cis>8 f bis4 |
2408 \voiceTwo \relative c' {
2409 <fis, a cis>8[ <fis a cis>
2412 \change Staff = down
2417 \change Staff = down
2418 <fis, a cis>4 gis <f a d>2 |
2425 \context Staff = "up" {
2426 \accidentalStyle dodecaphonic
2429 \context Staff = "down" {
2430 \accidentalStyle dodecaphonic
2437 @item dodecaphonic-no-repeat
2439 @cindex dodecaphonic accidental style
2440 @cindex dodecaphonic style, neo-modern
2442 @funindex dodecaphonic-no-repeat
2444 Like with the dodecaphonic accidental style @emph{every} note
2445 gets an accidental sign by default, but accidentals are
2446 suppressed for pitches immediately repeated within the same staff.
2452 cis'8 fis, bes4 <a cis>8 f bis4 |
2466 \voiceTwo \relative c' {
2467 <fis, a cis>8[ <fis a cis>
2470 \change Staff = down
2475 \change Staff = down
2476 <fis, a cis>4 gis <f a d>2 |
2483 \context Staff = "up" {
2484 \accidentalStyle dodecaphonic-no-repeat
2487 \context Staff = "down" {
2488 \accidentalStyle dodecaphonic-no-repeat
2496 @item dodecaphonic-first
2498 @cindex dodecaphonic accidental style
2499 @cindex dodecaphonic style, neo-modern
2501 @funindex dodecaphonic-first
2503 Similar to the dodecaphonic accidental style @emph{every} pitch
2504 gets an accidental sign, but only the first time it is encountered
2505 in a measure. Accidentals are only remembered for the actual octave
2506 but throughout voices.
2512 cis'8 fis, bes4 <a cis>8 f bis4 |
2526 \voiceTwo \relative c' {
2527 <fis, a cis>8[ <fis a cis>
2530 \change Staff = down
2535 \change Staff = down
2536 <fis, a cis>4 gis <f a d>2 |
2543 \context Staff = "up" {
2544 \accidentalStyle dodecaphonic-first
2547 \context Staff = "down" {
2548 \accidentalStyle dodecaphonic-first
2558 @cindex teaching accidental style
2559 @cindex accidental style, teaching
2563 This rule is intended for students, and makes it easy to create
2564 scale sheets with automatically created cautionary accidentals.
2565 Accidentals are printed like with @code{modern}, but cautionary
2566 accidentals are added for all sharp or flat tones specified by the
2567 key signature, except if the note is immediately repeated.
2569 @lilypond[quote,staffsize=18]
2573 cis'8 fis, bes4 <a cis>8 f bis4 |
2587 \voiceTwo \relative c' {
2588 <fis, a cis>8[ <fis a cis>
2591 \change Staff = down
2596 \change Staff = down
2597 <fis, a cis>4 gis <f a d>2 |
2604 \context Staff = "up" {
2606 \accidentalStyle teaching
2609 \context Staff = "down" {
2611 \accidentalStyle teaching
2622 @cindex accidental style, no reset
2623 @cindex no reset accidental style
2627 This is the same as @code{default} but with accidentals lasting
2628 @q{forever} and not only within the same measure:
2634 cis'8 fis, bes4 <a cis>8 f bis4 |
2648 \voiceTwo \relative c' {
2649 <fis, a cis>8[ <fis a cis>
2652 \change Staff = down
2657 \change Staff = down
2658 <fis, a cis>4 gis <f a d>2 |
2665 \context Staff = "up" {
2666 \accidentalStyle no-reset
2669 \context Staff = "down" {
2670 \accidentalStyle no-reset
2679 @cindex forget accidental style
2680 @cindex accidental style, forget
2684 This is the opposite of @code{no-reset}: Accidentals are not
2685 remembered at all -- and hence all accidentals are typeset
2686 relative to the key signature, regardless of what came before in
2693 cis'8 fis, bes4 <a cis>8 f bis4 |
2707 \voiceTwo \relative c' {
2708 <fis, a cis>8[ <fis a cis>
2711 \change Staff = down
2716 \change Staff = down
2717 <fis, a cis>4 gis <f a d>2 |
2724 \context Staff = "up" {
2725 \accidentalStyle forget
2728 \context Staff = "down" {
2729 \accidentalStyle forget
2741 Internals Reference:
2742 @rinternals{Accidental},
2743 @rinternals{Accidental_engraver},
2744 @rinternals{GrandStaff},
2745 @rinternals{PianoStaff},
2747 @rinternals{AccidentalSuggestion},
2748 @rinternals{AccidentalPlacement},
2749 @rinternals{accidental-suggestion-interface}.
2751 @cindex accidentals and simultaneous notes
2752 @cindex simultaneous notes and accidentals
2753 @cindex accidentals in chords
2754 @cindex chords, accidentals in
2757 Simultaneous notes are not considered in the automatic
2758 determination of accidentals; only previous notes and the key
2759 signature are considered. Forcing accidentals with@tie{}@code{!}
2760 or@tie{}@code{?} may be required when the same note name occurs
2761 simultaneously with different alterations, as in @samp{<f! fis!>}.
2763 Cautionary cancellation of accidentals is done by looking at previous measure.
2764 However, in the @code{\alternative} block following a @code{\repeat volta N}
2765 section, one would expect the cancellation being calculated using the previous
2766 @emph{played} measure, not previous @emph{printed} measure.
2767 In the following example, the natural @code{c} in the second alternative does
2768 not need a natural sign:
2772 \accidentalStyle modern
2784 The following work-around can be used: define a function that locally changes
2785 the accidental style to @code{forget}:
2787 @lilypond[verbatim,quote]
2788 forget = #(define-music-function (parser location music) (ly:music?) #{
2789 \accidentalStyle forget
2791 \accidentalStyle modern
2794 \accidentalStyle modern
2808 @unnumberedsubsubsec Ambitus
2811 @cindex range of pitches
2814 The term @notation{ambitus} (pl. ambitus) denotes a range of
2815 pitches for a given voice in a part of music. It may also denote
2816 the pitch range that a musical instrument is capable of playing.
2817 Ambitus are printed on vocal parts so that performers can easily
2818 determine if it matches their capabilities.
2820 Ambitus are denoted at the beginning of a piece near the initial
2821 clef. The range is graphically specified by two note heads that
2822 represent the lowest and highest pitches. Accidentals are only
2823 printed if they are not part of the key signature.
2825 @lilypond[verbatim,quote]
2829 \consists "Ambitus_engraver"
2842 @lilypondfile[verbatim,quote,texidoc,doctitle]
2843 {adding-ambitus-per-voice.ly}
2845 @lilypondfile[verbatim,quote,texidoc,doctitle]
2846 {ambitus-with-multiple-voices.ly}
2848 @lilypondfile[verbatim,quote,texidoc,doctitle]
2849 {changing-the-ambitus-gap.ly}
2858 Internals Reference:
2859 @rinternals{Ambitus_engraver},
2862 @rinternals{Ambitus},
2863 @rinternals{AmbitusAccidental},
2864 @rinternals{AmbitusLine},
2865 @rinternals{AmbitusNoteHead},
2866 @rinternals{ambitus-interface}.
2869 There is no collision handling in the case of multiple per-voice
2874 @subsection Note heads
2876 This section suggests ways of altering note heads.
2879 * Special note heads::
2880 * Easy notation note heads::
2881 * Shape note heads::
2885 @node Special note heads
2886 @unnumberedsubsubsec Special note heads
2888 @cindex note heads, special
2889 @cindex note heads, cross
2890 @cindex note heads, diamond
2891 @cindex note heads, parlato
2892 @cindex note heads, harmonic
2893 @cindex note heads, guitar
2894 @cindex special note heads
2895 @cindex cross note heads
2896 @cindex diamond note heads
2897 @cindex parlato note heads
2898 @cindex harmonic note heads
2899 @cindex guitar note heads
2900 @cindex note head styles
2901 @cindex styles, note heads
2905 The appearance of note heads may be altered:
2907 @lilypond[verbatim,quote,relative=2]
2909 \override NoteHead.style = #'cross
2911 \revert NoteHead.style
2913 \override NoteHead.style = #'harmonic
2915 \revert NoteHead.style
2919 To see all note head styles, see @ref{Note head styles}.
2921 The @code{cross} style is used to represent a variety of musical
2922 intentions. The following generic predefined commands modify the
2923 note head in both staff and tablature contexts and can be used to
2924 represent any musical meaning:
2926 @lilypond[verbatim,quote,relative=2]
2934 The music function form of this predefined command may be used
2935 inside and outside chords to generate crossed note heads in both
2936 staff and tablature contexts:
2938 @lilypond[verbatim,quote,relative=2]
2941 c b < g \xNote c f > b
2944 As synonyms for @code{\xNote}, @code{\xNotesOn} and @code{\xNotesOff},
2945 @code{\deadNote}, @code{\deadNotesOn} and @code{\deadNotesOff} can
2946 be used. The term @notation{dead note} is commonly used by guitarists.
2948 There is also a similar shorthand for diamond shapes:
2950 @lilypond[verbatim,quote,relative=2]
2951 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic
2966 @ref{Note head styles},
2967 @ref{Chorded notes},
2968 @ref{Indicating harmonics and dampened notes}.
2970 Internals Reference:
2971 @rinternals{note-event},
2972 @rinternals{Note_heads_engraver},
2973 @rinternals{Ledger_line_engraver},
2974 @rinternals{NoteHead},
2975 @rinternals{LedgerLineSpanner},
2976 @rinternals{note-head-interface},
2977 @rinternals{ledger-line-spanner-interface}.
2980 @node Easy notation note heads
2981 @unnumberedsubsubsec Easy notation note heads
2983 @cindex note heads, practice
2984 @cindex practice note heads
2985 @cindex note heads, easy notation
2986 @cindex easy notation
2987 @cindex beginners' music
2988 @cindex music, beginners'
2989 @cindex easy play note heads
2990 @cindex note heads, easy play
2992 @funindex \easyHeadsOn
2993 @funindex easyHeadsOn
2994 @funindex \easyHeadsOff
2995 @funindex easyHeadsOff
2997 The @q{easy play} note head includes a note name inside the head.
2998 It is used in music for beginners. To make the letters readable,
2999 it should be printed in a large font size. To print with a larger
3000 font, see @ref{Setting the staff size}.
3002 @lilypond[verbatim,quote]
3003 #(set-global-staff-size 26)
3015 @code{\easyHeadsOn},
3016 @code{\easyHeadsOff}.
3022 @lilypondfile[verbatim,quote,texidoc,doctitle]
3023 {numbers-as-easy-note-heads.ly}
3027 @ref{Setting the staff size}.
3032 Internals Reference:
3033 @rinternals{note-event},
3034 @rinternals{Note_heads_engraver},
3035 @rinternals{NoteHead},
3036 @rinternals{note-head-interface}.
3039 @node Shape note heads
3040 @unnumberedsubsubsec Shape note heads
3042 @cindex note heads, shape
3043 @cindex note heads, Aiken
3044 @cindex note heads, sacred harp
3046 @cindex Aiken shape note heads
3047 @cindex sacred harp note heads
3048 @cindex note heads, Southern Harmony
3049 @cindex Southern Harmony note heads
3050 @cindex Funk shape note heads
3051 @cindex note heads, Funk
3052 @cindex note heads, Harmonica Sacra
3053 @cindex Harmonica Sacra note heads
3054 @cindex Christian Harmony note heads
3055 @cindex note heads, Christian Harmony
3056 @cindex Walker shape note heads
3057 @cindex note heads, Walker
3059 @funindex \aikenHeads
3060 @funindex aikenHeads
3061 @funindex \sacredHarpHeads
3062 @funindex sacredHarpHeads
3063 @funindex \southernHarmonyHeads
3064 @funindex southernHarmonyHeads
3065 @funindex \funkHeads
3067 @funindex \walkerHeads
3068 @funindex walkerHeads
3070 In shape note head notation, the shape of the note head
3071 corresponds to the harmonic function of a note in the scale. This
3072 notation was popular in nineteenth-century American song books.
3073 Shape note heads can be produced in Sacred Harp, Southern Harmony,
3074 Funk (Harmonica Sacra), Walker, and Aiken (Christian Harmony) styles:
3076 @lilypond[verbatim,quote,relative=2]
3078 c, d e f g2 a b1 c \break
3080 c,4 d e f g2 a b1 c \break
3081 \southernHarmonyHeads
3082 c,4 d e f g2 a b1 c \break
3084 c,4 d e f g2 a b1 c \break
3086 c,4 d e f g2 a b1 c \break
3091 @funindex \aikenHeadsMinor
3092 @funindex aikenHeadsMinor
3093 @funindex \sacredHarpHeadsMinor
3094 @funindex sacredHarpHeadsMinor
3095 @funindex \southernHarmonyHeadsMinor
3096 @funindex southernHarmonyHeadsMinor
3097 @funindex \funkHeadsMinor
3098 @funindex funkHeadsMinor
3099 @funindex \walkerHeadsMinor
3100 @funindex walkerHeadsMinor
3102 Shapes are typeset according to the step in the scale, where the base
3103 of the scale is determined by the @code{\key} command. When writing
3104 in a minor key, the scale step can be determined from the relative
3107 @lilypond[verbatim,quote,relative=2]
3110 a b c d e2 f g1 a \break
3112 a,4 b c d e2 f g1 a \break
3113 \sacredHarpHeadsMinor
3115 \southernHarmonyHeadsMinor
3127 @code{\aikenHeadsMinor},
3129 @code{\funkHeadsMinor},
3130 @code{\sacredHarpHeads},
3131 @code{\sacredHarpHeadsMinor},
3132 @code{\southernHarmonyHeads},
3133 @code{\southernHarmonyHeadsMinor},
3134 @code{\walkerHeads},
3135 @code{\walkerHeadsMinor}.
3141 @lilypondfile[verbatim,quote,texidoc,doctitle]
3142 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
3144 To see all note head styles, see @ref{Note head styles}.
3151 @ref{Note head styles}.
3153 Internals Reference:
3154 @rinternals{note-event},
3155 @rinternals{Note_heads_engraver},
3156 @rinternals{NoteHead},
3157 @rinternals{note-head-interface}.
3161 @unnumberedsubsubsec Improvisation
3163 @cindex improvisation
3164 @cindex slashed note heads
3165 @cindex note heads, improvisation
3166 @cindex note heads, slashed
3168 @funindex \improvisationOn
3169 @funindex improvisationOn
3170 @funindex \improvisationOff
3171 @funindex improvisationOff
3173 Improvisation is sometimes denoted with slashed note heads, where
3174 the performer may choose any pitch but should play the specified
3175 rhythm. Such note heads can be created:
3177 @lilypond[verbatim,quote,relative=2]
3179 \consists "Pitch_squash_engraver"
3181 e8 e g a a16( bes) a8 g
3192 @code{\improvisationOn},
3193 @code{\improvisationOff}.
3200 Internals Reference:
3201 @rinternals{Pitch_squash_engraver},
3203 @rinternals{RhythmicStaff}.