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]
91 Common octave marks can be entered just once on a reference pitch
92 after @code{\fixed} placed before the music. Pitches inside
93 @code{\fixed} only need @code{'} or@tie{}@code{,} marks
94 when they are above or below the octave of the reference pitch.
96 @lilypond[verbatim,quote]
111 Pitches in the music expression following @code{\fixed} are
112 unaffected by any enclosing @code{\relative}, discussed next.
122 @node Relative octave entry
123 @unnumberedsubsubsec Relative octave entry
126 @cindex relative octave entry
127 @cindex octave entry, relative
128 @cindex relative octave specification
129 @cindex octave specification, relative
133 Absolute octave entry requires specifying the octave for every
134 single note. Relative octave entry, in contrast, specifies each
135 octave in relation to the last note: changing one note's octave
136 will affect all of the following notes.
138 Relative note mode has to be entered explicitly using the
139 @code{\relative} command:
142 \relative @var{startpitch} @var{musicexpr}
145 In relative mode, each note is assumed to be as close to the
146 previous note as possible. This means that the octave of each
147 pitch inside @code{@var{musicexpr}} is calculated as follows:
151 If no octave changing mark is used on a pitch, its octave is
152 calculated so that the interval with the previous note is less
153 than a fifth. This interval is determined without considering
157 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be
158 added to respectively raise or lower a pitch by an extra octave,
159 relative to the pitch calculated without an octave mark.
162 Multiple octave changing marks can be used. For example,
163 @code{''}@tie{}and@tie{}@code{,,} will alter the pitch by two
167 The pitch of the first note is relative to
168 @code{@var{startpitch}}. @code{@var{startpitch}} is specified in
169 absolute octave mode. Which choices are meaningful?
172 @item an octave of @code{c}
173 Identifying middle C with @code{c'} is quite basic, so finding
174 octaves of @code{c} tends to be straightforward. If your music
175 starts with @code{gis} above @code{c'''}, you'd write something
176 like @code{\relative c''' @{ gis' @dots{} @}}
178 @item an octave of the first note inside
179 Writing @code{\relative gis''' @{ gis @dots{} @}} makes it easy to
180 determine the absolute pitch of the first note inside.
182 @item no explicit starting pitch
183 The form @code{\relative @{ gis''' @dots{} @}} serves
184 as a compact version of the previous option: the first note
185 inside is written in absolute pitch itself. (This happens to be
186 equivalent to choosing @code{f} as the reference pitch.)
189 The documentation will usually employ the last option.
192 Here is the relative mode shown in action:
194 @lilypond[verbatim,quote]
203 Octave changing marks are used for intervals greater than a
206 @lilypond[verbatim,quote]
213 A note sequence without a single octave mark can nevertheless span
216 @lilypond[verbatim,quote]
223 When @code{\relative} blocks are nested, the innermost
224 @code{\relative} block starts with its own reference pitch
225 independently of the outer @code{\relative}.
227 @lilypond[verbatim,quote]
236 @code{\relative} has no effect on @code{\chordmode} blocks.
238 @lilypond[verbatim,quote]
247 @code{\relative} is not allowed inside of @code{\chordmode} blocks.
249 Music inside a @code{\transpose} block is absolute unless a
250 @code{\relative} is included.
252 @lilypond[verbatim,quote]
265 @cindex chords and relative octave entry
266 @cindex relative octave entry and chords
268 If the preceding item is a chord, the first note of the chord is
269 used as the reference point for the octave placement of a
270 following note or chord. Inside chords, the next note is always
271 relative to the preceding one. Examine the next example
272 carefully, paying attention to the @code{c} notes.
274 @lilypond[verbatim,quote]
283 As explained above, the octave of pitches is calculated only with
284 the note names, regardless of any alterations. Therefore, an
285 E-double-sharp following a B will be placed higher, while an
286 F-double-flat will be placed lower. In other words, a
287 double-augmented fourth is considered a smaller interval than a
288 double-diminished fifth, regardless of the number of semitones
289 that each interval contains.
291 @lilypond[verbatim,quote]
314 @rinternals{RelativeOctaveMusic}.
316 @cindex relative octave entry and transposition
317 @cindex transposition and relative octave entry
325 @unnumberedsubsubsec Accidentals
328 @cindex key signature
331 @c duplicated in Key signature and Accidentals
332 @warning{New users are sometimes confused about accidentals and
333 key signatures. In LilyPond, note names specify pitches; key
334 signatures and clefs determine how these pitches are displayed.
335 An unaltered note like@tie{}@code{c} means @q{C natural},
336 regardless of the key signature or clef. For more information,
337 see @rlearning{Pitches and key signatures}.}
339 @cindex note names, Dutch
340 @cindex note names, default
341 @cindex default note names
345 @cindex sharp, double
349 @cindex natural pitch
351 A @notation{sharp} pitch is made by adding @code{is} to the note
352 name, and a @notation{flat} pitch by adding @code{es}. As you
353 might expect, a @notation{double sharp} or @notation{double flat}
354 is made by adding @code{isis} or @code{eses}. This syntax is
355 derived from Dutch note naming conventions. To use other names
356 for accidentals, see @ref{Note names in other languages}.
358 @lilypond[verbatim,quote,fragment]
359 \relative c'' { ais1 aes aisis aeses }
362 A natural pitch is entered as a simple note name; no suffix is
363 required. A natural sign will be printed when needed to cancel
364 the effect of an earlier accidental or key signature.
366 @lilypond[verbatim,quote,fragment]
367 \relative c'' { a4 aes a2 }
370 @cindex quarter tones
374 Quarter tones may be added; the following is a series of Cs with
377 @lilypond[verbatim,quote,fragment]
378 \relative c'' { ceseh1 ces ceh c cih cis cisih }
383 @cindex accidental, reminder
384 @cindex accidental, cautionary
385 @cindex accidental, parenthesized
386 @cindex reminder accidental
387 @cindex cautionary accidental
388 @cindex parenthesized accidental
394 Normally accidentals are printed automatically, but you may also
395 print them manually. A reminder accidental can be forced by
396 adding an exclamation mark@tie{}@code{!} after the pitch. A
397 cautionary accidental (i.e., an accidental within parentheses) can
398 be obtained by adding the question mark@tie{}@code{?} after the
401 @lilypond[verbatim,quote,fragment]
402 \relative c'' { cis cis cis! cis? c c c! c? }
405 @cindex accidental on tied note
406 @cindex tied note, accidental
408 Accidentals on tied notes are only printed at the beginning of a
411 @lilypond[verbatim,quote,fragment,ragged-right]
422 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
423 {hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly}
425 @lilypondfile[verbatim,quote,texidoc,doctitle]
426 {preventing-extra-naturals-from-being-automatically-added.ly}
432 @rglos{double sharp},
435 @rglos{quarter tone}.
438 @rlearning{Pitches and key signatures}.
441 @ref{Automatic accidentals},
442 @ref{Annotational accidentals (musica ficta)},
443 @ref{Note names in other languages}.
449 @rinternals{Accidental_engraver},
450 @rinternals{Accidental},
451 @rinternals{AccidentalCautionary},
452 @rinternals{accidental-interface}.
454 @cindex accidental, quarter-tone
455 @cindex quarter-tone accidental
458 There are no generally accepted standards for denoting
459 quarter-tone accidentals, so LilyPond's symbol does not conform to
463 @node Note names in other languages
464 @unnumberedsubsubsec Note names in other languages
466 @cindex note names, other languages
467 @cindex pitch names, other languages
468 @cindex language, note names in other
469 @cindex language, pitch names in other
471 There are predefined sets of note and accidental names for various
472 other languages. Selecting the note name language is usually done
473 at the beginning of the file; the following example is written
474 using Italian note names:
476 @lilypond[quote,verbatim]
484 The available languages and the note names they define are:
487 @multitable {@code{nederlands}} {do re/re mi fa sol la sib si}
490 @item @code{nederlands}
491 @tab c d e f g a bes b
493 @tab do re mi fa sol la sib si
497 @tab c d e f g a bf b
498 @item @code{espanol} or @code{español}
499 @tab do re mi fa sol la sib si
500 @item @code{français}
501 @tab do ré/re mi fa sol la sib si
502 @item @code{italiano}
503 @tab do re mi fa sol la sib si
506 @item @code{portugues}
507 @tab do re mi fa sol la sib si
513 @tab do re mi fa sol la sib si
517 In addition to note names, accidental suffixes may
518 also vary depending on the language:
521 @multitable {@code{nederlands}} {-@code{s}/-@code{-sharp}} {-@code{ess}/-@code{es}} {-@code{ss}/-@code{x}/-@code{-sharpsharp}} {-@code{essess}/-@code{eses}}
523 @tab sharp @tab flat @tab double sharp @tab double flat
524 @item @code{nederlands}
525 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
527 @tab -@code{d}/-@code{s} @tab -@code{b} @tab -@code{dd}/-@code{ss} @tab -@code{bb}
529 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
531 @tab -@code{s}/-@code{-sharp} @tab -@code{f}/-@code{-flat} @tab -@code{ss}/-@code{x}/-@code{-sharpsharp}
532 @tab -@code{ff}/-@code{-flatflat}
533 @item @code{espanol} or @code{español}
534 @tab -@code{s} @tab -@code{b} @tab -@code{ss}/-@code{x} @tab -@code{bb}
535 @item @code{français}
536 @tab -@code{d} @tab -@code{b} @tab -@code{dd}/-@code{x} @tab -@code{bb}
537 @item @code{italiano}
538 @tab -@code{d} @tab -@code{b} @tab -@code{dd} @tab -@code{bb}
540 @tab -@code{iss}/-@code{is} @tab -@code{ess}/-@code{es} @tab -@code{ississ}/-@code{isis}
541 @tab -@code{essess}/-@code{eses}
542 @item @code{portugues}
543 @tab -@code{s} @tab -@code{b} @tab -@code{ss} @tab -@code{bb}
545 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
547 @tab -@code{iss} @tab -@code{ess} @tab -@code{ississ} @tab -@code{essess}
549 @tab -@code{k} @tab -@code{b} @tab -@code{kk} @tab -@code{bb}
553 In Dutch, @code{aes} is contracted to @code{as}, but both forms
554 are accepted in LilyPond. Similarly, both @code{es} and
555 @code{ees} are accepted. This also applies to
556 @code{aeses}@tie{}/@tie{}@code{ases} and
557 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
558 contracted names are defined in the corresponding language files.
560 @lilypond[verbatim,quote,fragment]
561 \relative c'' { a2 as e es a ases e eses }
571 Some music uses microtones whose alterations are fractions of a
572 @q{normal} sharp or flat. The following table lists note names
573 for quarter-tone accidentals in various languages; here the prefixes
574 @notation{semi-} and @notation{sesqui-} respectively
575 mean @q{half} and @q{one and a half}. Languages that do not
576 appear in this table do not provide special note names yet.
579 @multitable {@code{nederlands}} {@b{semi-sharp}} {@b{semi-flat}} {@b{sesqui-sharp}} {@b{sesqui-flat}}
581 @tab semi-sharp @tab semi-flat @tab sesqui-sharp @tab sesqui-flat
583 @item @code{nederlands}
584 @tab -ih @tab -eh @tab -isih @tab -eseh
586 @tab -ih @tab -eh @tab -isih @tab -eseh
588 @tab -qs @tab -qf @tab -tqs @tab -tqf
589 @item @code{espanol} or @code{español}
590 @tab -cs @tab -cb @tab -tcs @tab -tcb
591 @item @code{français}
592 @tab -sd @tab -sb @tab -dsd @tab -bsb
593 @item @code{italiano}
594 @tab -sd @tab -sb @tab -dsd @tab -bsb
595 @item @code{portugues}
596 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
600 Most languages presented here are commonly associated with
601 Western classical music, also referred to as
602 @notation{Common Practice Period}. However, alternate
603 pitches and tuning systems are also supported: see
604 @ref{Common notation for non-Western music}.
609 @rglos{Common Practice Period}.
612 @ref{Common notation for non-Western music}.
615 @file{scm/define-note-names.scm}.
621 @node Changing multiple pitches
622 @subsection Changing multiple pitches
624 This section discusses how to modify pitches.
631 * Modal transformations::
635 @unnumberedsubsubsec Octave checks
637 @cindex octave correction
639 @cindex control pitch
642 @funindex \octaveCheck
643 @funindex controlpitch
645 In relative mode, it is easy to forget an octave changing mark.
646 Octave checks make such errors easier to find by displaying a
647 warning and correcting the octave if a note is found in an
650 To check the octave of a note, specify the absolute octave after
651 the @code{=}@tie{}symbol. This example will generate a warning
652 (and change the pitch) because the second note is the absolute
653 octave @code{d''} instead of @code{d'} as indicated by the octave
656 @lilypond[verbatim,quote]
663 The octave of notes may also be checked with the
664 @code{\octaveCheck@tie{}@var{controlpitch}} command.
665 @code{@var{controlpitch}} is specified in absolute mode. This
666 checks that the interval between the previous note and the
667 @code{@var{controlpitch}} is within a fourth (i.e., the normal
668 calculation of relative mode). If this check fails, a warning is
669 printed. While the previous note itself is not changed, future
670 notes are relative to the corrected value.
672 @lilypond[verbatim,quote]
680 Compare the two bars below. The first and third @code{\octaveCheck}
681 checks fail, but the second one does not fail.
683 @lilypond[verbatim,quote]
702 @rinternals{RelativeOctaveCheck}.
706 @unnumberedsubsubsec Transpose
710 @cindex transposition
711 @cindex transposition of pitches
712 @cindex transposition of notes
713 @cindex pitches, transposition of
714 @cindex notes, transposition of
718 A music expression can be transposed with @code{\transpose}. The
722 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
726 This means that @code{@var{musicexpr}} is transposed by the
727 interval between the pitches @code{@var{frompitch}} and
728 @code{@var{topitch}}: any note with pitch @code{@var{frompitch}}
729 is changed to @code{@var{topitch}} and any other note is
730 transposed by the same interval. Both pitches are entered in
733 @warning{Music inside a @code{@bs{}transpose} block is absolute
734 unless a @code{@bs{}relative} is included in the block.}
736 Consider a piece written in the key of D-major. It can be
737 transposed up to E-major; note that the key signature is
738 automatically transposed as well.
740 @lilypond[verbatim,quote]
749 @cindex transposing instruments
750 @cindex instruments, transposing
752 If a part written in C (normal @notation{concert pitch}) is to be
753 played on the A clarinet (for which an A is notated as a C and
754 thus sounds a minor third lower than notated), the appropriate
755 part will be produced with:
757 @lilypond[verbatim,quote]
767 Note that we specify @w{@code{\key c \major}} explicitly. If we
768 do not specify a key signature, the notes will be transposed but
769 no key signature will be printed.
771 @code{\transpose} distinguishes between enharmonic pitches: both
772 @w{@code{\transpose c cis}} or @w{@code{\transpose c des}} will
773 transpose up a semitone. The first version will print sharps and
774 the notes will remain on the same scale step, the second version
775 will print flats on the scale step above.
777 @lilypond[verbatim,quote]
778 music = \relative { c' d e f }
780 \transpose c cis { \music }
781 \transpose c des { \music }
786 @code{\transpose} may also be used in a different way, to input
787 written notes for a transposing instrument. The previous examples
788 show how to enter pitches in C (or @notation{concert pitch}) and
789 typeset them for a transposing instrument, but the opposite is
790 also possible if you for example have a set of instrumental parts
791 and want to print a conductor's score. For example, when entering
792 music for a B-flat trumpet that begins on a notated E (concert D),
796 musicInBflat = @{ e4 @dots{} @}
797 \transpose c bes, \musicInBflat
801 To print this music in F (e.g., rearranging to a French horn) you
802 could wrap the existing music with another @code{\transpose}:
805 musicInBflat = @{ e4 @dots{} @}
806 \transpose f c' @{ \transpose c bes, \musicInBflat @}
810 For more information about transposing instruments,
811 see @ref{Instrument transpositions}.
816 @lilypondfile[verbatim,quote,texidoc,doctitle]
817 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
821 @ref{Instrument transpositions},
823 @ref{Modal transformations},
824 @ref{Relative octave entry},
831 @rinternals{TransposedMusic}.
838 The relative conversion will not affect @code{\transpose},
839 @code{\chordmode} or @code{\relative} sections in its argument. To use
840 relative mode within transposed music, an additional @code{\relative}
841 must be placed inside @code{\transpose}.
843 Triple accidentals will not be printed if using @code{\transpose}. An
844 @q{enharmonically equivalent} pitch will be used instead (e.g., d-flat
845 rather than e-triple-flat).
849 @unnumberedsubsubsec Inversion
852 @cindex operation, inversion
855 A music expression can be inverted and transposed in a single
859 \inversion @var{around-pitch} @var{to-pitch} @var{musicexpr}
862 The @code{@var{musicexpr}} is inverted interval-by-interval around
863 @code{@var{around-pitch}}, and then transposed so that
864 @code{@var{around-pitch}} is mapped to @code{@var{to-pitch}}.
866 @lilypond[verbatim,quote]
867 music = \relative { c' d e f }
870 \inversion d' d' \music
871 \inversion d' ees' \music
875 @warning{Motifs to be inverted should be expressed in absolute form
876 or be first converted to absolute form by enclosing them in a
877 @code{\relative} block.}
881 @ref{Modal transformations},
887 @unnumberedsubsubsec Retrograde
889 @cindex retrograde transformation
890 @cindex transformation, retrograde
891 @cindex operation, retrograde
892 @funindex \retrograde
894 A music expression can be reversed to produce its retrograde:
896 @lilypond[verbatim,quote]
897 music = \relative { c'8. ees16( fis8. a16 b8.) gis16 f8. d16 }
906 Manual ties inside @code{\retrograde} will be broken and
907 generate warnings. Some ties can be generated automatically
908 by enabling @ref{Automatic note splitting}.
913 @ref{Modal transformations},
917 @node Modal transformations
918 @unnumberedsubsubsec Modal transformations
920 @cindex modal transformations
921 @cindex transformations, modal
922 @cindex operations, modal
924 In a musical composition that is based on a scale, a motif is
925 frequently transformed in various ways. It may be
926 @notation{transposed} to start at different places in the scale or
927 it may be @notation{inverted} around a pivot point in the scale.
928 It may also be reversed to produce its @notation{retrograde}, see
931 @warning{Any note that does not lie within the given scale will be
934 @subsubsubheading Modal transposition
936 @cindex modal transposition
937 @cindex transposition, modal
938 @cindex operation, transposition
939 @funindex \modalTranspose
941 A motif can be transposed within a given scale with:
944 \modalTranspose @var{from-pitch} @var{to-pitch} @var{scale} @var{motif}
947 The notes of @var{motif} are shifted within the @var{scale} by the
948 number of scale degrees given by the interval between @var{to-pitch}
949 and @var{from-pitch}:
951 @lilypond[verbatim,quote]
952 diatonicScale = \relative { c' d e f g a b }
953 motif = \relative { c'8 d e f g a b c }
957 \modalTranspose c f \diatonicScale \motif
958 \modalTranspose c b, \diatonicScale \motif
962 An ascending scale of any length and with any intervals may be
965 @lilypond[verbatim,quote]
966 pentatonicScale = \relative { ges aes bes des ees }
967 motif = \relative { ees'8 des ges,4 <ges' bes,> <ges bes,> }
971 \modalTranspose ges ees' \pentatonicScale \motif
975 When used with a chromatic scale @code{\modalTranspose} has a
976 similar effect to @code{\transpose}, but with the ability to
977 specify the names of the notes to be used:
979 @lilypond[verbatim,quote]
980 chromaticScale = \relative { c' cis d dis e f fis g gis a ais b }
981 motif = \relative { c'8 d e f g a b c }
985 \transpose c f \motif
986 \modalTranspose c f \chromaticScale \motif
990 @subsubsubheading Modal inversion
992 @cindex modal inversion
993 @cindex inversion, modal
994 @cindex operation, modal inversion
995 @funindex \modalInversion
997 A motif can be inverted within a given scale around a given pivot
998 note and transposed in a single operation with:
1001 \modalInversion @var{around-pitch} @var{to-pitch} @var{scale} @var{motif}
1004 The notes of @var{motif} are placed the same number of scale degrees
1005 from the @var{around-pitch} note within the @var{scale}, but in the
1006 opposite direction, and the result is then shifted within the
1007 @var{scale} by the number of scale degrees given by the interval between
1008 @var{to-pitch} and @var{around-pitch}.
1010 So to simply invert around a note in the scale use the same value for
1011 @var{around-pitch} and @var{to-pitch}:
1013 @lilypond[verbatim,quote]
1014 octatonicScale = \relative { ees' f fis gis a b c d }
1015 motif = \relative { c'8. ees16 fis8. a16 b8. gis16 f8. d16 }
1019 \modalInversion fis' fis' \octatonicScale \motif
1023 To invert around a pivot between two notes in the scale, invert around
1024 one of the notes and then transpose by one scale degree. The two notes
1025 specified can be interpreted as bracketing the pivot point:
1027 @lilypond[verbatim,quote]
1028 scale = \relative { c' g' }
1029 motive = \relative { c' c g' c, }
1033 \modalInversion c' g' \scale \motive
1037 The combined operation of inversion and retrograde produce the
1038 retrograde-inversion:
1040 @lilypond[verbatim,quote]
1041 octatonicScale = \relative { ees' f fis gis a b c d }
1042 motif = \relative { c'8. ees16 fis8. a16 b8. gis16 f8. d16 }
1046 \retrograde \modalInversion c' c' \octatonicScale \motif
1057 @node Displaying pitches
1058 @subsection Displaying pitches
1060 This section discusses how to alter the output of pitches.
1066 * Instrument transpositions::
1067 * Automatic accidentals::
1073 @unnumberedsubsubsec Clef
1084 @cindex soprano clef
1085 @cindex mezzosoprano clef
1086 @cindex baritone clef
1087 @cindex varbaritone clef
1088 @cindex subbass clef
1090 @cindex ancient clef
1091 @cindex clef, ancient
1095 @cindex clef, treble
1096 @cindex clef, violin
1100 @cindex clef, french
1101 @cindex clef, soprano
1102 @cindex clef, mezzosoprano
1103 @cindex clef, baritone
1104 @cindex clef, varbaritone
1105 @cindex clef, subbass
1110 Without any explicit command, the default clef for LilyPond is the
1111 treble (or @emph{G}) clef.
1113 @lilypond[verbatim,quote,fragment,ragged-right]
1117 However, the clef can be changed by using the @code{\clef} command and
1118 an appropriate clef name. @emph{Middle C} is shown in each of the
1121 @lilypond[verbatim,quote,fragment]
1132 For the full range of possible clef names see @ref{Clef styles}.
1134 Specialized clefs, such as those used in @emph{Ancient} music, are
1135 described in @ref{Mensural clefs} and @ref{Gregorian clefs}. Music that
1136 requires tablature clefs is discussed in @ref{Default tablatures} and
1137 @ref{Custom tablatures}.
1140 @cindex Clefs with cue notes
1141 For mixing clefs when using cue notes, see the @code{\cueClef} and
1142 @code{\cueDuringWithClef} commands in @ref{Formatting cue notes}.
1144 @cindex transposing clef
1145 @cindex clef, transposing
1146 @cindex octave transposition
1147 @cindex optional octave transposition
1148 @cindex octave transposition, optional
1149 @cindex choral tenor clef
1150 @cindex tenor clef, choral
1152 By adding@tie{}@code{_8} or@tie{}@code{^8} to the clef name, the
1153 clef is transposed one octave down or up respectively,
1154 and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves.
1155 Other integers can be used if required. Clef names containing
1156 non-alphabetic characters must be enclosed in quotes
1158 @lilypond[verbatim,quote,fragment]
1173 Optional octavation can be obtained by enclosing the numeric
1174 argument in parentheses or brackets:
1176 @lilypond[verbatim,quote,fragment]
1183 The pitches are displayed as if the numeric argument were
1184 given without parentheses/brackets.
1186 By default, a clef change taking place at a line break will cause
1187 the new clef symbol to be printed at the end of the previous line,
1188 as a @emph{warning} clef, as well as the beginning of the next.
1189 This @emph{warning} clef can be suppressed.
1191 @lilypond[verbatim,quote,fragment]
1192 \clef treble { c'2 c' } \break
1193 \clef bass { c'2 c' } \break
1195 \set Staff.explicitClefVisibility = #end-of-line-invisible
1197 \unset Staff.explicitClefVisibility
1198 \clef bass { c'2 c' } \break
1201 By default, a clef that has previously been printed will not be
1202 re-printed if the same @code{\clef} command is issued again and
1203 will be ignored. The command
1204 @code{\set Staff.forceClef = ##t} changes this behaviour.
1206 @lilypond[verbatim,quote,fragment]
1211 \set Staff.forceClef = ##t
1217 When there is a manual clef change, the glyph of the changed clef
1218 will be smaller than normal. This behaviour can be overridden.
1220 @lilypond[verbatim,quote,fragment]
1227 \override Staff.Clef.full-size-change = ##t
1232 \revert Staff.Clef.full-size-change
1240 @lilypondfile[verbatim,quote,texidoc,doctitle]
1241 {tweaking-clef-properties.ly}
1245 @ref{Mensural clefs},
1246 @ref{Gregorian clefs},
1247 @ref{Default tablatures},
1248 @ref{Custom tablatures},
1249 @ref{Formatting cue notes}.
1252 @file{scm/parser-clef.scm}.
1257 Internals Reference:
1258 @rinternals{Clef_engraver},
1260 @rinternals{ClefModifier},
1261 @rinternals{clef-interface}.
1264 Ottavation numbers attached to clefs are treated as separate
1265 grobs. So any @code{\override} done to the @var{Clef} will also
1266 need to be applied, as a separate @code{\override}, to the
1267 @var{ClefModifier} grob.
1269 @lilypond[fragment,quote,verbatim]
1271 \override Clef.color = #blue
1272 \override ClefModifier.color = #red
1275 \clef "treble_8" c'4
1280 @unnumberedsubsubsec Key signature
1282 @cindex key signature
1286 @c duplicated in Key signature and Accidentals
1287 @warning{New users are sometimes confused about accidentals and
1288 key signatures. In LilyPond, note names are the raw input; key
1289 signatures and clefs determine how this raw input is displayed.
1290 An unaltered note like@tie{}@code{c} means @q{C natural},
1291 regardless of the key signature or clef. For more information,
1292 see @rlearning{Pitches and key signatures}.}
1294 The key signature indicates the tonality in which a piece is
1295 played. It is denoted by a set of alterations (flats or sharps)
1296 at the start of the staff. The key signature may be altered:
1299 \key @var{pitch} @var{mode}
1307 @funindex \mixolydian
1312 @cindex church modes
1325 Here, @code{@var{mode}} should be @code{\major} or @code{\minor}
1326 to get a key signature of @code{@var{pitch}}-major or
1327 @code{@var{pitch}}-minor, respectively. You may also use the
1328 standard mode names, also called @notation{church modes}:
1329 @code{\ionian}, @code{\dorian}, @code{\phrygian}, @code{\lydian},
1330 @code{\mixolydian}, @code{\aeolian}, and @code{\locrian}.
1332 @lilypond[verbatim,quote,fragment]
1341 Additional modes can be defined, by listing the alterations
1342 for each scale step when the mode starts on C.
1344 @lilypond[verbatim,quote]
1345 freygish = #`((0 . ,NATURAL) (1 . ,FLAT) (2 . ,NATURAL)
1346 (3 . ,NATURAL) (4 . ,NATURAL) (5 . ,FLAT) (6 . ,FLAT))
1349 \key c \freygish c'4 des e f
1350 \bar "||" \key d \freygish d es fis g
1354 Accidentals in the key signature may be printed in octaves other
1355 than their traditional positions, or in multiple octaves, by
1356 using the @code{flat-positions} and @code{sharp-positions}
1357 properties of @code{KeySignature}. Entries in these properties
1358 specify the range of staff-positions where accidentals will be
1359 printed. If a single position is specified in an entry, the
1360 accidentals are placed within the octave ending at that staff
1363 @lilypond[verbatim, quote,fragment]
1364 \override Staff.KeySignature.flat-positions = #'((-5 . 5))
1365 \override Staff.KeyCancellation.flat-positions = #'((-5 . 5))
1366 \clef bass \key es \major es g bes d'
1367 \clef treble \bar "||" \key es \major es' g' bes' d''
1369 \override Staff.KeySignature.sharp-positions = #'(2)
1370 \bar "||" \key b \major b' fis' b'2
1375 @lilypondfile[verbatim,quote,texidoc,doctitle]
1376 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
1378 @lilypondfile[verbatim,quote,texidoc,doctitle]
1379 {non-traditional-key-signatures.ly}
1384 @rglos{church mode},
1388 @rlearning{Pitches and key signatures}.
1393 Internals Reference:
1394 @rinternals{KeyChangeEvent},
1395 @rinternals{Key_engraver},
1396 @rinternals{Key_performer},
1397 @rinternals{KeyCancellation},
1398 @rinternals{KeySignature},
1399 @rinternals{key-signature-interface}.
1402 @node Ottava brackets
1403 @unnumberedsubsubsec Ottava brackets
1411 @funindex set-octavation
1414 @notation{Ottava brackets} introduce an extra transposition of an
1415 octave for the staff:
1417 @lilypond[verbatim,quote]
1435 @lilypondfile[verbatim,quote,texidoc,doctitle]
1438 @lilypondfile[verbatim,quote,texidoc,doctitle]
1439 {adding-an-ottava-marking-to-a-single-voice.ly}
1441 @lilypondfile[verbatim,quote,texidoc,doctitle]
1442 {modifying-the-ottava-spanner-slope.ly}
1451 Internals Reference:
1452 @rinternals{Ottava_spanner_engraver},
1453 @rinternals{OttavaBracket},
1454 @rinternals{ottava-bracket-interface}.
1457 @node Instrument transpositions
1458 @unnumberedsubsubsec Instrument transpositions
1460 @cindex transposition, MIDI
1461 @cindex transposition, instrument
1462 @cindex transposing instrument
1464 @cindex MIDI transposition
1466 @funindex \transposition
1468 When typesetting scores that involve transposing instruments, some
1469 parts can be typeset in a different pitch than the
1470 @notation{concert pitch}. In these cases, the key of the
1471 @notation{transposing instrument} should be specified; otherwise
1472 the MIDI output and cues in other parts will produce incorrect
1473 pitches. For more information about quotations, see
1474 @ref{Quoting other voices}.
1477 \transposition @var{pitch}
1480 The pitch to use for @code{\transposition} should correspond to
1481 the real sound heard when a@tie{}@code{c'} written on the staff is
1482 played by the transposing instrument. This pitch is entered in
1483 absolute mode, so an instrument that produces a real sound which
1484 is one tone higher than the printed music should use
1485 @w{@code{\transposition d'}}. @code{\transposition} should
1486 @emph{only} be used if the pitches are @emph{not} being entered in
1489 Here are a few notes for violin and B-flat clarinet where the
1490 parts have been entered using the notes and key as they appear in
1491 each part of the conductor's score. The two instruments are
1494 @lilypond[verbatim,quote]
1496 \new Staff = "violin" {
1498 \set Staff.instrumentName = #"Vln"
1499 \set Staff.midiInstrument = #"violin"
1500 % not strictly necessary, but a good reminder
1507 \new Staff = "clarinet" {
1509 \set Staff.instrumentName = \markup { Cl (B\flat) }
1510 \set Staff.midiInstrument = #"clarinet"
1520 The @code{\transposition} may be changed during a piece. For
1521 example, a clarinetist may be required to switch from an A clarinet
1522 to a B-flat clarinet.
1524 @lilypond[verbatim,quote]
1525 flute = \relative c'' {
1527 \cueDuring #"clarinet" #DOWN {
1528 R1 _\markup\tiny "clarinet"
1530 R1 _\markup\tiny "clarinet"
1533 clarinet = \relative c'' {
1537 R1^\markup { muta in B\flat }
1542 \addQuote "clarinet" \clarinet
1544 \new Staff \with { instrumentName = #"Flute" }
1546 \new Staff \with { instrumentName = #"Cl (A)" }
1553 @rglos{concert pitch},
1554 @rglos{transposing instrument}.
1557 @ref{Quoting other voices},
1564 @node Automatic accidentals
1565 @unnumberedsubsubsec Automatic accidentals
1567 @cindex accidental style
1568 @cindex accidental style, default
1570 @cindex accidentals, automatic
1571 @cindex automatic accidentals
1572 @cindex default accidental style
1574 @funindex \accidentalStyle
1578 There are many different conventions on how to typeset
1579 accidentals. LilyPond provides a function to specify which
1580 accidental style to use. This function is called as follows:
1584 \accidentalStyle voice
1589 The accidental style applies to the current @code{Staff} by
1590 default (with the exception of the styles @code{piano} and
1591 @code{piano-cautionary}, which are explained below). Optionally,
1592 the function can take a second argument that determines in which
1593 scope the style should be changed. For example, to use the same
1594 style in all staves of the current @code{StaffGroup}, use:
1597 \accidentalStyle StaffGroup.voice
1600 The following accidental styles are supported. To demonstrate
1601 each style, we use the following example:
1604 @lilypond[verbatim,quote]
1608 cis''8 fis, bes4 <a cis>8 f bis4 |
1622 \voiceTwo \relative {
1623 <fis a cis>8[ <fis a cis>
1626 \change Staff = down
1631 \change Staff = down
1632 <fis, a cis>4 gis <f a d>2 |
1639 \context Staff = "up" {
1640 \accidentalStyle default
1643 \context Staff = "down" {
1644 \accidentalStyle default
1651 Note that the last lines of this example can be replaced by the
1652 following, as long as the same accidental style should be used in
1658 \context Staff = "up" @{
1659 %%% change the next line as desired:
1660 \accidentalStyle Score.default
1663 \context Staff = "down" @{
1671 @c don't use verbatim in this table.
1675 @cindex default accidental style
1676 @cindex accidental style, default
1680 This is the default typesetting behavior. It corresponds to
1681 eighteenth-century common practice: accidentals are remembered to
1682 the end of the measure in which they occur and only in their own
1683 octave. Thus, in the example below, no natural signs are printed
1684 before the@tie{}@code{b} in the second measure or the
1691 cis''8 fis, bes4 <a cis>8 f bis4 |
1705 \voiceTwo \relative {
1706 <fis a cis>8[ <fis a cis>
1709 \change Staff = down
1714 \change Staff = down
1715 <fis, a cis>4 gis <f a d>2 |
1722 \context Staff = "up" {
1723 \accidentalStyle default
1726 \context Staff = "down" {
1727 \accidentalStyle default
1736 @cindex accidental style, voice
1737 @cindex voice accidental style
1738 @cindex accidental style, modern
1739 @cindex modern accidental style
1740 @cindex accidental style, modern-cautionary
1741 @cindex modern-cautionary accidental style
1745 The normal behavior is to remember the accidentals at
1746 @code{Staff}-level. In this style, however, accidentals are
1747 typeset individually for each voice. Apart from that, the rule is
1748 similar to @code{default}.
1750 As a result, accidentals from one voice do not get canceled in
1751 other voices, which is often an unwanted result: in the following
1752 example, it is hard to determine whether the second@tie{}@code{a}
1753 should be played natural or sharp. The @code{voice} option should
1754 therefore be used only if the voices are to be read solely by
1755 individual musicians. If the staff is to be used by one musician
1756 (e.g., a conductor or in a piano score) then @code{modern} or
1757 @code{modern-cautionary} should be used instead.
1764 cis''8 fis, bes4 <a cis>8 f bis4 |
1778 \voiceTwo \relative {
1779 <fis a cis>8[ <fis a cis>
1782 \change Staff = down
1787 \change Staff = down
1788 <fis, a cis>4 gis <f a d>2 |
1795 \context Staff = "up" {
1796 \accidentalStyle voice
1799 \context Staff = "down" {
1800 \accidentalStyle voice
1809 @cindex accidentals, modern style
1810 @cindex modern style accidentals
1814 This rule corresponds to the common practice in the twentieth
1815 century. It omits some extra natural signs, which were
1816 traditionally prefixed to a sharp following a double sharp,
1817 or a flat following a double flat. The @code{modern} rule
1818 prints the same accidentals as @code{default}, with
1819 two additions that serve to avoid ambiguity: after temporary
1820 accidentals, cancellation marks are printed also in the following
1821 measure (for notes in the same octave) and, in the same measure,
1822 for notes in other octaves. Hence the naturals before
1823 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1830 cis''8 fis, bes4 <a cis>8 f bis4 |
1844 \voiceTwo \relative {
1845 <fis a cis>8[ <fis a cis>
1848 \change Staff = down
1853 \change Staff = down
1854 <fis, a cis>4 gis <f a d>2 |
1861 \context Staff = "up" {
1862 \accidentalStyle modern
1865 \context Staff = "down" {
1866 \accidentalStyle modern
1873 @item modern-cautionary
1875 @cindex accidentals, modern cautionary style
1876 @cindex modern accidental style
1877 @cindex modern cautionary accidental style
1878 @cindex modern style accidentals
1879 @cindex modern style cautionary accidentals
1881 @funindex modern-cautionary
1883 This rule is similar to @code{modern}, but the @q{extra} accidentals
1884 are printed as cautionary accidentals (with parentheses). They can also
1885 be printed at a different size by overriding
1886 @code{AccidentalCautionary}'s @code{font-size} property.
1892 cis''8 fis, bes4 <a cis>8 f bis4 |
1906 \voiceTwo \relative {
1907 <fis a cis>8[ <fis a cis>
1910 \change Staff = down
1915 \change Staff = down
1916 <fis, a cis>4 gis <f a d>2 |
1923 \context Staff = "up" {
1924 \accidentalStyle modern-cautionary
1927 \context Staff = "down" {
1928 \accidentalStyle modern-cautionary
1937 @cindex accidental style, modern
1938 @cindex accidentals, modern
1939 @cindex accidentals, multivoice
1940 @cindex modern accidental style
1941 @cindex modern accidentals
1942 @cindex multivoice accidentals
1944 @funindex modern-voice
1946 This rule is used for multivoice accidentals to be read both by
1947 musicians playing one voice and musicians playing all voices.
1948 Accidentals are typeset for each voice, but they @emph{are}
1949 canceled across voices in the same @code{Staff}. Hence,
1950 the@tie{}@code{a} in the last measure is canceled because the
1951 previous cancellation was in a different voice, and
1952 the@tie{}@code{d} in the lower staff is canceled because of the
1953 accidental in a different voice in the previous measure:
1959 cis''8 fis, bes4 <a cis>8 f bis4 |
1973 \voiceTwo \relative {
1974 <fis a cis>8[ <fis a cis>
1977 \change Staff = down
1982 \change Staff = down
1983 <fis, a cis>4 gis <f a d>2 |
1990 \context Staff = "up" {
1991 \accidentalStyle modern-voice
1994 \context Staff = "down" {
1995 \accidentalStyle modern-voice
2002 @cindex accidental style, cautionary, modern voice
2003 @cindex accidental style, modern voice cautionary
2004 @cindex accidental style, voice, modern cautionary
2006 @funindex modern-voice-cautionary
2008 @item modern-voice-cautionary
2010 This rule is the same as @code{modern-voice}, but with the extra
2011 accidentals (the ones not typeset by @code{voice}) typeset as
2012 cautionaries. Even though all accidentals typeset by
2013 @code{default} @emph{are} typeset with this rule, some of them are
2014 typeset as cautionaries.
2020 cis''8 fis, bes4 <a cis>8 f bis4 |
2034 \voiceTwo \relative {
2035 <fis a cis>8[ <fis a cis>
2038 \change Staff = down
2043 \change Staff = down
2044 <fis, a cis>4 gis <f a d>2 |
2051 \context Staff = "up" {
2052 \accidentalStyle modern-voice-cautionary
2055 \context Staff = "down" {
2056 \accidentalStyle modern-voice-cautionary
2065 @cindex accidental style, piano
2066 @cindex accidentals, piano
2067 @cindex piano accidental style
2068 @cindex piano accidentals
2072 This rule reflects twentieth-century practice for piano notation.
2073 Its behavior is very similar to @code{modern} style, but here
2074 accidentals also get canceled across the staves in the same
2075 @code{GrandStaff} or @code{PianoStaff}, hence all the
2076 cancellations of the final notes.
2078 This accidental style applies to the current @code{GrandStaff} or
2079 @code{PianoStaff} by default.
2085 cis''8 fis, bes4 <a cis>8 f bis4 |
2099 \voiceTwo \relative {
2100 <fis a cis>8[ <fis a cis>
2103 \change Staff = down
2108 \change Staff = down
2109 <fis, a cis>4 gis <f a d>2 |
2116 \context Staff = "up" {
2117 \accidentalStyle piano
2120 \context Staff = "down" {
2127 @item piano-cautionary
2129 @cindex accidentals, piano cautionary
2130 @cindex cautionary accidentals, piano
2131 @cindex piano cautionary accidentals
2132 @cindex accidental style, piano cautionary
2133 @cindex cautionary accidental style, piano
2134 @cindex piano cautionary accidental style
2136 @funindex piano-cautionary
2138 This is the same as @code{piano} but with the extra accidentals
2139 typeset as cautionaries.
2145 cis''8 fis, bes4 <a cis>8 f bis4 |
2159 \voiceTwo \relative {
2160 <fis a cis>8[ <fis a cis>
2163 \change Staff = down
2168 \change Staff = down
2169 <fis, a cis>4 gis <f a d>2 |
2176 \context Staff = "up" {
2177 \accidentalStyle piano-cautionary
2180 \context Staff = "down" {
2190 @cindex neo-modern accidental style
2191 @cindex accidental style, neo-modern
2193 @funindex neo-modern
2195 This rule reproduces a common practice in contemporary music:
2196 accidentals are printed like with @code{modern}, but they are printed
2197 again if the same note appears later in the same measure -- except
2198 if the note is immediately repeated.
2204 cis''8 fis, bes4 <a cis>8 f bis4 |
2218 \voiceTwo \relative {
2219 <fis a cis>8[ <fis a cis>
2222 \change Staff = down
2227 \change Staff = down
2228 <fis, a cis>4 gis <f a d>2 |
2235 \context Staff = "up" {
2236 \accidentalStyle neo-modern
2239 \context Staff = "down" {
2240 \accidentalStyle neo-modern
2247 @item neo-modern-cautionary
2249 @cindex neo-modern-cautionary accidental style
2250 @cindex accidental style, neo-modern-cautionary
2252 @funindex neo-modern-cautionary
2254 This rule is similar to @code{neo-modern}, but the @q{extra} accidentals
2255 are printed as cautionary accidentals (with parentheses). They can also
2256 be printed at a different size by overriding
2257 @code{AccidentalCautionary}'s @code{font-size} property.
2263 cis''8 fis, bes4 <a cis>8 f bis4 |
2277 \voiceTwo \relative {
2278 <fis a cis>8[ <fis a cis>
2281 \change Staff = down
2286 \change Staff = down
2287 <fis, a cis>4 gis <f a d>2 |
2294 \context Staff = "up" {
2295 \accidentalStyle neo-modern-cautionary
2298 \context Staff = "down" {
2299 \accidentalStyle neo-modern-cautionary
2307 @item neo-modern-voice
2309 @cindex neo-modern-voice accidental style
2310 @cindex accidental style, neo-modern-voice
2312 @funindex neo-modern-voice
2314 This rule is used for multivoice accidentals to be read both by
2315 musicians playing one voice and musicians playing all voices.
2316 Accidentals are typeset for each voice as with @code{neo-modern},
2317 but they are canceled across voices in the same @code{Staff}.
2323 cis''8 fis, bes4 <a cis>8 f bis4 |
2337 \voiceTwo \relative {
2338 <fis a cis>8[ <fis a cis>
2341 \change Staff = down
2346 \change Staff = down
2347 <fis, a cis>4 gis <f a d>2 |
2354 \context Staff = "up" {
2355 \accidentalStyle neo-modern-voice
2358 \context Staff = "down" {
2359 \accidentalStyle neo-modern-voice
2366 @item neo-modern-voice-cautionary
2368 @cindex neo-modern-voice-cautionary accidental style
2369 @cindex accidental style, neo-modern-voice-cautionary
2371 @funindex neo-modern-voice-cautionary
2373 This rule is similar to @code{neo-modern-voice}, but the extra
2374 accidentals are printed as cautionary accidentals.
2380 cis''8 fis, bes4 <a cis>8 f bis4 |
2394 \voiceTwo \relative {
2395 <fis a cis>8[ <fis a cis>
2398 \change Staff = down
2403 \change Staff = down
2404 <fis, a cis>4 gis <f a d>2 |
2411 \context Staff = "up" {
2412 \accidentalStyle neo-modern-voice-cautionary
2415 \context Staff = "down" {
2416 \accidentalStyle neo-modern-voice-cautionary
2425 @cindex dodecaphonic accidental style
2426 @cindex dodecaphonic style, neo-modern
2428 @funindex dodecaphonic
2430 This rule reflects a practice introduced by composers at
2431 the beginning of the 20th century, in an attempt to
2432 abolish the hierarchy between natural and non-natural notes.
2433 With this style, @emph{every} note gets an accidental sign,
2434 including natural signs.
2440 cis''8 fis, bes4 <a cis>8 f bis4 |
2454 \voiceTwo \relative {
2455 <fis a cis>8[ <fis a cis>
2458 \change Staff = down
2463 \change Staff = down
2464 <fis, a cis>4 gis <f a d>2 |
2471 \context Staff = "up" {
2472 \accidentalStyle dodecaphonic
2475 \context Staff = "down" {
2476 \accidentalStyle dodecaphonic
2483 @item dodecaphonic-no-repeat
2485 @cindex dodecaphonic accidental style
2486 @cindex dodecaphonic style, neo-modern
2488 @funindex dodecaphonic-no-repeat
2490 Like with the dodecaphonic accidental style @emph{every} note
2491 gets an accidental sign by default, but accidentals are
2492 suppressed for pitches immediately repeated within the same staff.
2498 cis''8 fis, bes4 <a cis>8 f bis4 |
2512 \voiceTwo \relative {
2513 <fis a cis>8[ <fis a cis>
2516 \change Staff = down
2521 \change Staff = down
2522 <fis, a cis>4 gis <f a d>2 |
2529 \context Staff = "up" {
2530 \accidentalStyle dodecaphonic-no-repeat
2533 \context Staff = "down" {
2534 \accidentalStyle dodecaphonic-no-repeat
2542 @item dodecaphonic-first
2544 @cindex dodecaphonic accidental style
2545 @cindex dodecaphonic style, neo-modern
2547 @funindex dodecaphonic-first
2549 Similar to the dodecaphonic accidental style @emph{every} pitch
2550 gets an accidental sign, but only the first time it is encountered
2551 in a measure. Accidentals are only remembered for the actual octave
2552 but throughout voices.
2558 cis''8 fis, bes4 <a cis>8 f bis4 |
2572 \voiceTwo \relative {
2573 <fis a cis>8[ <fis a cis>
2576 \change Staff = down
2581 \change Staff = down
2582 <fis, a cis>4 gis <f a d>2 |
2589 \context Staff = "up" {
2590 \accidentalStyle dodecaphonic-first
2593 \context Staff = "down" {
2594 \accidentalStyle dodecaphonic-first
2604 @cindex teaching accidental style
2605 @cindex accidental style, teaching
2609 This rule is intended for students, and makes it easy to create
2610 scale sheets with automatically created cautionary accidentals.
2611 Accidentals are printed like with @code{modern}, but cautionary
2612 accidentals are added for all sharp or flat tones specified by the
2613 key signature, except if the note is immediately repeated.
2615 @lilypond[quote,staffsize=18]
2619 cis''8 fis, bes4 <a cis>8 f bis4 |
2633 \voiceTwo \relative {
2634 <fis a cis>8[ <fis a cis>
2637 \change Staff = down
2642 \change Staff = down
2643 <fis, a cis>4 gis <f a d>2 |
2650 \context Staff = "up" {
2652 \accidentalStyle teaching
2655 \context Staff = "down" {
2657 \accidentalStyle teaching
2668 @cindex accidental style, no reset
2669 @cindex no reset accidental style
2673 This is the same as @code{default} but with accidentals lasting
2674 @q{forever} and not only within the same measure:
2680 cis''8 fis, bes4 <a cis>8 f bis4 |
2694 \voiceTwo \relative {
2695 <fis a cis>8[ <fis a cis>
2698 \change Staff = down
2703 \change Staff = down
2704 <fis, a cis>4 gis <f a d>2 |
2711 \context Staff = "up" {
2712 \accidentalStyle no-reset
2715 \context Staff = "down" {
2716 \accidentalStyle no-reset
2725 @cindex forget accidental style
2726 @cindex accidental style, forget
2730 This is the opposite of @code{no-reset}: Accidentals are not
2731 remembered at all -- and hence all accidentals are typeset
2732 relative to the key signature, regardless of what came before in
2739 cis''8 fis, bes4 <a cis>8 f bis4 |
2753 \voiceTwo \relative {
2754 <fis a cis>8[ <fis a cis>
2757 \change Staff = down
2762 \change Staff = down
2763 <fis, a cis>4 gis <f a d>2 |
2770 \context Staff = "up" {
2771 \accidentalStyle forget
2774 \context Staff = "down" {
2775 \accidentalStyle forget
2787 Internals Reference:
2788 @rinternals{Accidental},
2789 @rinternals{Accidental_engraver},
2790 @rinternals{GrandStaff},
2791 @rinternals{PianoStaff},
2793 @rinternals{AccidentalSuggestion},
2794 @rinternals{AccidentalPlacement},
2795 @rinternals{accidental-suggestion-interface}.
2797 @cindex accidentals and simultaneous notes
2798 @cindex simultaneous notes and accidentals
2799 @cindex accidentals in chords
2800 @cindex chords, accidentals in
2803 Simultaneous notes are not considered in the automatic
2804 determination of accidentals; only previous notes and the key
2805 signature are considered. Forcing accidentals with@tie{}@code{!}
2806 or@tie{}@code{?} may be required when the same note name occurs
2807 simultaneously with different alterations, as in @samp{<f! fis!>}.
2809 Cautionary cancellation of accidentals is done by looking at previous measure.
2810 However, in the @code{\alternative} block following a @code{\repeat volta N}
2811 section, one would expect the cancellation being calculated using the previous
2812 @emph{played} measure, not previous @emph{printed} measure.
2813 In the following example, the natural @code{c} in the second alternative does
2814 not need a natural sign:
2818 \accidentalStyle modern
2830 The following work-around can be used: define a function that locally changes
2831 the accidental style to @code{forget}:
2833 @lilypond[verbatim,quote]
2834 forget = #(define-music-function (music) (ly:music?) #{
2835 \accidentalStyle forget
2837 \accidentalStyle modern
2840 \accidentalStyle modern
2854 @unnumberedsubsubsec Ambitus
2857 @cindex range of pitches
2860 The term @notation{ambitus} (pl. ambitus) denotes a range of
2861 pitches for a given voice in a part of music. It may also denote
2862 the pitch range that a musical instrument is capable of playing.
2863 Ambitus are printed on vocal parts so that performers can easily
2864 determine if it matches their capabilities.
2866 Ambitus are denoted at the beginning of a piece near the initial
2867 clef. The range is graphically specified by two note heads that
2868 represent the lowest and highest pitches. Accidentals are only
2869 printed if they are not part of the key signature.
2871 @lilypond[verbatim,quote]
2875 \consists "Ambitus_engraver"
2888 @lilypondfile[verbatim,quote,texidoc,doctitle]
2889 {adding-ambitus-per-voice.ly}
2891 @lilypondfile[verbatim,quote,texidoc,doctitle]
2892 {ambitus-with-multiple-voices.ly}
2894 @lilypondfile[verbatim,quote,texidoc,doctitle]
2895 {changing-the-ambitus-gap.ly}
2904 Internals Reference:
2905 @rinternals{Ambitus_engraver},
2908 @rinternals{Ambitus},
2909 @rinternals{AmbitusAccidental},
2910 @rinternals{AmbitusLine},
2911 @rinternals{AmbitusNoteHead},
2912 @rinternals{ambitus-interface}.
2915 There is no collision handling in the case of multiple per-voice
2920 @subsection Note heads
2922 This section suggests ways of altering note heads.
2925 * Special note heads::
2926 * Easy notation note heads::
2927 * Shape note heads::
2931 @node Special note heads
2932 @unnumberedsubsubsec Special note heads
2934 @cindex note heads, special
2935 @cindex note heads, cross
2936 @cindex note heads, diamond
2937 @cindex note heads, parlato
2938 @cindex note heads, harmonic
2939 @cindex note heads, guitar
2940 @cindex special note heads
2941 @cindex cross note heads
2942 @cindex diamond note heads
2943 @cindex parlato note heads
2944 @cindex harmonic note heads
2945 @cindex guitar note heads
2946 @cindex note head styles
2947 @cindex styles, note heads
2951 The appearance of note heads may be altered:
2953 @lilypond[verbatim,quote]
2956 \override NoteHead.style = #'cross
2958 \revert NoteHead.style
2960 \override NoteHead.style = #'harmonic
2962 \revert NoteHead.style
2967 To see all note head styles, see @ref{Note head styles}.
2969 The @code{cross} style is used to represent a variety of musical
2970 intentions. The following generic predefined commands modify the
2971 note head in both staff and tablature contexts and can be used to
2972 represent any musical meaning:
2974 @lilypond[verbatim,quote]
2984 The music function form of this predefined command may be used
2985 inside and outside chords to generate crossed note heads in both
2986 staff and tablature contexts:
2988 @lilypond[verbatim,quote]
2992 c b < g \xNote c f > b
2996 As synonyms for @code{\xNote}, @code{\xNotesOn} and @code{\xNotesOff},
2997 @code{\deadNote}, @code{\deadNotesOn} and @code{\deadNotesOff} can
2998 be used. The term @notation{dead note} is commonly used by guitarists.
3000 There is also a similar shorthand for diamond shapes:
3002 @lilypond[verbatim,quote]
3004 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic
3020 @ref{Note head styles},
3021 @ref{Chorded notes},
3022 @ref{Indicating harmonics and dampened notes}.
3024 Internals Reference:
3025 @rinternals{note-event},
3026 @rinternals{Note_heads_engraver},
3027 @rinternals{Ledger_line_engraver},
3028 @rinternals{NoteHead},
3029 @rinternals{LedgerLineSpanner},
3030 @rinternals{note-head-interface},
3031 @rinternals{ledger-line-spanner-interface}.
3034 @node Easy notation note heads
3035 @unnumberedsubsubsec Easy notation note heads
3037 @cindex note heads, practice
3038 @cindex practice note heads
3039 @cindex note heads, easy notation
3040 @cindex easy notation
3041 @cindex beginners' music
3042 @cindex music, beginners'
3043 @cindex easy play note heads
3044 @cindex note heads, easy play
3046 @funindex \easyHeadsOn
3047 @funindex \easyHeadsOff
3049 The @q{easy play} note head includes a note name inside the head.
3050 It is used in music for beginners. To make the letters readable,
3051 it should be printed in a large font size. To print with a larger
3052 font, see @ref{Setting the staff size}.
3054 @lilypond[verbatim,quote]
3055 #(set-global-staff-size 26)
3067 @code{\easyHeadsOn},
3068 @code{\easyHeadsOff}.
3074 @lilypondfile[verbatim,quote,texidoc,doctitle]
3075 {numbers-as-easy-note-heads.ly}
3079 @ref{Setting the staff size}.
3084 Internals Reference:
3085 @rinternals{note-event},
3086 @rinternals{Note_heads_engraver},
3087 @rinternals{NoteHead},
3088 @rinternals{note-head-interface}.
3091 @node Shape note heads
3092 @unnumberedsubsubsec Shape note heads
3094 @cindex note heads, shape
3095 @cindex note heads, Aiken
3096 @cindex note heads, sacred harp
3098 @cindex Aiken shape note heads
3099 @cindex sacred harp note heads
3100 @cindex note heads, Southern Harmony
3101 @cindex Southern Harmony note heads
3102 @cindex Funk shape note heads
3103 @cindex note heads, Funk
3104 @cindex note heads, Harmonica Sacra
3105 @cindex Harmonica Sacra note heads
3106 @cindex Christian Harmony note heads
3107 @cindex note heads, Christian Harmony
3108 @cindex Walker shape note heads
3109 @cindex note heads, Walker
3111 @funindex \aikenHeads
3112 @funindex \sacredHarpHeads
3113 @funindex \southernHarmonyHeads
3114 @funindex \funkHeads
3115 @funindex \walkerHeads
3117 In shape note head notation, the shape of the note head
3118 corresponds to the harmonic function of a note in the scale. This
3119 notation was popular in nineteenth-century American song books.
3120 Shape note heads can be produced in Sacred Harp, Southern Harmony,
3121 Funk (Harmonica Sacra), Walker, and Aiken (Christian Harmony) styles:
3123 @lilypond[verbatim,quote]
3126 c, d e f g2 a b1 c \break
3128 c,4 d e f g2 a b1 c \break
3129 \southernHarmonyHeads
3130 c,4 d e f g2 a b1 c \break
3132 c,4 d e f g2 a b1 c \break
3134 c,4 d e f g2 a b1 c \break
3139 @funindex \aikenHeadsMinor
3140 @funindex \sacredHarpHeadsMinor
3141 @funindex \southernHarmonyHeadsMinor
3142 @funindex \funkHeadsMinor
3143 @funindex \walkerHeadsMinor
3145 Shapes are typeset according to the step in the scale, where the base
3146 of the scale is determined by the @code{\key} command. When writing
3147 in a minor key, the scale step can be determined from the relative
3150 @lilypond[verbatim,quote]
3154 a b c d e2 f g1 a \break
3156 a,4 b c d e2 f g1 a \break
3157 \sacredHarpHeadsMinor
3159 \southernHarmonyHeadsMinor
3171 @code{\aikenHeadsMinor},
3173 @code{\funkHeadsMinor},
3174 @code{\sacredHarpHeads},
3175 @code{\sacredHarpHeadsMinor},
3176 @code{\southernHarmonyHeads},
3177 @code{\southernHarmonyHeadsMinor},
3178 @code{\walkerHeads},
3179 @code{\walkerHeadsMinor}.
3185 @lilypondfile[verbatim,quote,texidoc,doctitle]
3186 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
3188 To see all note head styles, see @ref{Note head styles}.
3195 @ref{Note head styles}.
3197 Internals Reference:
3198 @rinternals{note-event},
3199 @rinternals{Note_heads_engraver},
3200 @rinternals{NoteHead},
3201 @rinternals{note-head-interface}.
3205 @unnumberedsubsubsec Improvisation
3207 @cindex improvisation
3208 @cindex slashed note heads
3209 @cindex note heads, improvisation
3210 @cindex note heads, slashed
3212 @funindex \improvisationOn
3213 @funindex \improvisationOff
3215 Improvisation is sometimes denoted with slashed note heads, where
3216 the performer may choose any pitch but should play the specified
3217 rhythm. Such note heads can be created:
3219 @lilypond[verbatim,quote]
3221 \consists "Pitch_squash_engraver"
3223 e''8 e g a a16( bes) a8 g
3234 @code{\improvisationOn},
3235 @code{\improvisationOff}.
3242 Internals Reference:
3243 @rinternals{Pitch_squash_engraver},
3245 @rinternals{RhythmicStaff}.