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 Common octave marks can be entered just once on a reference pitch
93 after @code{\fixed} placed before the music. Pitches inside
94 @code{\fixed} only need @code{'} or@tie{}@code{,} marks
95 when they are above or below the octave of the reference pitch.
97 @lilypond[verbatim,quote]
112 Pitches in the music expression following @code{\fixed} are
113 unaffected by any enclosing @code{\relative}, discussed next.
123 @node Relative octave entry
124 @unnumberedsubsubsec Relative octave entry
127 @cindex relative octave entry
128 @cindex octave entry, relative
129 @cindex relative octave specification
130 @cindex octave specification, relative
135 Absolute octave entry requires specifying the octave for every
136 single note. Relative octave entry, in contrast, specifies each
137 octave in relation to the last note: changing one note's octave
138 will affect all of the following notes.
140 Relative note mode has to be entered explicitly using the
141 @code{\relative} command:
144 \relative @var{startpitch} @var{musicexpr}
147 In relative mode, each note is assumed to be as close to the
148 previous note as possible. This means that the octave of each
149 pitch inside @code{@var{musicexpr}} is calculated as follows:
153 If no octave changing mark is used on a pitch, its octave is
154 calculated so that the interval with the previous note is less
155 than a fifth. This interval is determined without considering
159 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be
160 added to respectively raise or lower a pitch by an extra octave,
161 relative to the pitch calculated without an octave mark.
164 Multiple octave changing marks can be used. For example,
165 @code{''}@tie{}and@tie{}@code{,,} will alter the pitch by two
169 The pitch of the first note is relative to
170 @code{@var{startpitch}}. @code{@var{startpitch}} is specified in
171 absolute octave mode. Which choices are meaningful?
174 @item an octave of @code{c}
175 Identifying middle C with @code{c'} is quite basic, so finding
176 octaves of @code{c} tends to be straightforward. If your music
177 starts with @code{gis} above @code{c'''}, you'd write something
178 like @code{\relative c''' @{ gis' @dots{} @}}
180 @item an octave of the first note inside
181 Writing @code{\relative gis''' @{ gis @dots{} @}} makes it easy to
182 determine the absolute pitch of the first note inside.
184 @item no explicit starting pitch
185 The form @code{\relative @{ gis''' @dots{} @}}) serves
186 as a compact version of the previous option: the first note
187 inside is written in absolute pitch itself. (This happens to be
188 equivalent to choosing @code{f} as the reference pitch.)
191 The documentation will usually employ the last option.
194 Here is the relative mode shown in action:
196 @lilypond[verbatim,quote]
205 Octave changing marks are used for intervals greater than a
208 @lilypond[verbatim,quote]
215 A note sequence without a single octave mark can nevertheless span
218 @lilypond[verbatim,quote]
225 When @code{\relative} blocks are nested, the innermost
226 @code{\relative} block starts with its own reference pitch
227 independently of the outer @code{\relative}.
229 @lilypond[verbatim,quote]
238 @code{\relative} has no effect on @code{\chordmode} blocks.
240 @lilypond[verbatim,quote]
249 @code{\relative} is not allowed inside of @code{\chordmode} blocks.
251 Music inside a @code{\transpose} block is absolute unless a
252 @code{\relative} is included.
254 @lilypond[verbatim,quote]
267 @cindex chords and relative octave entry
268 @cindex relative octave entry and chords
270 If the preceding item is a chord, the first note of the chord is
271 used as the reference point for the octave placement of a
272 following note or chord. Inside chords, the next note is always
273 relative to the preceding one. Examine the next example
274 carefully, paying attention to the @code{c} notes.
276 @lilypond[verbatim,quote]
285 As explained above, the octave of pitches is calculated only with
286 the note names, regardless of any alterations. Therefore, an
287 E-double-sharp following a B will be placed higher, while an
288 F-double-flat will be placed lower. In other words, a
289 double-augmented fourth is considered a smaller interval than a
290 double-diminished fifth, regardless of the number of semitones
291 that each interval contains.
293 @lilypond[verbatim,quote]
316 @rinternals{RelativeOctaveMusic}.
318 @cindex relative octave entry and transposition
319 @cindex transposition and relative octave entry
330 @unnumberedsubsubsec Accidentals
333 @cindex key signature
336 @c duplicated in Key signature and Accidentals
337 @warning{New users are sometimes confused about accidentals and
338 key signatures. In LilyPond, note names specify pitches; key
339 signatures and clefs determine how these pitches are displayed.
340 An unaltered note like@tie{}@code{c} means @q{C natural},
341 regardless of the key signature or clef. For more information,
342 see @rlearning{Pitches and key signatures}.}
344 @cindex note names, Dutch
345 @cindex note names, default
346 @cindex default note names
350 @cindex sharp, double
354 @cindex natural pitch
356 A @notation{sharp} pitch is made by adding @code{is} to the note
357 name, and a @notation{flat} pitch by adding @code{es}. As you
358 might expect, a @notation{double sharp} or @notation{double flat}
359 is made by adding @code{isis} or @code{eses}. This syntax is
360 derived from Dutch note naming conventions. To use other names
361 for accidentals, see @ref{Note names in other languages}.
363 @lilypond[verbatim,quote,relative=2]
367 A natural pitch is entered as a simple note name; no suffix is
368 required. A natural sign will be printed when needed to cancel
369 the effect of an earlier accidental or key signature.
371 @lilypond[verbatim,quote,relative=2]
375 @cindex quarter tones
379 Quarter tones may be added; the following is a series of Cs with
382 @lilypond[verbatim,quote,relative=2]
383 ceseh1 ces ceh c cih cis cisih
388 @cindex accidental, reminder
389 @cindex accidental, cautionary
390 @cindex accidental, parenthesized
391 @cindex reminder accidental
392 @cindex cautionary accidental
393 @cindex parenthesized accidental
399 Normally accidentals are printed automatically, but you may also
400 print them manually. A reminder accidental can be forced by
401 adding an exclamation mark@tie{}@code{!} after the pitch. A
402 cautionary accidental (i.e., an accidental within parentheses) can
403 be obtained by adding the question mark@tie{}@code{?} after the
406 @lilypond[verbatim,quote,relative=2]
407 cis cis cis! cis? c c c! c?
410 @cindex accidental on tied note
411 @cindex tied note, accidental
413 Accidentals on tied notes are only printed at the beginning of a
416 @lilypond[verbatim,quote,relative=2,ragged-right]
425 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
426 {hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly}
428 @lilypondfile[verbatim,quote,texidoc,doctitle]
429 {preventing-extra-naturals-from-being-automatically-added.ly}
435 @rglos{double sharp},
438 @rglos{quarter tone}.
441 @rlearning{Pitches and key signatures}.
444 @ref{Automatic accidentals},
445 @ref{Annotational accidentals (musica ficta)},
446 @ref{Note names in other languages}.
452 @rinternals{Accidental_engraver},
453 @rinternals{Accidental},
454 @rinternals{AccidentalCautionary},
455 @rinternals{accidental-interface}.
457 @cindex accidental, quarter-tone
458 @cindex quarter-tone accidental
461 There are no generally accepted standards for denoting
462 quarter-tone accidentals, so LilyPond's symbol does not conform to
466 @node Note names in other languages
467 @unnumberedsubsubsec Note names in other languages
469 @cindex note names, other languages
470 @cindex pitch names, other languages
471 @cindex language, note names in other
472 @cindex language, pitch names in other
474 There are predefined sets of note and accidental names for various
475 other languages. Selecting the note name language is usually done
476 at the beginning of the file; the following example is written
477 using Italian note names:
479 @lilypond[quote,verbatim]
487 The available languages and the note names they define are:
490 @multitable {@code{nederlands}} {do re mi fa sol la sib si}
493 @item @code{nederlands}
494 @tab c d e f g a bes b
496 @tab do re mi fa sol la sib si
500 @tab c d e f g a bf b
501 @item @code{espanol} or @code{español}
502 @tab do re mi fa sol la sib si
503 @item @code{italiano} or @code{français}
504 @tab do re mi fa sol la sib si
507 @item @code{portugues}
508 @tab do re mi fa sol la sib si
514 @tab do re mi fa sol la sib si
518 In addition to note names, accidental suffixes may
519 also vary depending on the language:
522 @multitable {@code{nederlands}} {-@code{s}/-@code{-sharp}} {-@code{ess}/-@code{es}} {-@code{ss}/-@code{x}/-@code{-sharpsharp}} {-@code{essess}/-@code{eses}}
524 @tab sharp @tab flat @tab double sharp @tab double flat
525 @item @code{nederlands}
526 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
528 @tab -@code{d}/-@code{s} @tab -@code{b} @tab -@code{dd}/-@code{ss} @tab -@code{bb}
530 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
532 @tab -@code{s}/-@code{-sharp} @tab -@code{f}/-@code{-flat} @tab -@code{ss}/-@code{x}/-@code{-sharpsharp}
533 @tab -@code{ff}/-@code{-flatflat}
534 @item @code{espanol} or @code{español}
535 @tab -@code{s} @tab -@code{b} @tab -@code{ss}/-@code{x} @tab -@code{bb}
536 @item @code{italiano} or @code{français}
537 @tab -@code{d} @tab -@code{b} @tab -@code{dd} @tab -@code{bb}
539 @tab -@code{iss}/-@code{is} @tab -@code{ess}/-@code{es} @tab -@code{ississ}/-@code{isis}
540 @tab -@code{essess}/-@code{eses}
541 @item @code{portugues}
542 @tab -@code{s} @tab -@code{b} @tab -@code{ss} @tab -@code{bb}
544 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
546 @tab -@code{iss} @tab -@code{ess} @tab -@code{ississ} @tab -@code{essess}
548 @tab -@code{k} @tab -@code{b} @tab -@code{kk} @tab -@code{bb}
552 In Dutch, @code{aes} is contracted to @code{as}, but both forms
553 are accepted in LilyPond. Similarly, both @code{es} and
554 @code{ees} are accepted. This also applies to
555 @code{aeses}@tie{}/@tie{}@code{ases} and
556 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
557 contracted names are defined in the corresponding language files.
559 @lilypond[verbatim,quote,relative=2]
560 a2 as e es a ases e eses
570 Some music uses microtones whose alterations are fractions of a
571 @q{normal} sharp or flat. The following table lists note names
572 for quarter-tone accidentals in various languages; here the prefixes
573 @notation{semi-} and @notation{sesqui-} respectively
574 mean @q{half} and @q{one and a half}. Languages that do not
575 appear in this table do not provide special note names yet.
578 @multitable {@code{nederlands}} {@b{semi-sharp}} {@b{semi-flat}} {@b{sesqui-sharp}} {@b{sesqui-flat}}
580 @tab semi-sharp @tab semi-flat @tab sesqui-sharp @tab sesqui-flat
582 @item @code{nederlands}
583 @tab -ih @tab -eh @tab -isih @tab -eseh
585 @tab -ih @tab -eh @tab -isih @tab -eseh
587 @tab -qs @tab -qf @tab -tqs @tab -tqf
588 @item @code{espanol} or @code{español}
589 @tab -cs @tab -cb @tab -tcs @tab -tcb
590 @item @code{italiano} or @code{français}
591 @tab -sd @tab -sb @tab -dsd @tab -bsb
592 @item @code{portugues}
593 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
597 Most languages presented here are commonly associated with
598 Western classical music, also referred to as
599 @notation{Common Practice Period}. However, alternate
600 pitches and tuning systems are also supported: see
601 @ref{Common notation for non-Western music}.
606 @rglos{Common Practice Period}.
609 @ref{Common notation for non-Western music}.
612 @file{scm/define-note-names.scm}.
618 @node Changing multiple pitches
619 @subsection Changing multiple pitches
621 This section discusses how to modify pitches.
628 * Modal transformations::
632 @unnumberedsubsubsec Octave checks
634 @cindex octave correction
636 @cindex control pitch
639 @funindex \octaveCheck
640 @funindex octaveCheck
641 @funindex controlpitch
643 In relative mode, it is easy to forget an octave changing mark.
644 Octave checks make such errors easier to find by displaying a
645 warning and correcting the octave if a note is found in an
648 To check the octave of a note, specify the absolute octave after
649 the @code{=}@tie{}symbol. This example will generate a warning
650 (and change the pitch) because the second note is the absolute
651 octave @code{d''} instead of @code{d'} as indicated by the octave
654 @lilypond[verbatim,quote]
661 The octave of notes may also be checked with the
662 @code{\octaveCheck@tie{}@var{controlpitch}} command.
663 @code{@var{controlpitch}} is specified in absolute mode. This
664 checks that the interval between the previous note and the
665 @code{@var{controlpitch}} is within a fourth (i.e., the normal
666 calculation of relative mode). If this check fails, a warning is
667 printed, but the previous note is not changed. Future notes are
668 relative to the @code{@var{controlpitch}}.
670 @lilypond[verbatim,quote]
678 Compare the two bars below. The first and third @code{\octaveCheck}
679 checks fail, but the second one does not fail.
681 @lilypond[verbatim,quote]
700 @rinternals{RelativeOctaveCheck}.
704 @unnumberedsubsubsec Transpose
708 @cindex transposition
709 @cindex transposition of pitches
710 @cindex transposition of notes
711 @cindex pitches, transposition of
712 @cindex notes, transposition of
717 A music expression can be transposed with @code{\transpose}. The
721 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
725 This means that @code{@var{musicexpr}} is transposed by the
726 interval between the pitches @code{@var{frompitch}} and
727 @code{@var{topitch}}: any note with pitch @code{@var{frompitch}}
728 is changed to @code{@var{topitch}} and any other note is
729 transposed by the same interval. Both pitches are entered in
732 @warning{Music inside a @code{@bs{}transpose} block is absolute
733 unless a @code{@bs{}relative} is included in the block.}
735 Consider a piece written in the key of D-major. It can be
736 transposed up to E-major; note that the key signature is
737 automatically transposed as well.
739 @lilypond[verbatim,quote]
748 @cindex transposing instruments
749 @cindex instruments, transposing
751 If a part written in C (normal @notation{concert pitch}) is to be
752 played on the A clarinet (for which an A is notated as a C and
753 thus sounds a minor third lower than notated), the appropriate
754 part will be produced with:
756 @lilypond[verbatim,quote]
766 Note that we specify @w{@code{\key c \major}} explicitly. If we
767 do not specify a key signature, the notes will be transposed but
768 no key signature will be printed.
770 @code{\transpose} distinguishes between enharmonic pitches: both
771 @w{@code{\transpose c cis}} or @w{@code{\transpose c des}} will
772 transpose up a semitone. The first version will print sharps and
773 the notes will remain on the same scale step, the second version
774 will print flats on the scale step above.
776 @lilypond[verbatim,quote]
777 music = \relative { c' d e f }
779 \transpose c cis { \music }
780 \transpose c des { \music }
785 @code{\transpose} may also be used in a different way, to input
786 written notes for a transposing instrument. The previous examples
787 show how to enter pitches in C (or @notation{concert pitch}) and
788 typeset them for a transposing instrument, but the opposite is
789 also possible if you for example have a set of instrumental parts
790 and want to print a conductor's score. For example, when entering
791 music for a B-flat trumpet that begins on a notated E (concert D),
795 musicInBflat = @{ e4 @dots{} @}
796 \transpose c bes, \musicInBflat
800 To print this music in F (e.g., rearranging to a French horn) you
801 could wrap the existing music with another @code{\transpose}:
804 musicInBflat = @{ e4 @dots{} @}
805 \transpose f c' @{ \transpose c bes, \musicInBflat @}
809 For more information about transposing instruments,
810 see @ref{Instrument transpositions}.
815 @lilypondfile[verbatim,quote,texidoc,doctitle]
816 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
820 @ref{Instrument transpositions},
822 @ref{Modal transformations},
823 @ref{Relative octave entry},
830 @rinternals{TransposedMusic}.
840 The relative conversion will not affect @code{\transpose},
841 @code{\chordmode} or @code{\relative} sections in its argument. To use
842 relative mode within transposed music, an additional @code{\relative}
843 must be placed inside @code{\transpose}.
845 Triple accidentals will not be printed if using @code{\transpose}. An
846 @q{enharmonically equivalent} pitch will be used instead (e.g. d-flat
847 rather than e-triple-flat).
851 @unnumberedsubsubsec Inversion
854 @cindex operation, inversion
857 A music expression can be inverted and transposed in a single
861 \inversion @var{around-pitch} @var{to-pitch} @var{musicexpr}
864 The @code{@var{musicexpr}} is inverted interval-by-interval around
865 @code{@var{around-pitch}}, and then transposed so that
866 @code{@var{around-pitch}} is mapped to @code{@var{to-pitch}}.
868 @lilypond[verbatim,quote]
869 music = \relative { c' d e f }
872 \inversion d' d' \music
873 \inversion d' ees' \music
877 @warning{Motifs to be inverted should be expressed in absolute form
878 or be first converted to absolute form by enclosing them in a
879 @code{\relative} block.}
883 @ref{Modal transformations},
889 @unnumberedsubsubsec Retrograde
891 @cindex retrograde transformation
892 @cindex transformation, retrograde
893 @cindex operation, retrograde
894 @funindex \retrograde
897 A music expression can be reversed to produce its retrograde:
899 @lilypond[verbatim,quote]
900 music = \relative { c'8. ees16( fis8. a16 b8.) gis16 f8. d16 }
909 Manual ties inside @code{\retrograde} will be broken and
910 generate warnings. Some ties can be generated automatically
911 by enabling @ref{Automatic note splitting}.
916 @ref{Modal transformations},
920 @node Modal transformations
921 @unnumberedsubsubsec Modal transformations
923 @cindex modal transformations
924 @cindex transformations, modal
925 @cindex operations, modal
927 In a musical composition that is based on a scale, a motif is
928 frequently transformed in various ways. It may be
929 @notation{transposed} to start at different places in the scale or
930 it may be @notation{inverted} around a pivot point in the scale.
931 It may also be reversed to produce its @notation{retrograde}, see
934 @warning{Any note that does not lie within the given scale will be
937 @subsubsubheading Modal transposition
939 @cindex modal transposition
940 @cindex transposition, modal
941 @cindex operation, transposition
942 @funindex \modalTranspose
943 @funindex modalTranspose
945 A motif can be transposed within a given scale with:
948 \modalTranspose @var{from-pitch} @var{to-pitch} @var{scale} @var{motif}
951 The notes of @var{motif} are shifted within the @var{scale} by the
952 number of scale degrees given by the interval between @var{to-pitch}
953 and @var{from-pitch}:
955 @lilypond[verbatim,quote]
956 diatonicScale = \relative { c' d e f g a b }
957 motif = \relative { c'8 d e f g a b c }
961 \modalTranspose c f \diatonicScale \motif
962 \modalTranspose c b, \diatonicScale \motif
966 An ascending scale of any length and with any intervals may be
969 @lilypond[verbatim,quote]
970 pentatonicScale = \relative { ges aes bes des ees }
971 motif = \relative { ees'8 des ges,4 <ges' bes,> <ges bes,> }
975 \modalTranspose ges ees' \pentatonicScale \motif
979 When used with a chromatic scale @code{\modalTranspose} has a
980 similar effect to @code{\transpose}, but with the ability to
981 specify the names of the notes to be used:
983 @lilypond[verbatim,quote]
984 chromaticScale = \relative { c' cis d dis e f fis g gis a ais b }
985 motif = \relative { c'8 d e f g a b c }
989 \transpose c f \motif
990 \modalTranspose c f \chromaticScale \motif
994 @subsubsubheading Modal inversion
996 @cindex modal inversion
997 @cindex inversion, modal
998 @cindex operation, modal inversion
999 @funindex \modalInversion
1000 @funindex modalInversion
1002 A motif can be inverted within a given scale around a given pivot
1003 note and transposed in a single operation with:
1006 \modalInversion @var{around-pitch} @var{to-pitch} @var{scale} @var{motif}
1009 The notes of @var{motif} are placed the same number of scale degrees
1010 from the @var{around-pitch} note within the @var{scale}, but in the
1011 opposite direction, and the result is then shifted within the
1012 @var{scale} by the number of scale degrees given by the interval between
1013 @var{to-pitch} and @var{around-pitch}.
1015 So to simply invert around a note in the scale use the same value for
1016 @var{around-pitch} and @var{to-pitch}:
1018 @lilypond[verbatim,quote]
1019 octatonicScale = \relative { ees' f fis gis a b c d }
1020 motif = \relative { c'8. ees16 fis8. a16 b8. gis16 f8. d16 }
1024 \modalInversion fis' fis' \octatonicScale \motif
1028 To invert around a pivot between two notes in the scale, invert around
1029 one of the notes and then transpose by one scale degree. The two notes
1030 specified can be interpreted as bracketing the pivot point:
1032 @lilypond[verbatim,quote]
1033 scale = \relative { c' g' }
1034 motive = \relative { c' c g' c, }
1038 \modalInversion c' g' \scale \motive
1042 The combined operation of inversion and retrograde produce the
1043 retrograde-inversion:
1045 @lilypond[verbatim,quote]
1046 octatonicScale = \relative { ees' f fis gis a b c d }
1047 motif = \relative { c'8. ees16 fis8. a16 b8. gis16 f8. d16 }
1051 \retrograde \modalInversion c' c' \octatonicScale \motif
1062 @node Displaying pitches
1063 @subsection Displaying pitches
1065 This section discusses how to alter the output of pitches.
1071 * Instrument transpositions::
1072 * Automatic accidentals::
1078 @unnumberedsubsubsec Clef
1089 @cindex soprano clef
1090 @cindex mezzosoprano clef
1091 @cindex baritone clef
1092 @cindex varbaritone clef
1093 @cindex subbass clef
1095 @cindex ancient clef
1096 @cindex clef, ancient
1100 @cindex clef, treble
1101 @cindex clef, violin
1105 @cindex clef, french
1106 @cindex clef, soprano
1107 @cindex clef, mezzosoprano
1108 @cindex clef, baritone
1109 @cindex clef, varbaritone
1110 @cindex clef, subbass
1116 Without any explicit command, the default clef for LilyPond is the
1117 treble (or @emph{G}) clef.
1119 @lilypond[verbatim,quote,relative=1,ragged-right]
1123 However, the clef can be changed by using the @code{\clef} command and
1124 an appropriate clef name. @emph{Middle C} is shown in each of the
1127 @lilypond[verbatim,quote,relative=1]
1138 For the full range of possible clef names see @ref{Clef styles}.
1140 Specialized clefs, such as those used in @emph{Ancient} music, are
1141 described in @ref{Mensural clefs} and @ref{Gregorian clefs}. Music that
1142 requires tablature clefs is discussed in @ref{Default tablatures} and
1143 @ref{Custom tablatures}.
1146 @cindex Clefs with cue notes
1147 For mixing clefs when using cue notes, see the @code{\cueClef} and
1148 @code{\cueDuringWithClef} commands in @ref{Formatting cue notes}.
1150 @cindex transposing clef
1151 @cindex clef, transposing
1152 @cindex octave transposition
1153 @cindex optional octave transposition
1154 @cindex octave transposition, optional
1155 @cindex choral tenor clef
1156 @cindex tenor clef, choral
1158 By adding@tie{}@code{_8} or@tie{}@code{^8} to the clef name, the
1159 clef is transposed one octave down or up respectively,
1160 and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves.
1161 Other integers can be used if required. Clef names containing
1162 non-alphabetic characters must be enclosed in quotes
1164 @lilypond[verbatim,quote,relative=1]
1179 Optional octavation can be obtained by enclosing the numeric
1180 argument in parentheses or brackets:
1182 @lilypond[verbatim,quote,relative=1]
1189 The pitches are displayed as if the numeric argument were
1190 given without parentheses/brackets.
1192 By default, a clef change taking place at a line break will cause
1193 the new clef symbol to be printed at the end of the previous line,
1194 as a @emph{warning} clef, as well as the beginning of the next.
1195 This @emph{warning} clef can be suppressed.
1197 @lilypond[verbatim,quote,relative=1]
1198 \clef treble { c2 c } \break
1199 \clef bass { c2 c } \break
1201 \set Staff.explicitClefVisibility = #end-of-line-invisible
1203 \unset Staff.explicitClefVisibility
1204 \clef bass { c2 c } \break
1207 By default, a clef that has previously been printed will not be
1208 re-printed if the same @code{\clef} command is issued again and
1209 will be ignored. The the command
1210 @code{\set Staff.forceClef = ##t} changes this behaviour.
1212 @lilypond[verbatim,quote,relative=1]
1217 \set Staff.forceClef = ##t
1223 When there is a manual clef change, the glyph of the changed clef
1224 will be smaller than normal. This behaviour can be overridden.
1226 @lilypond[verbatim,quote,relative=1]
1233 \override Staff.Clef.full-size-change = ##t
1238 \revert Staff.Clef.full-size-change
1246 @lilypondfile[verbatim,quote,texidoc,doctitle]
1247 {tweaking-clef-properties.ly}
1251 @ref{Mensural clefs},
1252 @ref{Gregorian clefs},
1253 @ref{Default tablatures},
1254 @ref{Custom tablatures},
1255 @ref{Formatting cue notes}.
1258 @file{scm/parser-clef.scm}.
1263 Internals Reference:
1264 @rinternals{Clef_engraver},
1266 @rinternals{ClefModifier},
1267 @rinternals{clef-interface}.
1270 Ottavation numbers attached to clefs are treated as separate
1271 grobs. So any @code{\override} done to the @var{Clef} will also
1272 need to be applied, as a separate @code{\override}, to the
1273 @var{ClefModifier} grob.
1275 @lilypond[fragment,quote,verbatim,relative=1]
1277 \override Clef.color = #blue
1278 \override ClefModifier.color = #red
1286 @unnumberedsubsubsec Key signature
1288 @cindex key signature
1293 @c duplicated in Key signature and Accidentals
1294 @warning{New users are sometimes confused about accidentals and
1295 key signatures. In LilyPond, note names are the raw input; key
1296 signatures and clefs determine how this raw input is displayed.
1297 An unaltered note like@tie{}@code{c} means @q{C natural},
1298 regardless of the key signature or clef. For more information,
1299 see @rlearning{Pitches and key signatures}.}
1301 The key signature indicates the tonality in which a piece is
1302 played. It is denoted by a set of alterations (flats or sharps)
1303 at the start of the staff. The key signature may be altered:
1306 \key @var{pitch} @var{mode}
1319 @funindex \mixolydian
1320 @funindex mixolydian
1328 @cindex church modes
1341 Here, @code{@var{mode}} should be @code{\major} or @code{\minor}
1342 to get a key signature of @code{@var{pitch}}-major or
1343 @code{@var{pitch}}-minor, respectively. You may also use the
1344 standard mode names, also called @notation{church modes}:
1345 @code{\ionian}, @code{\dorian}, @code{\phrygian}, @code{\lydian},
1346 @code{\mixolydian}, @code{\aeolian}, and @code{\locrian}.
1348 @lilypond[verbatim,quote,relative=2]
1355 Additional modes can be defined, by listing the alterations
1356 for each scale step when the mode starts on C.
1358 @lilypond[verbatim,quote]
1359 freygish = #`((0 . ,NATURAL) (1 . ,FLAT) (2 . ,NATURAL)
1360 (3 . ,NATURAL) (4 . ,NATURAL) (5 . ,FLAT) (6 . ,FLAT))
1363 \key c \freygish c'4 des e f
1364 \bar "||" \key d \freygish d es fis g
1368 Accidentals in the key signature may be printed in octaves other
1369 than their traditional positions, or in multiple octaves, by
1370 using the @code{flat-positions} and @code{sharp-positions}
1371 properties of @code{KeySignature}. Entries in these properties
1372 specify the range of staff-positions where accidentals will be
1373 printed. If a single position is specified in an entry, the
1374 accidentals are placed within the octave ending at that staff
1377 @lilypond[verbatim, quote,relative=0]
1378 \override Staff.KeySignature.flat-positions = #'((-5 . 5))
1379 \override Staff.KeyCancellation.flat-positions = #'((-5 . 5))
1380 \clef bass \key es \major es g bes d
1381 \clef treble \bar "||" \key es \major es g bes d
1383 \override Staff.KeySignature.sharp-positions = #'(2)
1384 \bar "||" \key b \major b fis b2
1389 @lilypondfile[verbatim,quote,texidoc,doctitle]
1390 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
1392 @lilypondfile[verbatim,quote,texidoc,doctitle]
1393 {non-traditional-key-signatures.ly}
1398 @rglos{church mode},
1402 @rlearning{Pitches and key signatures}.
1407 Internals Reference:
1408 @rinternals{KeyChangeEvent},
1409 @rinternals{Key_engraver},
1410 @rinternals{Key_performer},
1411 @rinternals{KeyCancellation},
1412 @rinternals{KeySignature},
1413 @rinternals{key-signature-interface}.
1416 @node Ottava brackets
1417 @unnumberedsubsubsec Ottava brackets
1425 @funindex set-octavation
1429 @notation{Ottava brackets} introduce an extra transposition of an
1430 octave for the staff:
1432 @lilypond[verbatim,quote,relative=2]
1448 @lilypondfile[verbatim,quote,texidoc,doctitle]
1451 @lilypondfile[verbatim,quote,texidoc,doctitle]
1452 {adding-an-ottava-marking-to-a-single-voice.ly}
1454 @lilypondfile[verbatim,quote,texidoc,doctitle]
1455 {modifying-the-ottava-spanner-slope.ly}
1464 Internals Reference:
1465 @rinternals{Ottava_spanner_engraver},
1466 @rinternals{OttavaBracket},
1467 @rinternals{ottava-bracket-interface}.
1470 @node Instrument transpositions
1471 @unnumberedsubsubsec Instrument transpositions
1473 @cindex transposition, MIDI
1474 @cindex transposition, instrument
1475 @cindex transposing instrument
1477 @cindex MIDI transposition
1479 @funindex \transposition
1480 @funindex transposition
1482 When typesetting scores that involve transposing instruments, some
1483 parts can be typeset in a different pitch than the
1484 @notation{concert pitch}. In these cases, the key of the
1485 @notation{transposing instrument} should be specified; otherwise
1486 the MIDI output and cues in other parts will produce incorrect
1487 pitches. For more information about quotations, see
1488 @ref{Quoting other voices}.
1491 \transposition @var{pitch}
1494 The pitch to use for @code{\transposition} should correspond to
1495 the real sound heard when a@tie{}@code{c'} written on the staff is
1496 played by the transposing instrument. This pitch is entered in
1497 absolute mode, so an instrument that produces a real sound which
1498 is one tone higher than the printed music should use
1499 @w{@code{\transposition d'}}. @code{\transposition} should
1500 @emph{only} be used if the pitches are @emph{not} being entered in
1503 Here are a few notes for violin and B-flat clarinet where the
1504 parts have been entered using the notes and key as they appear in
1505 each part of the conductor's score. The two instruments are
1508 @lilypond[verbatim,quote]
1510 \new Staff = "violin" {
1512 \set Staff.instrumentName = #"Vln"
1513 \set Staff.midiInstrument = #"violin"
1514 % not strictly necessary, but a good reminder
1521 \new Staff = "clarinet" {
1523 \set Staff.instrumentName = \markup { Cl (B\flat) }
1524 \set Staff.midiInstrument = #"clarinet"
1534 The @code{\transposition} may be changed during a piece. For
1535 example, a clarinetist may be required to switch from an A clarinet
1536 to a B-flat clarinet.
1538 @lilypond[verbatim,quote]
1539 flute = \relative c'' {
1541 \cueDuring #"clarinet" #DOWN {
1542 R1 _\markup\tiny "clarinet"
1544 R1 _\markup\tiny "clarinet"
1547 clarinet = \relative c'' {
1551 R1^\markup { muta in B\flat }
1556 \addQuote "clarinet" \clarinet
1558 \new Staff \with { instrumentName = #"Flute" }
1560 \new Staff \with { instrumentName = #"Cl (A)" }
1567 @rglos{concert pitch},
1568 @rglos{transposing instrument}.
1571 @ref{Quoting other voices},
1578 @node Automatic accidentals
1579 @unnumberedsubsubsec Automatic accidentals
1581 @cindex accidental style
1582 @cindex accidental style, default
1584 @cindex accidentals, automatic
1585 @cindex automatic accidentals
1586 @cindex default accidental style
1588 @funindex \accidentalStyle
1592 There are many different conventions on how to typeset
1593 accidentals. LilyPond provides a function to specify which
1594 accidental style to use. This function is called as follows:
1598 \accidentalStyle voice
1603 The accidental style applies to the current @code{Staff} by
1604 default (with the exception of the styles @code{piano} and
1605 @code{piano-cautionary}, which are explained below). Optionally,
1606 the function can take a second argument that determines in which
1607 scope the style should be changed. For example, to use the same
1608 style in all staves of the current @code{StaffGroup}, use:
1611 \accidentalStyle StaffGroup.voice
1614 The following accidental styles are supported. To demonstrate
1615 each style, we use the following example:
1618 @lilypond[verbatim,quote]
1622 cis''8 fis, bes4 <a cis>8 f bis4 |
1636 \voiceTwo \relative {
1637 <fis a cis>8[ <fis a cis>
1640 \change Staff = down
1645 \change Staff = down
1646 <fis, a cis>4 gis <f a d>2 |
1653 \context Staff = "up" {
1654 \accidentalStyle default
1657 \context Staff = "down" {
1658 \accidentalStyle default
1665 Note that the last lines of this example can be replaced by the
1666 following, as long as the same accidental style should be used in
1672 \context Staff = "up" @{
1673 %%% change the next line as desired:
1674 \accidentalStyle Score.default
1677 \context Staff = "down" @{
1685 @c don't use verbatim in this table.
1689 @cindex default accidental style
1690 @cindex accidental style, default
1694 This is the default typesetting behavior. It corresponds to
1695 eighteenth-century common practice: accidentals are remembered to
1696 the end of the measure in which they occur and only in their own
1697 octave. Thus, in the example below, no natural signs are printed
1698 before the@tie{}@code{b} in the second measure or the
1705 cis''8 fis, bes4 <a cis>8 f bis4 |
1719 \voiceTwo \relative {
1720 <fis a cis>8[ <fis a cis>
1723 \change Staff = down
1728 \change Staff = down
1729 <fis, a cis>4 gis <f a d>2 |
1736 \context Staff = "up" {
1737 \accidentalStyle default
1740 \context Staff = "down" {
1741 \accidentalStyle default
1750 @cindex accidental style, voice
1751 @cindex voice accidental style
1752 @cindex accidental style, modern
1753 @cindex modern accidental style
1754 @cindex accidental style, modern-cautionary
1755 @cindex modern-cautionary accidental style
1759 The normal behavior is to remember the accidentals at
1760 @code{Staff}-level. In this style, however, accidentals are
1761 typeset individually for each voice. Apart from that, the rule is
1762 similar to @code{default}.
1764 As a result, accidentals from one voice do not get canceled in
1765 other voices, which is often an unwanted result: in the following
1766 example, it is hard to determine whether the second@tie{}@code{a}
1767 should be played natural or sharp. The @code{voice} option should
1768 therefore be used only if the voices are to be read solely by
1769 individual musicians. If the staff is to be used by one musician
1770 (e.g., a conductor or in a piano score) then @code{modern} or
1771 @code{modern-cautionary} should be used instead.
1778 cis''8 fis, bes4 <a cis>8 f bis4 |
1792 \voiceTwo \relative {
1793 <fis a cis>8[ <fis a cis>
1796 \change Staff = down
1801 \change Staff = down
1802 <fis, a cis>4 gis <f a d>2 |
1809 \context Staff = "up" {
1810 \accidentalStyle voice
1813 \context Staff = "down" {
1814 \accidentalStyle voice
1823 @cindex accidentals, modern style
1824 @cindex modern style accidentals
1828 This rule corresponds to the common practice in the twentieth
1829 century. It omits some extra natural signs, which were
1830 traditionally prefixed to a sharp following a double sharp,
1831 or a flat following a double flat. The @code{modern} rule
1832 prints the same accidentals as @code{default}, with
1833 two additions that serve to avoid ambiguity: after temporary
1834 accidentals, cancellation marks are printed also in the following
1835 measure (for notes in the same octave) and, in the same measure,
1836 for notes in other octaves. Hence the naturals before
1837 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1844 cis''8 fis, bes4 <a cis>8 f bis4 |
1858 \voiceTwo \relative {
1859 <fis a cis>8[ <fis a cis>
1862 \change Staff = down
1867 \change Staff = down
1868 <fis, a cis>4 gis <f a d>2 |
1875 \context Staff = "up" {
1876 \accidentalStyle modern
1879 \context Staff = "down" {
1880 \accidentalStyle modern
1887 @item modern-cautionary
1889 @cindex accidentals, modern cautionary style
1890 @cindex modern accidental style
1891 @cindex modern cautionary accidental style
1892 @cindex modern style accidentals
1893 @cindex modern style cautionary accidentals
1895 @funindex modern-cautionary
1897 This rule is similar to @code{modern}, but the @q{extra} accidentals
1898 are printed as cautionary accidentals (with parentheses). They can also
1899 be printed at a different size by overriding
1900 @code{AccidentalCautionary}'s @code{font-size} property.
1906 cis''8 fis, bes4 <a cis>8 f bis4 |
1920 \voiceTwo \relative {
1921 <fis a cis>8[ <fis a cis>
1924 \change Staff = down
1929 \change Staff = down
1930 <fis, a cis>4 gis <f a d>2 |
1937 \context Staff = "up" {
1938 \accidentalStyle modern-cautionary
1941 \context Staff = "down" {
1942 \accidentalStyle modern-cautionary
1951 @cindex accidental style, modern
1952 @cindex accidentals, modern
1953 @cindex accidentals, multivoice
1954 @cindex modern accidental style
1955 @cindex modern accidentals
1956 @cindex multivoice accidentals
1958 @funindex modern-voice
1960 This rule is used for multivoice accidentals to be read both by
1961 musicians playing one voice and musicians playing all voices.
1962 Accidentals are typeset for each voice, but they @emph{are}
1963 canceled across voices in the same @code{Staff}. Hence,
1964 the@tie{}@code{a} in the last measure is canceled because the
1965 previous cancellation was in a different voice, and
1966 the@tie{}@code{d} in the lower staff is canceled because of the
1967 accidental in a different voice in the previous measure:
1973 cis''8 fis, bes4 <a cis>8 f bis4 |
1987 \voiceTwo \relative {
1988 <fis a cis>8[ <fis a cis>
1991 \change Staff = down
1996 \change Staff = down
1997 <fis, a cis>4 gis <f a d>2 |
2004 \context Staff = "up" {
2005 \accidentalStyle modern-voice
2008 \context Staff = "down" {
2009 \accidentalStyle modern-voice
2016 @cindex accidental style, cautionary, modern voice
2017 @cindex accidental style, modern voice cautionary
2018 @cindex accidental style, voice, modern cautionary
2020 @funindex modern-voice-cautionary
2022 @item modern-voice-cautionary
2024 This rule is the same as @code{modern-voice}, but with the extra
2025 accidentals (the ones not typeset by @code{voice}) typeset as
2026 cautionaries. Even though all accidentals typeset by
2027 @code{default} @emph{are} typeset with this rule, some of them are
2028 typeset as cautionaries.
2034 cis''8 fis, bes4 <a cis>8 f bis4 |
2048 \voiceTwo \relative {
2049 <fis a cis>8[ <fis a cis>
2052 \change Staff = down
2057 \change Staff = down
2058 <fis, a cis>4 gis <f a d>2 |
2065 \context Staff = "up" {
2066 \accidentalStyle modern-voice-cautionary
2069 \context Staff = "down" {
2070 \accidentalStyle modern-voice-cautionary
2079 @cindex accidental style, piano
2080 @cindex accidentals, piano
2081 @cindex piano accidental style
2082 @cindex piano accidentals
2086 This rule reflects twentieth-century practice for piano notation.
2087 Its behavior is very similar to @code{modern} style, but here
2088 accidentals also get canceled across the staves in the same
2089 @code{GrandStaff} or @code{PianoStaff}, hence all the
2090 cancellations of the final notes.
2092 This accidental style applies to the current @code{GrandStaff} or
2093 @code{PianoStaff} by default.
2099 cis''8 fis, bes4 <a cis>8 f bis4 |
2113 \voiceTwo \relative {
2114 <fis a cis>8[ <fis a cis>
2117 \change Staff = down
2122 \change Staff = down
2123 <fis, a cis>4 gis <f a d>2 |
2130 \context Staff = "up" {
2131 \accidentalStyle piano
2134 \context Staff = "down" {
2141 @item piano-cautionary
2143 @cindex accidentals, piano cautionary
2144 @cindex cautionary accidentals, piano
2145 @cindex piano cautionary accidentals
2146 @cindex accidental style, piano cautionary
2147 @cindex cautionary accidental style, piano
2148 @cindex piano cautionary accidental style
2150 @funindex piano-cautionary
2152 This is the same as @code{piano} but with the extra accidentals
2153 typeset as cautionaries.
2159 cis''8 fis, bes4 <a cis>8 f bis4 |
2173 \voiceTwo \relative {
2174 <fis a cis>8[ <fis a cis>
2177 \change Staff = down
2182 \change Staff = down
2183 <fis, a cis>4 gis <f a d>2 |
2190 \context Staff = "up" {
2191 \accidentalStyle piano-cautionary
2194 \context Staff = "down" {
2204 @cindex neo-modern accidental style
2205 @cindex accidental style, neo-modern
2207 @funindex neo-modern
2209 This rule reproduces a common practice in contemporary music:
2210 accidentals are printed like with @code{modern}, but they are printed
2211 again if the same note appears later in the same measure -- except
2212 if the note is immediately repeated.
2218 cis''8 fis, bes4 <a cis>8 f bis4 |
2232 \voiceTwo \relative {
2233 <fis a cis>8[ <fis a cis>
2236 \change Staff = down
2241 \change Staff = down
2242 <fis, a cis>4 gis <f a d>2 |
2249 \context Staff = "up" {
2250 \accidentalStyle neo-modern
2253 \context Staff = "down" {
2254 \accidentalStyle neo-modern
2261 @item neo-modern-cautionary
2263 @cindex neo-modern-cautionary accidental style
2264 @cindex accidental style, neo-modern-cautionary
2266 @funindex neo-modern-cautionary
2268 This rule is similar to @code{neo-modern}, but the @q{extra} accidentals
2269 are printed as cautionary accidentals (with parentheses). They can also
2270 be printed at a different size by overriding
2271 @code{AccidentalCautionary}'s @code{font-size} property.
2277 cis''8 fis, bes4 <a cis>8 f bis4 |
2291 \voiceTwo \relative {
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-cautionary
2312 \context Staff = "down" {
2313 \accidentalStyle neo-modern-cautionary
2321 @item neo-modern-voice
2323 @cindex neo-modern-voice accidental style
2324 @cindex accidental style, neo-modern-voice
2326 @funindex neo-modern-voice
2328 This rule is used for multivoice accidentals to be read both by
2329 musicians playing one voice and musicians playing all voices.
2330 Accidentals are typeset for each voice as with @code{neo-modern},
2331 but they are canceled across voices in the same @code{Staff}.
2337 cis''8 fis, bes4 <a cis>8 f bis4 |
2351 \voiceTwo \relative {
2352 <fis a cis>8[ <fis a cis>
2355 \change Staff = down
2360 \change Staff = down
2361 <fis, a cis>4 gis <f a d>2 |
2368 \context Staff = "up" {
2369 \accidentalStyle neo-modern-voice
2372 \context Staff = "down" {
2373 \accidentalStyle neo-modern-voice
2380 @item neo-modern-voice-cautionary
2382 @cindex neo-modern-voice-cautionary accidental style
2383 @cindex accidental style, neo-modern-voice-cautionary
2385 @funindex neo-modern-voice-cautionary
2387 This rule is similar to @code{neo-modern-voice}, but the extra
2388 accidentals are printed as cautionary accidentals.
2394 cis''8 fis, bes4 <a cis>8 f bis4 |
2408 \voiceTwo \relative {
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 neo-modern-voice-cautionary
2429 \context Staff = "down" {
2430 \accidentalStyle neo-modern-voice-cautionary
2439 @cindex dodecaphonic accidental style
2440 @cindex dodecaphonic style, neo-modern
2442 @funindex dodecaphonic
2444 This rule reflects a practice introduced by composers at
2445 the beginning of the 20th century, in an attempt to
2446 abolish the hierarchy between natural and non-natural notes.
2447 With this style, @emph{every} note gets an accidental sign,
2448 including natural signs.
2454 cis''8 fis, bes4 <a cis>8 f bis4 |
2468 \voiceTwo \relative {
2469 <fis a cis>8[ <fis a cis>
2472 \change Staff = down
2477 \change Staff = down
2478 <fis, a cis>4 gis <f a d>2 |
2485 \context Staff = "up" {
2486 \accidentalStyle dodecaphonic
2489 \context Staff = "down" {
2490 \accidentalStyle dodecaphonic
2497 @item dodecaphonic-no-repeat
2499 @cindex dodecaphonic accidental style
2500 @cindex dodecaphonic style, neo-modern
2502 @funindex dodecaphonic-no-repeat
2504 Like with the dodecaphonic accidental style @emph{every} note
2505 gets an accidental sign by default, but accidentals are
2506 suppressed for pitches immediately repeated within the same staff.
2512 cis''8 fis, bes4 <a cis>8 f bis4 |
2526 \voiceTwo \relative {
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-no-repeat
2547 \context Staff = "down" {
2548 \accidentalStyle dodecaphonic-no-repeat
2556 @item dodecaphonic-first
2558 @cindex dodecaphonic accidental style
2559 @cindex dodecaphonic style, neo-modern
2561 @funindex dodecaphonic-first
2563 Similar to the dodecaphonic accidental style @emph{every} pitch
2564 gets an accidental sign, but only the first time it is encountered
2565 in a measure. Accidentals are only remembered for the actual octave
2566 but throughout voices.
2572 cis''8 fis, bes4 <a cis>8 f bis4 |
2586 \voiceTwo \relative {
2587 <fis a cis>8[ <fis a cis>
2590 \change Staff = down
2595 \change Staff = down
2596 <fis, a cis>4 gis <f a d>2 |
2603 \context Staff = "up" {
2604 \accidentalStyle dodecaphonic-first
2607 \context Staff = "down" {
2608 \accidentalStyle dodecaphonic-first
2618 @cindex teaching accidental style
2619 @cindex accidental style, teaching
2623 This rule is intended for students, and makes it easy to create
2624 scale sheets with automatically created cautionary accidentals.
2625 Accidentals are printed like with @code{modern}, but cautionary
2626 accidentals are added for all sharp or flat tones specified by the
2627 key signature, except if the note is immediately repeated.
2629 @lilypond[quote,staffsize=18]
2633 cis''8 fis, bes4 <a cis>8 f bis4 |
2647 \voiceTwo \relative {
2648 <fis a cis>8[ <fis a cis>
2651 \change Staff = down
2656 \change Staff = down
2657 <fis, a cis>4 gis <f a d>2 |
2664 \context Staff = "up" {
2666 \accidentalStyle teaching
2669 \context Staff = "down" {
2671 \accidentalStyle teaching
2682 @cindex accidental style, no reset
2683 @cindex no reset accidental style
2687 This is the same as @code{default} but with accidentals lasting
2688 @q{forever} and not only within the same measure:
2694 cis''8 fis, bes4 <a cis>8 f bis4 |
2708 \voiceTwo \relative {
2709 <fis a cis>8[ <fis a cis>
2712 \change Staff = down
2717 \change Staff = down
2718 <fis, a cis>4 gis <f a d>2 |
2725 \context Staff = "up" {
2726 \accidentalStyle no-reset
2729 \context Staff = "down" {
2730 \accidentalStyle no-reset
2739 @cindex forget accidental style
2740 @cindex accidental style, forget
2744 This is the opposite of @code{no-reset}: Accidentals are not
2745 remembered at all -- and hence all accidentals are typeset
2746 relative to the key signature, regardless of what came before in
2753 cis''8 fis, bes4 <a cis>8 f bis4 |
2767 \voiceTwo \relative {
2768 <fis a cis>8[ <fis a cis>
2771 \change Staff = down
2776 \change Staff = down
2777 <fis, a cis>4 gis <f a d>2 |
2784 \context Staff = "up" {
2785 \accidentalStyle forget
2788 \context Staff = "down" {
2789 \accidentalStyle forget
2801 Internals Reference:
2802 @rinternals{Accidental},
2803 @rinternals{Accidental_engraver},
2804 @rinternals{GrandStaff},
2805 @rinternals{PianoStaff},
2807 @rinternals{AccidentalSuggestion},
2808 @rinternals{AccidentalPlacement},
2809 @rinternals{accidental-suggestion-interface}.
2811 @cindex accidentals and simultaneous notes
2812 @cindex simultaneous notes and accidentals
2813 @cindex accidentals in chords
2814 @cindex chords, accidentals in
2817 Simultaneous notes are not considered in the automatic
2818 determination of accidentals; only previous notes and the key
2819 signature are considered. Forcing accidentals with@tie{}@code{!}
2820 or@tie{}@code{?} may be required when the same note name occurs
2821 simultaneously with different alterations, as in @samp{<f! fis!>}.
2823 Cautionary cancellation of accidentals is done by looking at previous measure.
2824 However, in the @code{\alternative} block following a @code{\repeat volta N}
2825 section, one would expect the cancellation being calculated using the previous
2826 @emph{played} measure, not previous @emph{printed} measure.
2827 In the following example, the natural @code{c} in the second alternative does
2828 not need a natural sign:
2832 \accidentalStyle modern
2844 The following work-around can be used: define a function that locally changes
2845 the accidental style to @code{forget}:
2847 @lilypond[verbatim,quote]
2848 forget = #(define-music-function (music) (ly:music?) #{
2849 \accidentalStyle forget
2851 \accidentalStyle modern
2854 \accidentalStyle modern
2868 @unnumberedsubsubsec Ambitus
2871 @cindex range of pitches
2874 The term @notation{ambitus} (pl. ambitus) denotes a range of
2875 pitches for a given voice in a part of music. It may also denote
2876 the pitch range that a musical instrument is capable of playing.
2877 Ambitus are printed on vocal parts so that performers can easily
2878 determine if it matches their capabilities.
2880 Ambitus are denoted at the beginning of a piece near the initial
2881 clef. The range is graphically specified by two note heads that
2882 represent the lowest and highest pitches. Accidentals are only
2883 printed if they are not part of the key signature.
2885 @lilypond[verbatim,quote]
2889 \consists "Ambitus_engraver"
2902 @lilypondfile[verbatim,quote,texidoc,doctitle]
2903 {adding-ambitus-per-voice.ly}
2905 @lilypondfile[verbatim,quote,texidoc,doctitle]
2906 {ambitus-with-multiple-voices.ly}
2908 @lilypondfile[verbatim,quote,texidoc,doctitle]
2909 {changing-the-ambitus-gap.ly}
2918 Internals Reference:
2919 @rinternals{Ambitus_engraver},
2922 @rinternals{Ambitus},
2923 @rinternals{AmbitusAccidental},
2924 @rinternals{AmbitusLine},
2925 @rinternals{AmbitusNoteHead},
2926 @rinternals{ambitus-interface}.
2929 There is no collision handling in the case of multiple per-voice
2934 @subsection Note heads
2936 This section suggests ways of altering note heads.
2939 * Special note heads::
2940 * Easy notation note heads::
2941 * Shape note heads::
2945 @node Special note heads
2946 @unnumberedsubsubsec Special note heads
2948 @cindex note heads, special
2949 @cindex note heads, cross
2950 @cindex note heads, diamond
2951 @cindex note heads, parlato
2952 @cindex note heads, harmonic
2953 @cindex note heads, guitar
2954 @cindex special note heads
2955 @cindex cross note heads
2956 @cindex diamond note heads
2957 @cindex parlato note heads
2958 @cindex harmonic note heads
2959 @cindex guitar note heads
2960 @cindex note head styles
2961 @cindex styles, note heads
2965 The appearance of note heads may be altered:
2967 @lilypond[verbatim,quote,relative=2]
2969 \override NoteHead.style = #'cross
2971 \revert NoteHead.style
2973 \override NoteHead.style = #'harmonic
2975 \revert NoteHead.style
2979 To see all note head styles, see @ref{Note head styles}.
2981 The @code{cross} style is used to represent a variety of musical
2982 intentions. The following generic predefined commands modify the
2983 note head in both staff and tablature contexts and can be used to
2984 represent any musical meaning:
2986 @lilypond[verbatim,quote,relative=2]
2994 The music function form of this predefined command may be used
2995 inside and outside chords to generate crossed note heads in both
2996 staff and tablature contexts:
2998 @lilypond[verbatim,quote,relative=2]
3001 c b < g \xNote c f > b
3004 As synonyms for @code{\xNote}, @code{\xNotesOn} and @code{\xNotesOff},
3005 @code{\deadNote}, @code{\deadNotesOn} and @code{\deadNotesOff} can
3006 be used. The term @notation{dead note} is commonly used by guitarists.
3008 There is also a similar shorthand for diamond shapes:
3010 @lilypond[verbatim,quote,relative=2]
3011 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic
3026 @ref{Note head styles},
3027 @ref{Chorded notes},
3028 @ref{Indicating harmonics and dampened notes}.
3030 Internals Reference:
3031 @rinternals{note-event},
3032 @rinternals{Note_heads_engraver},
3033 @rinternals{Ledger_line_engraver},
3034 @rinternals{NoteHead},
3035 @rinternals{LedgerLineSpanner},
3036 @rinternals{note-head-interface},
3037 @rinternals{ledger-line-spanner-interface}.
3040 @node Easy notation note heads
3041 @unnumberedsubsubsec Easy notation note heads
3043 @cindex note heads, practice
3044 @cindex practice note heads
3045 @cindex note heads, easy notation
3046 @cindex easy notation
3047 @cindex beginners' music
3048 @cindex music, beginners'
3049 @cindex easy play note heads
3050 @cindex note heads, easy play
3052 @funindex \easyHeadsOn
3053 @funindex easyHeadsOn
3054 @funindex \easyHeadsOff
3055 @funindex easyHeadsOff
3057 The @q{easy play} note head includes a note name inside the head.
3058 It is used in music for beginners. To make the letters readable,
3059 it should be printed in a large font size. To print with a larger
3060 font, see @ref{Setting the staff size}.
3062 @lilypond[verbatim,quote]
3063 #(set-global-staff-size 26)
3075 @code{\easyHeadsOn},
3076 @code{\easyHeadsOff}.
3082 @lilypondfile[verbatim,quote,texidoc,doctitle]
3083 {numbers-as-easy-note-heads.ly}
3087 @ref{Setting the staff size}.
3092 Internals Reference:
3093 @rinternals{note-event},
3094 @rinternals{Note_heads_engraver},
3095 @rinternals{NoteHead},
3096 @rinternals{note-head-interface}.
3099 @node Shape note heads
3100 @unnumberedsubsubsec Shape note heads
3102 @cindex note heads, shape
3103 @cindex note heads, Aiken
3104 @cindex note heads, sacred harp
3106 @cindex Aiken shape note heads
3107 @cindex sacred harp note heads
3108 @cindex note heads, Southern Harmony
3109 @cindex Southern Harmony note heads
3110 @cindex Funk shape note heads
3111 @cindex note heads, Funk
3112 @cindex note heads, Harmonica Sacra
3113 @cindex Harmonica Sacra note heads
3114 @cindex Christian Harmony note heads
3115 @cindex note heads, Christian Harmony
3116 @cindex Walker shape note heads
3117 @cindex note heads, Walker
3119 @funindex \aikenHeads
3120 @funindex aikenHeads
3121 @funindex \sacredHarpHeads
3122 @funindex sacredHarpHeads
3123 @funindex \southernHarmonyHeads
3124 @funindex southernHarmonyHeads
3125 @funindex \funkHeads
3127 @funindex \walkerHeads
3128 @funindex walkerHeads
3130 In shape note head notation, the shape of the note head
3131 corresponds to the harmonic function of a note in the scale. This
3132 notation was popular in nineteenth-century American song books.
3133 Shape note heads can be produced in Sacred Harp, Southern Harmony,
3134 Funk (Harmonica Sacra), Walker, and Aiken (Christian Harmony) styles:
3136 @lilypond[verbatim,quote,relative=2]
3138 c, d e f g2 a b1 c \break
3140 c,4 d e f g2 a b1 c \break
3141 \southernHarmonyHeads
3142 c,4 d e f g2 a b1 c \break
3144 c,4 d e f g2 a b1 c \break
3146 c,4 d e f g2 a b1 c \break
3151 @funindex \aikenHeadsMinor
3152 @funindex aikenHeadsMinor
3153 @funindex \sacredHarpHeadsMinor
3154 @funindex sacredHarpHeadsMinor
3155 @funindex \southernHarmonyHeadsMinor
3156 @funindex southernHarmonyHeadsMinor
3157 @funindex \funkHeadsMinor
3158 @funindex funkHeadsMinor
3159 @funindex \walkerHeadsMinor
3160 @funindex walkerHeadsMinor
3162 Shapes are typeset according to the step in the scale, where the base
3163 of the scale is determined by the @code{\key} command. When writing
3164 in a minor key, the scale step can be determined from the relative
3167 @lilypond[verbatim,quote,relative=2]
3170 a b c d e2 f g1 a \break
3172 a,4 b c d e2 f g1 a \break
3173 \sacredHarpHeadsMinor
3175 \southernHarmonyHeadsMinor
3187 @code{\aikenHeadsMinor},
3189 @code{\funkHeadsMinor},
3190 @code{\sacredHarpHeads},
3191 @code{\sacredHarpHeadsMinor},
3192 @code{\southernHarmonyHeads},
3193 @code{\southernHarmonyHeadsMinor},
3194 @code{\walkerHeads},
3195 @code{\walkerHeadsMinor}.
3201 @lilypondfile[verbatim,quote,texidoc,doctitle]
3202 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
3204 To see all note head styles, see @ref{Note head styles}.
3211 @ref{Note head styles}.
3213 Internals Reference:
3214 @rinternals{note-event},
3215 @rinternals{Note_heads_engraver},
3216 @rinternals{NoteHead},
3217 @rinternals{note-head-interface}.
3221 @unnumberedsubsubsec Improvisation
3223 @cindex improvisation
3224 @cindex slashed note heads
3225 @cindex note heads, improvisation
3226 @cindex note heads, slashed
3228 @funindex \improvisationOn
3229 @funindex improvisationOn
3230 @funindex \improvisationOff
3231 @funindex improvisationOff
3233 Improvisation is sometimes denoted with slashed note heads, where
3234 the performer may choose any pitch but should play the specified
3235 rhythm. Such note heads can be created:
3237 @lilypond[verbatim,quote,relative=2]
3239 \consists "Pitch_squash_engraver"
3241 e8 e g a a16( bes) a8 g
3252 @code{\improvisationOn},
3253 @code{\improvisationOff}.
3260 Internals Reference:
3261 @rinternals{Pitch_squash_engraver},
3263 @rinternals{RhythmicStaff}.