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,fragment]
364 \relative c'' { ais1 aes aisis aeses }
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,fragment]
372 \relative c'' { a4 aes a2 }
375 @cindex quarter tones
379 Quarter tones may be added; the following is a series of Cs with
382 @lilypond[verbatim,quote,fragment]
383 \relative c'' { 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,fragment]
407 \relative c'' { 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,fragment,ragged-right]
427 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
428 {hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly}
430 @lilypondfile[verbatim,quote,texidoc,doctitle]
431 {preventing-extra-naturals-from-being-automatically-added.ly}
437 @rglos{double sharp},
440 @rglos{quarter tone}.
443 @rlearning{Pitches and key signatures}.
446 @ref{Automatic accidentals},
447 @ref{Annotational accidentals (musica ficta)},
448 @ref{Note names in other languages}.
454 @rinternals{Accidental_engraver},
455 @rinternals{Accidental},
456 @rinternals{AccidentalCautionary},
457 @rinternals{accidental-interface}.
459 @cindex accidental, quarter-tone
460 @cindex quarter-tone accidental
463 There are no generally accepted standards for denoting
464 quarter-tone accidentals, so LilyPond's symbol does not conform to
468 @node Note names in other languages
469 @unnumberedsubsubsec Note names in other languages
471 @cindex note names, other languages
472 @cindex pitch names, other languages
473 @cindex language, note names in other
474 @cindex language, pitch names in other
476 There are predefined sets of note and accidental names for various
477 other languages. Selecting the note name language is usually done
478 at the beginning of the file; the following example is written
479 using Italian note names:
481 @lilypond[quote,verbatim]
489 The available languages and the note names they define are:
492 @multitable {@code{nederlands}} {do re mi fa sol la sib si}
495 @item @code{nederlands}
496 @tab c d e f g a bes b
498 @tab do re mi fa sol la sib si
502 @tab c d e f g a bf b
503 @item @code{espanol} or @code{español}
504 @tab do re mi fa sol la sib si
505 @item @code{italiano} or @code{français}
506 @tab do re mi fa sol la sib si
509 @item @code{portugues}
510 @tab do re mi fa sol la sib si
516 @tab do re mi fa sol la sib si
520 In addition to note names, accidental suffixes may
521 also vary depending on the language:
524 @multitable {@code{nederlands}} {-@code{s}/-@code{-sharp}} {-@code{ess}/-@code{es}} {-@code{ss}/-@code{x}/-@code{-sharpsharp}} {-@code{essess}/-@code{eses}}
526 @tab sharp @tab flat @tab double sharp @tab double flat
527 @item @code{nederlands}
528 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
530 @tab -@code{d}/-@code{s} @tab -@code{b} @tab -@code{dd}/-@code{ss} @tab -@code{bb}
532 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
534 @tab -@code{s}/-@code{-sharp} @tab -@code{f}/-@code{-flat} @tab -@code{ss}/-@code{x}/-@code{-sharpsharp}
535 @tab -@code{ff}/-@code{-flatflat}
536 @item @code{espanol} or @code{español}
537 @tab -@code{s} @tab -@code{b} @tab -@code{ss}/-@code{x} @tab -@code{bb}
538 @item @code{italiano} or @code{français}
539 @tab -@code{d} @tab -@code{b} @tab -@code{dd} @tab -@code{bb}
541 @tab -@code{iss}/-@code{is} @tab -@code{ess}/-@code{es} @tab -@code{ississ}/-@code{isis}
542 @tab -@code{essess}/-@code{eses}
543 @item @code{portugues}
544 @tab -@code{s} @tab -@code{b} @tab -@code{ss} @tab -@code{bb}
546 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
548 @tab -@code{iss} @tab -@code{ess} @tab -@code{ississ} @tab -@code{essess}
550 @tab -@code{k} @tab -@code{b} @tab -@code{kk} @tab -@code{bb}
554 In Dutch, @code{aes} is contracted to @code{as}, but both forms
555 are accepted in LilyPond. Similarly, both @code{es} and
556 @code{ees} are accepted. This also applies to
557 @code{aeses}@tie{}/@tie{}@code{ases} and
558 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
559 contracted names are defined in the corresponding language files.
561 @lilypond[verbatim,quote,fragment]
562 \relative c'' { a2 as e es a ases e eses }
572 Some music uses microtones whose alterations are fractions of a
573 @q{normal} sharp or flat. The following table lists note names
574 for quarter-tone accidentals in various languages; here the prefixes
575 @notation{semi-} and @notation{sesqui-} respectively
576 mean @q{half} and @q{one and a half}. Languages that do not
577 appear in this table do not provide special note names yet.
580 @multitable {@code{nederlands}} {@b{semi-sharp}} {@b{semi-flat}} {@b{sesqui-sharp}} {@b{sesqui-flat}}
582 @tab semi-sharp @tab semi-flat @tab sesqui-sharp @tab sesqui-flat
584 @item @code{nederlands}
585 @tab -ih @tab -eh @tab -isih @tab -eseh
587 @tab -ih @tab -eh @tab -isih @tab -eseh
589 @tab -qs @tab -qf @tab -tqs @tab -tqf
590 @item @code{espanol} or @code{español}
591 @tab -cs @tab -cb @tab -tcs @tab -tcb
592 @item @code{italiano} or @code{français}
593 @tab -sd @tab -sb @tab -dsd @tab -bsb
594 @item @code{portugues}
595 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
599 Most languages presented here are commonly associated with
600 Western classical music, also referred to as
601 @notation{Common Practice Period}. However, alternate
602 pitches and tuning systems are also supported: see
603 @ref{Common notation for non-Western music}.
608 @rglos{Common Practice Period}.
611 @ref{Common notation for non-Western music}.
614 @file{scm/define-note-names.scm}.
620 @node Changing multiple pitches
621 @subsection Changing multiple pitches
623 This section discusses how to modify pitches.
630 * Modal transformations::
634 @unnumberedsubsubsec Octave checks
636 @cindex octave correction
638 @cindex control pitch
641 @funindex \octaveCheck
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
719 A music expression can be transposed with @code{\transpose}. The
723 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
727 This means that @code{@var{musicexpr}} is transposed by the
728 interval between the pitches @code{@var{frompitch}} and
729 @code{@var{topitch}}: any note with pitch @code{@var{frompitch}}
730 is changed to @code{@var{topitch}} and any other note is
731 transposed by the same interval. Both pitches are entered in
734 @warning{Music inside a @code{@bs{}transpose} block is absolute
735 unless a @code{@bs{}relative} is included in the block.}
737 Consider a piece written in the key of D-major. It can be
738 transposed up to E-major; note that the key signature is
739 automatically transposed as well.
741 @lilypond[verbatim,quote]
750 @cindex transposing instruments
751 @cindex instruments, transposing
753 If a part written in C (normal @notation{concert pitch}) is to be
754 played on the A clarinet (for which an A is notated as a C and
755 thus sounds a minor third lower than notated), the appropriate
756 part will be produced with:
758 @lilypond[verbatim,quote]
768 Note that we specify @w{@code{\key c \major}} explicitly. If we
769 do not specify a key signature, the notes will be transposed but
770 no key signature will be printed.
772 @code{\transpose} distinguishes between enharmonic pitches: both
773 @w{@code{\transpose c cis}} or @w{@code{\transpose c des}} will
774 transpose up a semitone. The first version will print sharps and
775 the notes will remain on the same scale step, the second version
776 will print flats on the scale step above.
778 @lilypond[verbatim,quote]
779 music = \relative { c' d e f }
781 \transpose c cis { \music }
782 \transpose c des { \music }
787 @code{\transpose} may also be used in a different way, to input
788 written notes for a transposing instrument. The previous examples
789 show how to enter pitches in C (or @notation{concert pitch}) and
790 typeset them for a transposing instrument, but the opposite is
791 also possible if you for example have a set of instrumental parts
792 and want to print a conductor's score. For example, when entering
793 music for a B-flat trumpet that begins on a notated E (concert D),
797 musicInBflat = @{ e4 @dots{} @}
798 \transpose c bes, \musicInBflat
802 To print this music in F (e.g., rearranging to a French horn) you
803 could wrap the existing music with another @code{\transpose}:
806 musicInBflat = @{ e4 @dots{} @}
807 \transpose f c' @{ \transpose c bes, \musicInBflat @}
811 For more information about transposing instruments,
812 see @ref{Instrument transpositions}.
817 @lilypondfile[verbatim,quote,texidoc,doctitle]
818 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
822 @ref{Instrument transpositions},
824 @ref{Modal transformations},
825 @ref{Relative octave entry},
832 @rinternals{TransposedMusic}.
842 The relative conversion will not affect @code{\transpose},
843 @code{\chordmode} or @code{\relative} sections in its argument. To use
844 relative mode within transposed music, an additional @code{\relative}
845 must be placed inside @code{\transpose}.
847 Triple accidentals will not be printed if using @code{\transpose}. An
848 @q{enharmonically equivalent} pitch will be used instead (e.g. d-flat
849 rather than e-triple-flat).
853 @unnumberedsubsubsec Inversion
856 @cindex operation, inversion
859 A music expression can be inverted and transposed in a single
863 \inversion @var{around-pitch} @var{to-pitch} @var{musicexpr}
866 The @code{@var{musicexpr}} is inverted interval-by-interval around
867 @code{@var{around-pitch}}, and then transposed so that
868 @code{@var{around-pitch}} is mapped to @code{@var{to-pitch}}.
870 @lilypond[verbatim,quote]
871 music = \relative { c' d e f }
874 \inversion d' d' \music
875 \inversion d' ees' \music
879 @warning{Motifs to be inverted should be expressed in absolute form
880 or be first converted to absolute form by enclosing them in a
881 @code{\relative} block.}
885 @ref{Modal transformations},
891 @unnumberedsubsubsec Retrograde
893 @cindex retrograde transformation
894 @cindex transformation, retrograde
895 @cindex operation, retrograde
896 @funindex \retrograde
899 A music expression can be reversed to produce its retrograde:
901 @lilypond[verbatim,quote]
902 music = \relative { c'8. ees16( fis8. a16 b8.) gis16 f8. d16 }
911 Manual ties inside @code{\retrograde} will be broken and
912 generate warnings. Some ties can be generated automatically
913 by enabling @ref{Automatic note splitting}.
918 @ref{Modal transformations},
922 @node Modal transformations
923 @unnumberedsubsubsec Modal transformations
925 @cindex modal transformations
926 @cindex transformations, modal
927 @cindex operations, modal
929 In a musical composition that is based on a scale, a motif is
930 frequently transformed in various ways. It may be
931 @notation{transposed} to start at different places in the scale or
932 it may be @notation{inverted} around a pivot point in the scale.
933 It may also be reversed to produce its @notation{retrograde}, see
936 @warning{Any note that does not lie within the given scale will be
939 @subsubsubheading Modal transposition
941 @cindex modal transposition
942 @cindex transposition, modal
943 @cindex operation, transposition
944 @funindex \modalTranspose
945 @funindex modalTranspose
947 A motif can be transposed within a given scale with:
950 \modalTranspose @var{from-pitch} @var{to-pitch} @var{scale} @var{motif}
953 The notes of @var{motif} are shifted within the @var{scale} by the
954 number of scale degrees given by the interval between @var{to-pitch}
955 and @var{from-pitch}:
957 @lilypond[verbatim,quote]
958 diatonicScale = \relative { c' d e f g a b }
959 motif = \relative { c'8 d e f g a b c }
963 \modalTranspose c f \diatonicScale \motif
964 \modalTranspose c b, \diatonicScale \motif
968 An ascending scale of any length and with any intervals may be
971 @lilypond[verbatim,quote]
972 pentatonicScale = \relative { ges aes bes des ees }
973 motif = \relative { ees'8 des ges,4 <ges' bes,> <ges bes,> }
977 \modalTranspose ges ees' \pentatonicScale \motif
981 When used with a chromatic scale @code{\modalTranspose} has a
982 similar effect to @code{\transpose}, but with the ability to
983 specify the names of the notes to be used:
985 @lilypond[verbatim,quote]
986 chromaticScale = \relative { c' cis d dis e f fis g gis a ais b }
987 motif = \relative { c'8 d e f g a b c }
991 \transpose c f \motif
992 \modalTranspose c f \chromaticScale \motif
996 @subsubsubheading Modal inversion
998 @cindex modal inversion
999 @cindex inversion, modal
1000 @cindex operation, modal inversion
1001 @funindex \modalInversion
1002 @funindex modalInversion
1004 A motif can be inverted within a given scale around a given pivot
1005 note and transposed in a single operation with:
1008 \modalInversion @var{around-pitch} @var{to-pitch} @var{scale} @var{motif}
1011 The notes of @var{motif} are placed the same number of scale degrees
1012 from the @var{around-pitch} note within the @var{scale}, but in the
1013 opposite direction, and the result is then shifted within the
1014 @var{scale} by the number of scale degrees given by the interval between
1015 @var{to-pitch} and @var{around-pitch}.
1017 So to simply invert around a note in the scale use the same value for
1018 @var{around-pitch} and @var{to-pitch}:
1020 @lilypond[verbatim,quote]
1021 octatonicScale = \relative { ees' f fis gis a b c d }
1022 motif = \relative { c'8. ees16 fis8. a16 b8. gis16 f8. d16 }
1026 \modalInversion fis' fis' \octatonicScale \motif
1030 To invert around a pivot between two notes in the scale, invert around
1031 one of the notes and then transpose by one scale degree. The two notes
1032 specified can be interpreted as bracketing the pivot point:
1034 @lilypond[verbatim,quote]
1035 scale = \relative { c' g' }
1036 motive = \relative { c' c g' c, }
1040 \modalInversion c' g' \scale \motive
1044 The combined operation of inversion and retrograde produce the
1045 retrograde-inversion:
1047 @lilypond[verbatim,quote]
1048 octatonicScale = \relative { ees' f fis gis a b c d }
1049 motif = \relative { c'8. ees16 fis8. a16 b8. gis16 f8. d16 }
1053 \retrograde \modalInversion c' c' \octatonicScale \motif
1064 @node Displaying pitches
1065 @subsection Displaying pitches
1067 This section discusses how to alter the output of pitches.
1073 * Instrument transpositions::
1074 * Automatic accidentals::
1080 @unnumberedsubsubsec Clef
1091 @cindex soprano clef
1092 @cindex mezzosoprano clef
1093 @cindex baritone clef
1094 @cindex varbaritone clef
1095 @cindex subbass clef
1097 @cindex ancient clef
1098 @cindex clef, ancient
1102 @cindex clef, treble
1103 @cindex clef, violin
1107 @cindex clef, french
1108 @cindex clef, soprano
1109 @cindex clef, mezzosoprano
1110 @cindex clef, baritone
1111 @cindex clef, varbaritone
1112 @cindex clef, subbass
1118 Without any explicit command, the default clef for LilyPond is the
1119 treble (or @emph{G}) clef.
1121 @lilypond[verbatim,quote,fragment,ragged-right]
1125 However, the clef can be changed by using the @code{\clef} command and
1126 an appropriate clef name. @emph{Middle C} is shown in each of the
1129 @lilypond[verbatim,quote,fragment]
1140 For the full range of possible clef names see @ref{Clef styles}.
1142 Specialized clefs, such as those used in @emph{Ancient} music, are
1143 described in @ref{Mensural clefs} and @ref{Gregorian clefs}. Music that
1144 requires tablature clefs is discussed in @ref{Default tablatures} and
1145 @ref{Custom tablatures}.
1148 @cindex Clefs with cue notes
1149 For mixing clefs when using cue notes, see the @code{\cueClef} and
1150 @code{\cueDuringWithClef} commands in @ref{Formatting cue notes}.
1152 @cindex transposing clef
1153 @cindex clef, transposing
1154 @cindex octave transposition
1155 @cindex optional octave transposition
1156 @cindex octave transposition, optional
1157 @cindex choral tenor clef
1158 @cindex tenor clef, choral
1160 By adding@tie{}@code{_8} or@tie{}@code{^8} to the clef name, the
1161 clef is transposed one octave down or up respectively,
1162 and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves.
1163 Other integers can be used if required. Clef names containing
1164 non-alphabetic characters must be enclosed in quotes
1166 @lilypond[verbatim,quote,fragment]
1181 Optional octavation can be obtained by enclosing the numeric
1182 argument in parentheses or brackets:
1184 @lilypond[verbatim,quote,fragment]
1191 The pitches are displayed as if the numeric argument were
1192 given without parentheses/brackets.
1194 By default, a clef change taking place at a line break will cause
1195 the new clef symbol to be printed at the end of the previous line,
1196 as a @emph{warning} clef, as well as the beginning of the next.
1197 This @emph{warning} clef can be suppressed.
1199 @lilypond[verbatim,quote,fragment]
1200 \clef treble { c'2 c' } \break
1201 \clef bass { c'2 c' } \break
1203 \set Staff.explicitClefVisibility = #end-of-line-invisible
1205 \unset Staff.explicitClefVisibility
1206 \clef bass { c'2 c' } \break
1209 By default, a clef that has previously been printed will not be
1210 re-printed if the same @code{\clef} command is issued again and
1211 will be ignored. The the command
1212 @code{\set Staff.forceClef = ##t} changes this behaviour.
1214 @lilypond[verbatim,quote,fragment]
1219 \set Staff.forceClef = ##t
1225 When there is a manual clef change, the glyph of the changed clef
1226 will be smaller than normal. This behaviour can be overridden.
1228 @lilypond[verbatim,quote,fragment]
1235 \override Staff.Clef.full-size-change = ##t
1240 \revert Staff.Clef.full-size-change
1248 @lilypondfile[verbatim,quote,texidoc,doctitle]
1249 {tweaking-clef-properties.ly}
1253 @ref{Mensural clefs},
1254 @ref{Gregorian clefs},
1255 @ref{Default tablatures},
1256 @ref{Custom tablatures},
1257 @ref{Formatting cue notes}.
1260 @file{scm/parser-clef.scm}.
1265 Internals Reference:
1266 @rinternals{Clef_engraver},
1268 @rinternals{ClefModifier},
1269 @rinternals{clef-interface}.
1272 Ottavation numbers attached to clefs are treated as separate
1273 grobs. So any @code{\override} done to the @var{Clef} will also
1274 need to be applied, as a separate @code{\override}, to the
1275 @var{ClefModifier} grob.
1277 @lilypond[fragment,quote,verbatim]
1279 \override Clef.color = #blue
1280 \override ClefModifier.color = #red
1283 \clef "treble_8" c'4
1288 @unnumberedsubsubsec Key signature
1290 @cindex key signature
1295 @c duplicated in Key signature and Accidentals
1296 @warning{New users are sometimes confused about accidentals and
1297 key signatures. In LilyPond, note names are the raw input; key
1298 signatures and clefs determine how this raw input is displayed.
1299 An unaltered note like@tie{}@code{c} means @q{C natural},
1300 regardless of the key signature or clef. For more information,
1301 see @rlearning{Pitches and key signatures}.}
1303 The key signature indicates the tonality in which a piece is
1304 played. It is denoted by a set of alterations (flats or sharps)
1305 at the start of the staff. The key signature may be altered:
1308 \key @var{pitch} @var{mode}
1321 @funindex \mixolydian
1322 @funindex mixolydian
1330 @cindex church modes
1343 Here, @code{@var{mode}} should be @code{\major} or @code{\minor}
1344 to get a key signature of @code{@var{pitch}}-major or
1345 @code{@var{pitch}}-minor, respectively. You may also use the
1346 standard mode names, also called @notation{church modes}:
1347 @code{\ionian}, @code{\dorian}, @code{\phrygian}, @code{\lydian},
1348 @code{\mixolydian}, @code{\aeolian}, and @code{\locrian}.
1350 @lilypond[verbatim,quote,fragment]
1359 Additional modes can be defined, by listing the alterations
1360 for each scale step when the mode starts on C.
1362 @lilypond[verbatim,quote]
1363 freygish = #`((0 . ,NATURAL) (1 . ,FLAT) (2 . ,NATURAL)
1364 (3 . ,NATURAL) (4 . ,NATURAL) (5 . ,FLAT) (6 . ,FLAT))
1367 \key c \freygish c'4 des e f
1368 \bar "||" \key d \freygish d es fis g
1372 Accidentals in the key signature may be printed in octaves other
1373 than their traditional positions, or in multiple octaves, by
1374 using the @code{flat-positions} and @code{sharp-positions}
1375 properties of @code{KeySignature}. Entries in these properties
1376 specify the range of staff-positions where accidentals will be
1377 printed. If a single position is specified in an entry, the
1378 accidentals are placed within the octave ending at that staff
1381 @lilypond[verbatim, quote,fragment]
1382 \override Staff.KeySignature.flat-positions = #'((-5 . 5))
1383 \override Staff.KeyCancellation.flat-positions = #'((-5 . 5))
1384 \clef bass \key es \major es g bes d'
1385 \clef treble \bar "||" \key es \major es' g' bes' d''
1387 \override Staff.KeySignature.sharp-positions = #'(2)
1388 \bar "||" \key b \major b' fis' b'2
1393 @lilypondfile[verbatim,quote,texidoc,doctitle]
1394 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
1396 @lilypondfile[verbatim,quote,texidoc,doctitle]
1397 {non-traditional-key-signatures.ly}
1402 @rglos{church mode},
1406 @rlearning{Pitches and key signatures}.
1411 Internals Reference:
1412 @rinternals{KeyChangeEvent},
1413 @rinternals{Key_engraver},
1414 @rinternals{Key_performer},
1415 @rinternals{KeyCancellation},
1416 @rinternals{KeySignature},
1417 @rinternals{key-signature-interface}.
1420 @node Ottava brackets
1421 @unnumberedsubsubsec Ottava brackets
1429 @funindex set-octavation
1433 @notation{Ottava brackets} introduce an extra transposition of an
1434 octave for the staff:
1436 @lilypond[verbatim,quote]
1454 @lilypondfile[verbatim,quote,texidoc,doctitle]
1457 @lilypondfile[verbatim,quote,texidoc,doctitle]
1458 {adding-an-ottava-marking-to-a-single-voice.ly}
1460 @lilypondfile[verbatim,quote,texidoc,doctitle]
1461 {modifying-the-ottava-spanner-slope.ly}
1470 Internals Reference:
1471 @rinternals{Ottava_spanner_engraver},
1472 @rinternals{OttavaBracket},
1473 @rinternals{ottava-bracket-interface}.
1476 @node Instrument transpositions
1477 @unnumberedsubsubsec Instrument transpositions
1479 @cindex transposition, MIDI
1480 @cindex transposition, instrument
1481 @cindex transposing instrument
1483 @cindex MIDI transposition
1485 @funindex \transposition
1486 @funindex transposition
1488 When typesetting scores that involve transposing instruments, some
1489 parts can be typeset in a different pitch than the
1490 @notation{concert pitch}. In these cases, the key of the
1491 @notation{transposing instrument} should be specified; otherwise
1492 the MIDI output and cues in other parts will produce incorrect
1493 pitches. For more information about quotations, see
1494 @ref{Quoting other voices}.
1497 \transposition @var{pitch}
1500 The pitch to use for @code{\transposition} should correspond to
1501 the real sound heard when a@tie{}@code{c'} written on the staff is
1502 played by the transposing instrument. This pitch is entered in
1503 absolute mode, so an instrument that produces a real sound which
1504 is one tone higher than the printed music should use
1505 @w{@code{\transposition d'}}. @code{\transposition} should
1506 @emph{only} be used if the pitches are @emph{not} being entered in
1509 Here are a few notes for violin and B-flat clarinet where the
1510 parts have been entered using the notes and key as they appear in
1511 each part of the conductor's score. The two instruments are
1514 @lilypond[verbatim,quote]
1516 \new Staff = "violin" {
1518 \set Staff.instrumentName = #"Vln"
1519 \set Staff.midiInstrument = #"violin"
1520 % not strictly necessary, but a good reminder
1527 \new Staff = "clarinet" {
1529 \set Staff.instrumentName = \markup { Cl (B\flat) }
1530 \set Staff.midiInstrument = #"clarinet"
1540 The @code{\transposition} may be changed during a piece. For
1541 example, a clarinetist may be required to switch from an A clarinet
1542 to a B-flat clarinet.
1544 @lilypond[verbatim,quote]
1545 flute = \relative c'' {
1547 \cueDuring #"clarinet" #DOWN {
1548 R1 _\markup\tiny "clarinet"
1550 R1 _\markup\tiny "clarinet"
1553 clarinet = \relative c'' {
1557 R1^\markup { muta in B\flat }
1562 \addQuote "clarinet" \clarinet
1564 \new Staff \with { instrumentName = #"Flute" }
1566 \new Staff \with { instrumentName = #"Cl (A)" }
1573 @rglos{concert pitch},
1574 @rglos{transposing instrument}.
1577 @ref{Quoting other voices},
1584 @node Automatic accidentals
1585 @unnumberedsubsubsec Automatic accidentals
1587 @cindex accidental style
1588 @cindex accidental style, default
1590 @cindex accidentals, automatic
1591 @cindex automatic accidentals
1592 @cindex default accidental style
1594 @funindex \accidentalStyle
1598 There are many different conventions on how to typeset
1599 accidentals. LilyPond provides a function to specify which
1600 accidental style to use. This function is called as follows:
1604 \accidentalStyle voice
1609 The accidental style applies to the current @code{Staff} by
1610 default (with the exception of the styles @code{piano} and
1611 @code{piano-cautionary}, which are explained below). Optionally,
1612 the function can take a second argument that determines in which
1613 scope the style should be changed. For example, to use the same
1614 style in all staves of the current @code{StaffGroup}, use:
1617 \accidentalStyle StaffGroup.voice
1620 The following accidental styles are supported. To demonstrate
1621 each style, we use the following example:
1624 @lilypond[verbatim,quote]
1628 cis''8 fis, bes4 <a cis>8 f bis4 |
1642 \voiceTwo \relative {
1643 <fis a cis>8[ <fis a cis>
1646 \change Staff = down
1651 \change Staff = down
1652 <fis, a cis>4 gis <f a d>2 |
1659 \context Staff = "up" {
1660 \accidentalStyle default
1663 \context Staff = "down" {
1664 \accidentalStyle default
1671 Note that the last lines of this example can be replaced by the
1672 following, as long as the same accidental style should be used in
1678 \context Staff = "up" @{
1679 %%% change the next line as desired:
1680 \accidentalStyle Score.default
1683 \context Staff = "down" @{
1691 @c don't use verbatim in this table.
1695 @cindex default accidental style
1696 @cindex accidental style, default
1700 This is the default typesetting behavior. It corresponds to
1701 eighteenth-century common practice: accidentals are remembered to
1702 the end of the measure in which they occur and only in their own
1703 octave. Thus, in the example below, no natural signs are printed
1704 before the@tie{}@code{b} in the second measure or the
1711 cis''8 fis, bes4 <a cis>8 f bis4 |
1725 \voiceTwo \relative {
1726 <fis a cis>8[ <fis a cis>
1729 \change Staff = down
1734 \change Staff = down
1735 <fis, a cis>4 gis <f a d>2 |
1742 \context Staff = "up" {
1743 \accidentalStyle default
1746 \context Staff = "down" {
1747 \accidentalStyle default
1756 @cindex accidental style, voice
1757 @cindex voice accidental style
1758 @cindex accidental style, modern
1759 @cindex modern accidental style
1760 @cindex accidental style, modern-cautionary
1761 @cindex modern-cautionary accidental style
1765 The normal behavior is to remember the accidentals at
1766 @code{Staff}-level. In this style, however, accidentals are
1767 typeset individually for each voice. Apart from that, the rule is
1768 similar to @code{default}.
1770 As a result, accidentals from one voice do not get canceled in
1771 other voices, which is often an unwanted result: in the following
1772 example, it is hard to determine whether the second@tie{}@code{a}
1773 should be played natural or sharp. The @code{voice} option should
1774 therefore be used only if the voices are to be read solely by
1775 individual musicians. If the staff is to be used by one musician
1776 (e.g., a conductor or in a piano score) then @code{modern} or
1777 @code{modern-cautionary} should be used instead.
1784 cis''8 fis, bes4 <a cis>8 f bis4 |
1798 \voiceTwo \relative {
1799 <fis a cis>8[ <fis a cis>
1802 \change Staff = down
1807 \change Staff = down
1808 <fis, a cis>4 gis <f a d>2 |
1815 \context Staff = "up" {
1816 \accidentalStyle voice
1819 \context Staff = "down" {
1820 \accidentalStyle voice
1829 @cindex accidentals, modern style
1830 @cindex modern style accidentals
1834 This rule corresponds to the common practice in the twentieth
1835 century. It omits some extra natural signs, which were
1836 traditionally prefixed to a sharp following a double sharp,
1837 or a flat following a double flat. The @code{modern} rule
1838 prints the same accidentals as @code{default}, with
1839 two additions that serve to avoid ambiguity: after temporary
1840 accidentals, cancellation marks are printed also in the following
1841 measure (for notes in the same octave) and, in the same measure,
1842 for notes in other octaves. Hence the naturals before
1843 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1850 cis''8 fis, bes4 <a cis>8 f bis4 |
1864 \voiceTwo \relative {
1865 <fis a cis>8[ <fis a cis>
1868 \change Staff = down
1873 \change Staff = down
1874 <fis, a cis>4 gis <f a d>2 |
1881 \context Staff = "up" {
1882 \accidentalStyle modern
1885 \context Staff = "down" {
1886 \accidentalStyle modern
1893 @item modern-cautionary
1895 @cindex accidentals, modern cautionary style
1896 @cindex modern accidental style
1897 @cindex modern cautionary accidental style
1898 @cindex modern style accidentals
1899 @cindex modern style cautionary accidentals
1901 @funindex modern-cautionary
1903 This rule is similar to @code{modern}, but the @q{extra} accidentals
1904 are printed as cautionary accidentals (with parentheses). They can also
1905 be printed at a different size by overriding
1906 @code{AccidentalCautionary}'s @code{font-size} property.
1912 cis''8 fis, bes4 <a cis>8 f bis4 |
1926 \voiceTwo \relative {
1927 <fis a cis>8[ <fis a cis>
1930 \change Staff = down
1935 \change Staff = down
1936 <fis, a cis>4 gis <f a d>2 |
1943 \context Staff = "up" {
1944 \accidentalStyle modern-cautionary
1947 \context Staff = "down" {
1948 \accidentalStyle modern-cautionary
1957 @cindex accidental style, modern
1958 @cindex accidentals, modern
1959 @cindex accidentals, multivoice
1960 @cindex modern accidental style
1961 @cindex modern accidentals
1962 @cindex multivoice accidentals
1964 @funindex modern-voice
1966 This rule is used for multivoice accidentals to be read both by
1967 musicians playing one voice and musicians playing all voices.
1968 Accidentals are typeset for each voice, but they @emph{are}
1969 canceled across voices in the same @code{Staff}. Hence,
1970 the@tie{}@code{a} in the last measure is canceled because the
1971 previous cancellation was in a different voice, and
1972 the@tie{}@code{d} in the lower staff is canceled because of the
1973 accidental in a different voice in the previous measure:
1979 cis''8 fis, bes4 <a cis>8 f bis4 |
1993 \voiceTwo \relative {
1994 <fis a cis>8[ <fis a cis>
1997 \change Staff = down
2002 \change Staff = down
2003 <fis, a cis>4 gis <f a d>2 |
2010 \context Staff = "up" {
2011 \accidentalStyle modern-voice
2014 \context Staff = "down" {
2015 \accidentalStyle modern-voice
2022 @cindex accidental style, cautionary, modern voice
2023 @cindex accidental style, modern voice cautionary
2024 @cindex accidental style, voice, modern cautionary
2026 @funindex modern-voice-cautionary
2028 @item modern-voice-cautionary
2030 This rule is the same as @code{modern-voice}, but with the extra
2031 accidentals (the ones not typeset by @code{voice}) typeset as
2032 cautionaries. Even though all accidentals typeset by
2033 @code{default} @emph{are} typeset with this rule, some of them are
2034 typeset as cautionaries.
2040 cis''8 fis, bes4 <a cis>8 f bis4 |
2054 \voiceTwo \relative {
2055 <fis a cis>8[ <fis a cis>
2058 \change Staff = down
2063 \change Staff = down
2064 <fis, a cis>4 gis <f a d>2 |
2071 \context Staff = "up" {
2072 \accidentalStyle modern-voice-cautionary
2075 \context Staff = "down" {
2076 \accidentalStyle modern-voice-cautionary
2085 @cindex accidental style, piano
2086 @cindex accidentals, piano
2087 @cindex piano accidental style
2088 @cindex piano accidentals
2092 This rule reflects twentieth-century practice for piano notation.
2093 Its behavior is very similar to @code{modern} style, but here
2094 accidentals also get canceled across the staves in the same
2095 @code{GrandStaff} or @code{PianoStaff}, hence all the
2096 cancellations of the final notes.
2098 This accidental style applies to the current @code{GrandStaff} or
2099 @code{PianoStaff} by default.
2105 cis''8 fis, bes4 <a cis>8 f bis4 |
2119 \voiceTwo \relative {
2120 <fis a cis>8[ <fis a cis>
2123 \change Staff = down
2128 \change Staff = down
2129 <fis, a cis>4 gis <f a d>2 |
2136 \context Staff = "up" {
2137 \accidentalStyle piano
2140 \context Staff = "down" {
2147 @item piano-cautionary
2149 @cindex accidentals, piano cautionary
2150 @cindex cautionary accidentals, piano
2151 @cindex piano cautionary accidentals
2152 @cindex accidental style, piano cautionary
2153 @cindex cautionary accidental style, piano
2154 @cindex piano cautionary accidental style
2156 @funindex piano-cautionary
2158 This is the same as @code{piano} but with the extra accidentals
2159 typeset as cautionaries.
2165 cis''8 fis, bes4 <a cis>8 f bis4 |
2179 \voiceTwo \relative {
2180 <fis a cis>8[ <fis a cis>
2183 \change Staff = down
2188 \change Staff = down
2189 <fis, a cis>4 gis <f a d>2 |
2196 \context Staff = "up" {
2197 \accidentalStyle piano-cautionary
2200 \context Staff = "down" {
2210 @cindex neo-modern accidental style
2211 @cindex accidental style, neo-modern
2213 @funindex neo-modern
2215 This rule reproduces a common practice in contemporary music:
2216 accidentals are printed like with @code{modern}, but they are printed
2217 again if the same note appears later in the same measure -- except
2218 if the note is immediately repeated.
2224 cis''8 fis, bes4 <a cis>8 f bis4 |
2238 \voiceTwo \relative {
2239 <fis a cis>8[ <fis a cis>
2242 \change Staff = down
2247 \change Staff = down
2248 <fis, a cis>4 gis <f a d>2 |
2255 \context Staff = "up" {
2256 \accidentalStyle neo-modern
2259 \context Staff = "down" {
2260 \accidentalStyle neo-modern
2267 @item neo-modern-cautionary
2269 @cindex neo-modern-cautionary accidental style
2270 @cindex accidental style, neo-modern-cautionary
2272 @funindex neo-modern-cautionary
2274 This rule is similar to @code{neo-modern}, but the @q{extra} accidentals
2275 are printed as cautionary accidentals (with parentheses). They can also
2276 be printed at a different size by overriding
2277 @code{AccidentalCautionary}'s @code{font-size} property.
2283 cis''8 fis, bes4 <a cis>8 f bis4 |
2297 \voiceTwo \relative {
2298 <fis a cis>8[ <fis a cis>
2301 \change Staff = down
2306 \change Staff = down
2307 <fis, a cis>4 gis <f a d>2 |
2314 \context Staff = "up" {
2315 \accidentalStyle neo-modern-cautionary
2318 \context Staff = "down" {
2319 \accidentalStyle neo-modern-cautionary
2327 @item neo-modern-voice
2329 @cindex neo-modern-voice accidental style
2330 @cindex accidental style, neo-modern-voice
2332 @funindex neo-modern-voice
2334 This rule is used for multivoice accidentals to be read both by
2335 musicians playing one voice and musicians playing all voices.
2336 Accidentals are typeset for each voice as with @code{neo-modern},
2337 but they are canceled across voices in the same @code{Staff}.
2343 cis''8 fis, bes4 <a cis>8 f bis4 |
2357 \voiceTwo \relative {
2358 <fis a cis>8[ <fis a cis>
2361 \change Staff = down
2366 \change Staff = down
2367 <fis, a cis>4 gis <f a d>2 |
2374 \context Staff = "up" {
2375 \accidentalStyle neo-modern-voice
2378 \context Staff = "down" {
2379 \accidentalStyle neo-modern-voice
2386 @item neo-modern-voice-cautionary
2388 @cindex neo-modern-voice-cautionary accidental style
2389 @cindex accidental style, neo-modern-voice-cautionary
2391 @funindex neo-modern-voice-cautionary
2393 This rule is similar to @code{neo-modern-voice}, but the extra
2394 accidentals are printed as cautionary accidentals.
2400 cis''8 fis, bes4 <a cis>8 f bis4 |
2414 \voiceTwo \relative {
2415 <fis a cis>8[ <fis a cis>
2418 \change Staff = down
2423 \change Staff = down
2424 <fis, a cis>4 gis <f a d>2 |
2431 \context Staff = "up" {
2432 \accidentalStyle neo-modern-voice-cautionary
2435 \context Staff = "down" {
2436 \accidentalStyle neo-modern-voice-cautionary
2445 @cindex dodecaphonic accidental style
2446 @cindex dodecaphonic style, neo-modern
2448 @funindex dodecaphonic
2450 This rule reflects a practice introduced by composers at
2451 the beginning of the 20th century, in an attempt to
2452 abolish the hierarchy between natural and non-natural notes.
2453 With this style, @emph{every} note gets an accidental sign,
2454 including natural signs.
2460 cis''8 fis, bes4 <a cis>8 f bis4 |
2474 \voiceTwo \relative {
2475 <fis a cis>8[ <fis a cis>
2478 \change Staff = down
2483 \change Staff = down
2484 <fis, a cis>4 gis <f a d>2 |
2491 \context Staff = "up" {
2492 \accidentalStyle dodecaphonic
2495 \context Staff = "down" {
2496 \accidentalStyle dodecaphonic
2503 @item dodecaphonic-no-repeat
2505 @cindex dodecaphonic accidental style
2506 @cindex dodecaphonic style, neo-modern
2508 @funindex dodecaphonic-no-repeat
2510 Like with the dodecaphonic accidental style @emph{every} note
2511 gets an accidental sign by default, but accidentals are
2512 suppressed for pitches immediately repeated within the same staff.
2518 cis''8 fis, bes4 <a cis>8 f bis4 |
2532 \voiceTwo \relative {
2533 <fis a cis>8[ <fis a cis>
2536 \change Staff = down
2541 \change Staff = down
2542 <fis, a cis>4 gis <f a d>2 |
2549 \context Staff = "up" {
2550 \accidentalStyle dodecaphonic-no-repeat
2553 \context Staff = "down" {
2554 \accidentalStyle dodecaphonic-no-repeat
2562 @item dodecaphonic-first
2564 @cindex dodecaphonic accidental style
2565 @cindex dodecaphonic style, neo-modern
2567 @funindex dodecaphonic-first
2569 Similar to the dodecaphonic accidental style @emph{every} pitch
2570 gets an accidental sign, but only the first time it is encountered
2571 in a measure. Accidentals are only remembered for the actual octave
2572 but throughout voices.
2578 cis''8 fis, bes4 <a cis>8 f bis4 |
2592 \voiceTwo \relative {
2593 <fis a cis>8[ <fis a cis>
2596 \change Staff = down
2601 \change Staff = down
2602 <fis, a cis>4 gis <f a d>2 |
2609 \context Staff = "up" {
2610 \accidentalStyle dodecaphonic-first
2613 \context Staff = "down" {
2614 \accidentalStyle dodecaphonic-first
2624 @cindex teaching accidental style
2625 @cindex accidental style, teaching
2629 This rule is intended for students, and makes it easy to create
2630 scale sheets with automatically created cautionary accidentals.
2631 Accidentals are printed like with @code{modern}, but cautionary
2632 accidentals are added for all sharp or flat tones specified by the
2633 key signature, except if the note is immediately repeated.
2635 @lilypond[quote,staffsize=18]
2639 cis''8 fis, bes4 <a cis>8 f bis4 |
2653 \voiceTwo \relative {
2654 <fis a cis>8[ <fis a cis>
2657 \change Staff = down
2662 \change Staff = down
2663 <fis, a cis>4 gis <f a d>2 |
2670 \context Staff = "up" {
2672 \accidentalStyle teaching
2675 \context Staff = "down" {
2677 \accidentalStyle teaching
2688 @cindex accidental style, no reset
2689 @cindex no reset accidental style
2693 This is the same as @code{default} but with accidentals lasting
2694 @q{forever} and not only within the same measure:
2700 cis''8 fis, bes4 <a cis>8 f bis4 |
2714 \voiceTwo \relative {
2715 <fis a cis>8[ <fis a cis>
2718 \change Staff = down
2723 \change Staff = down
2724 <fis, a cis>4 gis <f a d>2 |
2731 \context Staff = "up" {
2732 \accidentalStyle no-reset
2735 \context Staff = "down" {
2736 \accidentalStyle no-reset
2745 @cindex forget accidental style
2746 @cindex accidental style, forget
2750 This is the opposite of @code{no-reset}: Accidentals are not
2751 remembered at all -- and hence all accidentals are typeset
2752 relative to the key signature, regardless of what came before in
2759 cis''8 fis, bes4 <a cis>8 f bis4 |
2773 \voiceTwo \relative {
2774 <fis a cis>8[ <fis a cis>
2777 \change Staff = down
2782 \change Staff = down
2783 <fis, a cis>4 gis <f a d>2 |
2790 \context Staff = "up" {
2791 \accidentalStyle forget
2794 \context Staff = "down" {
2795 \accidentalStyle forget
2807 Internals Reference:
2808 @rinternals{Accidental},
2809 @rinternals{Accidental_engraver},
2810 @rinternals{GrandStaff},
2811 @rinternals{PianoStaff},
2813 @rinternals{AccidentalSuggestion},
2814 @rinternals{AccidentalPlacement},
2815 @rinternals{accidental-suggestion-interface}.
2817 @cindex accidentals and simultaneous notes
2818 @cindex simultaneous notes and accidentals
2819 @cindex accidentals in chords
2820 @cindex chords, accidentals in
2823 Simultaneous notes are not considered in the automatic
2824 determination of accidentals; only previous notes and the key
2825 signature are considered. Forcing accidentals with@tie{}@code{!}
2826 or@tie{}@code{?} may be required when the same note name occurs
2827 simultaneously with different alterations, as in @samp{<f! fis!>}.
2829 Cautionary cancellation of accidentals is done by looking at previous measure.
2830 However, in the @code{\alternative} block following a @code{\repeat volta N}
2831 section, one would expect the cancellation being calculated using the previous
2832 @emph{played} measure, not previous @emph{printed} measure.
2833 In the following example, the natural @code{c} in the second alternative does
2834 not need a natural sign:
2838 \accidentalStyle modern
2850 The following work-around can be used: define a function that locally changes
2851 the accidental style to @code{forget}:
2853 @lilypond[verbatim,quote]
2854 forget = #(define-music-function (music) (ly:music?) #{
2855 \accidentalStyle forget
2857 \accidentalStyle modern
2860 \accidentalStyle modern
2874 @unnumberedsubsubsec Ambitus
2877 @cindex range of pitches
2880 The term @notation{ambitus} (pl. ambitus) denotes a range of
2881 pitches for a given voice in a part of music. It may also denote
2882 the pitch range that a musical instrument is capable of playing.
2883 Ambitus are printed on vocal parts so that performers can easily
2884 determine if it matches their capabilities.
2886 Ambitus are denoted at the beginning of a piece near the initial
2887 clef. The range is graphically specified by two note heads that
2888 represent the lowest and highest pitches. Accidentals are only
2889 printed if they are not part of the key signature.
2891 @lilypond[verbatim,quote]
2895 \consists "Ambitus_engraver"
2908 @lilypondfile[verbatim,quote,texidoc,doctitle]
2909 {adding-ambitus-per-voice.ly}
2911 @lilypondfile[verbatim,quote,texidoc,doctitle]
2912 {ambitus-with-multiple-voices.ly}
2914 @lilypondfile[verbatim,quote,texidoc,doctitle]
2915 {changing-the-ambitus-gap.ly}
2924 Internals Reference:
2925 @rinternals{Ambitus_engraver},
2928 @rinternals{Ambitus},
2929 @rinternals{AmbitusAccidental},
2930 @rinternals{AmbitusLine},
2931 @rinternals{AmbitusNoteHead},
2932 @rinternals{ambitus-interface}.
2935 There is no collision handling in the case of multiple per-voice
2940 @subsection Note heads
2942 This section suggests ways of altering note heads.
2945 * Special note heads::
2946 * Easy notation note heads::
2947 * Shape note heads::
2951 @node Special note heads
2952 @unnumberedsubsubsec Special note heads
2954 @cindex note heads, special
2955 @cindex note heads, cross
2956 @cindex note heads, diamond
2957 @cindex note heads, parlato
2958 @cindex note heads, harmonic
2959 @cindex note heads, guitar
2960 @cindex special note heads
2961 @cindex cross note heads
2962 @cindex diamond note heads
2963 @cindex parlato note heads
2964 @cindex harmonic note heads
2965 @cindex guitar note heads
2966 @cindex note head styles
2967 @cindex styles, note heads
2971 The appearance of note heads may be altered:
2973 @lilypond[verbatim,quote]
2976 \override NoteHead.style = #'cross
2978 \revert NoteHead.style
2980 \override NoteHead.style = #'harmonic
2982 \revert NoteHead.style
2987 To see all note head styles, see @ref{Note head styles}.
2989 The @code{cross} style is used to represent a variety of musical
2990 intentions. The following generic predefined commands modify the
2991 note head in both staff and tablature contexts and can be used to
2992 represent any musical meaning:
2994 @lilypond[verbatim,quote]
3004 The music function form of this predefined command may be used
3005 inside and outside chords to generate crossed note heads in both
3006 staff and tablature contexts:
3008 @lilypond[verbatim,quote]
3012 c b < g \xNote c f > b
3016 As synonyms for @code{\xNote}, @code{\xNotesOn} and @code{\xNotesOff},
3017 @code{\deadNote}, @code{\deadNotesOn} and @code{\deadNotesOff} can
3018 be used. The term @notation{dead note} is commonly used by guitarists.
3020 There is also a similar shorthand for diamond shapes:
3022 @lilypond[verbatim,quote]
3024 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic
3040 @ref{Note head styles},
3041 @ref{Chorded notes},
3042 @ref{Indicating harmonics and dampened notes}.
3044 Internals Reference:
3045 @rinternals{note-event},
3046 @rinternals{Note_heads_engraver},
3047 @rinternals{Ledger_line_engraver},
3048 @rinternals{NoteHead},
3049 @rinternals{LedgerLineSpanner},
3050 @rinternals{note-head-interface},
3051 @rinternals{ledger-line-spanner-interface}.
3054 @node Easy notation note heads
3055 @unnumberedsubsubsec Easy notation note heads
3057 @cindex note heads, practice
3058 @cindex practice note heads
3059 @cindex note heads, easy notation
3060 @cindex easy notation
3061 @cindex beginners' music
3062 @cindex music, beginners'
3063 @cindex easy play note heads
3064 @cindex note heads, easy play
3066 @funindex \easyHeadsOn
3067 @funindex easyHeadsOn
3068 @funindex \easyHeadsOff
3069 @funindex easyHeadsOff
3071 The @q{easy play} note head includes a note name inside the head.
3072 It is used in music for beginners. To make the letters readable,
3073 it should be printed in a large font size. To print with a larger
3074 font, see @ref{Setting the staff size}.
3076 @lilypond[verbatim,quote]
3077 #(set-global-staff-size 26)
3089 @code{\easyHeadsOn},
3090 @code{\easyHeadsOff}.
3096 @lilypondfile[verbatim,quote,texidoc,doctitle]
3097 {numbers-as-easy-note-heads.ly}
3101 @ref{Setting the staff size}.
3106 Internals Reference:
3107 @rinternals{note-event},
3108 @rinternals{Note_heads_engraver},
3109 @rinternals{NoteHead},
3110 @rinternals{note-head-interface}.
3113 @node Shape note heads
3114 @unnumberedsubsubsec Shape note heads
3116 @cindex note heads, shape
3117 @cindex note heads, Aiken
3118 @cindex note heads, sacred harp
3120 @cindex Aiken shape note heads
3121 @cindex sacred harp note heads
3122 @cindex note heads, Southern Harmony
3123 @cindex Southern Harmony note heads
3124 @cindex Funk shape note heads
3125 @cindex note heads, Funk
3126 @cindex note heads, Harmonica Sacra
3127 @cindex Harmonica Sacra note heads
3128 @cindex Christian Harmony note heads
3129 @cindex note heads, Christian Harmony
3130 @cindex Walker shape note heads
3131 @cindex note heads, Walker
3133 @funindex \aikenHeads
3134 @funindex aikenHeads
3135 @funindex \sacredHarpHeads
3136 @funindex sacredHarpHeads
3137 @funindex \southernHarmonyHeads
3138 @funindex southernHarmonyHeads
3139 @funindex \funkHeads
3141 @funindex \walkerHeads
3142 @funindex walkerHeads
3144 In shape note head notation, the shape of the note head
3145 corresponds to the harmonic function of a note in the scale. This
3146 notation was popular in nineteenth-century American song books.
3147 Shape note heads can be produced in Sacred Harp, Southern Harmony,
3148 Funk (Harmonica Sacra), Walker, and Aiken (Christian Harmony) styles:
3150 @lilypond[verbatim,quote]
3153 c, d e f g2 a b1 c \break
3155 c,4 d e f g2 a b1 c \break
3156 \southernHarmonyHeads
3157 c,4 d e f g2 a b1 c \break
3159 c,4 d e f g2 a b1 c \break
3161 c,4 d e f g2 a b1 c \break
3167 @funindex \aikenHeadsMinor
3168 @funindex aikenHeadsMinor
3169 @funindex \sacredHarpHeadsMinor
3170 @funindex sacredHarpHeadsMinor
3171 @funindex \southernHarmonyHeadsMinor
3172 @funindex southernHarmonyHeadsMinor
3173 @funindex \funkHeadsMinor
3174 @funindex funkHeadsMinor
3175 @funindex \walkerHeadsMinor
3176 @funindex walkerHeadsMinor
3178 Shapes are typeset according to the step in the scale, where the base
3179 of the scale is determined by the @code{\key} command. When writing
3180 in a minor key, the scale step can be determined from the relative
3183 @lilypond[verbatim,quote]
3187 a b c d e2 f g1 a \break
3189 a,4 b c d e2 f g1 a \break
3190 \sacredHarpHeadsMinor
3192 \southernHarmonyHeadsMinor
3204 @code{\aikenHeadsMinor},
3206 @code{\funkHeadsMinor},
3207 @code{\sacredHarpHeads},
3208 @code{\sacredHarpHeadsMinor},
3209 @code{\southernHarmonyHeads},
3210 @code{\southernHarmonyHeadsMinor},
3211 @code{\walkerHeads},
3212 @code{\walkerHeadsMinor}.
3218 @lilypondfile[verbatim,quote,texidoc,doctitle]
3219 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
3221 To see all note head styles, see @ref{Note head styles}.
3228 @ref{Note head styles}.
3230 Internals Reference:
3231 @rinternals{note-event},
3232 @rinternals{Note_heads_engraver},
3233 @rinternals{NoteHead},
3234 @rinternals{note-head-interface}.
3238 @unnumberedsubsubsec Improvisation
3240 @cindex improvisation
3241 @cindex slashed note heads
3242 @cindex note heads, improvisation
3243 @cindex note heads, slashed
3245 @funindex \improvisationOn
3246 @funindex improvisationOn
3247 @funindex \improvisationOff
3248 @funindex improvisationOff
3250 Improvisation is sometimes denoted with slashed note heads, where
3251 the performer may choose any pitch but should play the specified
3252 rhythm. Such note heads can be created:
3254 @lilypond[verbatim,quote]
3256 \consists "Pitch_squash_engraver"
3258 e''8 e g a a16( bes) a8 g
3269 @code{\improvisationOn},
3270 @code{\improvisationOff}.
3277 Internals Reference:
3278 @rinternals{Pitch_squash_engraver},
3280 @rinternals{RhythmicStaff}.