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]
300 In complex situations, it is sometimes useful to get back to a
301 certain pitch regardless of what happened before. This can be
302 done using @code{\resetRelativeOctave}:
304 @lilypond[verbatim,quote]
311 \resetRelativeOctave c''
316 @funindex \resetRelativeOctave
332 @rinternals{RelativeOctaveMusic}.
334 @cindex relative octave entry and transposition
335 @cindex transposition and relative octave entry
343 @unnumberedsubsubsec Accidentals
346 @cindex key signature
349 @c duplicated in Key signature and Accidentals
350 @warning{New users are sometimes confused about accidentals and
351 key signatures. In LilyPond, note names specify pitches; key
352 signatures and clefs determine how these pitches are displayed.
353 An unaltered note like@tie{}@code{c} means @q{C natural},
354 regardless of the key signature or clef. For more information,
355 see @rlearning{Pitches and key signatures}.}
357 @cindex note names, Dutch
358 @cindex note names, default
359 @cindex default note names
363 @cindex sharp, double
367 @cindex natural pitch
369 A @notation{sharp} pitch is made by adding @code{is} to the note
370 name, and a @notation{flat} pitch by adding @code{es}. As you
371 might expect, a @notation{double sharp} or @notation{double flat}
372 is made by adding @code{isis} or @code{eses}. This syntax is
373 derived from Dutch note naming conventions. To use other names
374 for accidentals, see @ref{Note names in other languages}.
376 @lilypond[verbatim,quote,fragment]
377 \relative c'' { ais1 aes aisis aeses }
380 A natural pitch is entered as a simple note name; no suffix is
381 required. A natural sign will be printed when needed to cancel
382 the effect of an earlier accidental or key signature.
384 @lilypond[verbatim,quote,fragment]
385 \relative c'' { a4 aes a2 }
388 @cindex quarter tones
392 Quarter tones may be added; the following is a series of Cs with
395 @lilypond[verbatim,quote,fragment]
396 \relative c'' { ceseh1 ces ceh c cih cis cisih }
401 @cindex accidental, reminder
402 @cindex accidental, cautionary
403 @cindex accidental, parenthesized
404 @cindex reminder accidental
405 @cindex cautionary accidental
406 @cindex parenthesized accidental
412 Normally accidentals are printed automatically, but you may also
413 print them manually. A reminder accidental can be forced by
414 adding an exclamation mark@tie{}@code{!} after the pitch. A
415 cautionary accidental (i.e., an accidental within parentheses) can
416 be obtained by adding the question mark@tie{}@code{?} after the
419 @lilypond[verbatim,quote,fragment]
420 \relative c'' { cis cis cis! cis? c c c! c? }
423 @cindex accidental on tied note
424 @cindex tied note, accidental
426 Accidentals on tied notes are only printed at the beginning of a
429 @lilypond[verbatim,quote,fragment,ragged-right]
440 @lilypondfile[verbatim,quote,texidoc,doctitle,ragged-right]
441 {hiding-accidentals-on-tied-notes-at-the-start-of-a-new-system.ly}
443 @lilypondfile[verbatim,quote,texidoc,doctitle]
444 {preventing-extra-naturals-from-being-automatically-added.ly}
450 @rglos{double sharp},
453 @rglos{quarter tone}.
456 @rlearning{Pitches and key signatures}.
459 @ref{Automatic accidentals},
460 @ref{Annotational accidentals (musica ficta)},
461 @ref{Note names in other languages}.
467 @rinternals{Accidental_engraver},
468 @rinternals{Accidental},
469 @rinternals{AccidentalCautionary},
470 @rinternals{accidental-interface}.
472 @cindex accidental, quarter-tone
473 @cindex quarter-tone accidental
476 There are no generally accepted standards for denoting
477 quarter-tone accidentals, so LilyPond's symbols do not conform to
481 @node Note names in other languages
482 @unnumberedsubsubsec Note names in other languages
484 @cindex note names, other languages
485 @cindex pitch names, other languages
486 @cindex language, note names in other
487 @cindex language, pitch names in other
489 There are predefined sets of note and accidental names for various
490 other languages. Selecting the note name language is usually done
491 at the beginning of the file; the following example is written
492 using Italian note names:
494 @lilypond[quote,verbatim]
502 The available languages and the note names they define are:
505 @multitable {@code{nederlands}} {do re/re mi fa sol la sib si}
508 @item @code{nederlands}
509 @tab c d e f g a bes b
511 @tab do re mi fa sol la sib si
515 @tab c d e f g a bf b
516 @item @code{espanol} or @code{español}
517 @tab do re mi fa sol la sib si
518 @item @code{français}
519 @tab do ré/re mi fa sol la sib si
520 @item @code{italiano}
521 @tab do re mi fa sol la sib si
524 @item @code{portugues}
525 @tab do re mi fa sol la sib si
531 @tab do re mi fa sol la sib si
535 In addition to note names, accidental suffixes may
536 also vary depending on the language:
539 @multitable {@code{nederlands}} {-@code{s}/-@code{-sharp}} {-@code{f}/-@code{-flat}} {-@code{ss}/-@code{x}/-@code{-sharpsharp}} {-@code{ff}/-@code{-flatflat}}
541 @tab sharp @tab flat @tab double sharp @tab double flat
542 @item @code{nederlands}
543 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
545 @tab -@code{d}/-@code{s} @tab -@code{b} @tab -@code{dd}/-@code{ss} @tab -@code{bb}
547 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
549 @tab -@code{s}/-@code{-sharp} @tab -@code{f}/-@code{-flat} @tab -@code{ss}/-@code{x}/-@code{-sharpsharp}
550 @tab -@code{ff}/-@code{-flatflat}
551 @item @code{espanol} or @code{español}
552 @tab -@code{s} @tab -@code{b} @tab -@code{ss}/-@code{x} @tab -@code{bb}
553 @item @code{français}
554 @tab -@code{d} @tab -@code{b} @tab -@code{dd}/-@code{x} @tab -@code{bb}
555 @item @code{italiano}
556 @tab -@code{d} @tab -@code{b} @tab -@code{dd} @tab -@code{bb}
558 @tab -@code{iss}/-@code{is} @tab -@code{ess}/-@code{es} @tab -@code{ississ}/-@code{isis}
559 @tab -@code{essess}/-@code{eses}
560 @item @code{portugues}
561 @tab -@code{s} @tab -@code{b} @tab -@code{ss} @tab -@code{bb}
563 @tab -@code{is} @tab -@code{es} @tab -@code{isis} @tab -@code{eses}
565 @tab -@code{iss} @tab -@code{ess} @tab -@code{ississ} @tab -@code{essess}
567 @tab -@code{k} @tab -@code{b} @tab -@code{kk} @tab -@code{bb}
571 In Dutch, @code{aes} is contracted to @code{as}, but both forms
572 are accepted in LilyPond. Similarly, both @code{es} and
573 @code{ees} are accepted. This also applies to
574 @code{aeses}@tie{}/@tie{}@code{ases} and
575 @code{eeses}@tie{}/@tie{}@code{eses}. Sometimes only these
576 contracted names are defined in the corresponding language files.
578 @lilypond[verbatim,quote,fragment]
579 \relative c'' { a2 as e es a ases e eses }
589 Some music uses microtones whose alterations are fractions of a
590 @q{normal} sharp or flat. The following table lists note names
591 for quarter-tone accidentals in various languages; here the prefixes
592 @notation{semi-} and @notation{sesqui-} respectively
593 mean @q{half} and @q{one and a half}. Languages that do not
594 appear in this table do not provide special note names yet.
597 @multitable {@code{nederlands}} {@b{semi-sharp}} {@b{semi-flat}} {@b{sesqui-sharp}} {@b{sesqui-flat}}
599 @tab semi-sharp @tab semi-flat @tab sesqui-sharp @tab sesqui-flat
601 @item @code{nederlands}
602 @tab -ih @tab -eh @tab -isih @tab -eseh
604 @tab -ih @tab -eh @tab -isih @tab -eseh
606 @tab -qs @tab -qf @tab -tqs @tab -tqf
607 @item @code{espanol} or @code{español}
608 @tab -cs @tab -cb @tab -tcs @tab -tcb
609 @item @code{français}
610 @tab -sd @tab -sb @tab -dsd @tab -bsb
611 @item @code{italiano}
612 @tab -sd @tab -sb @tab -dsd @tab -bsb
613 @item @code{portugues}
614 @tab -sqt @tab -bqt @tab -stqt @tab -btqt
618 Most languages presented here are commonly associated with
619 Western classical music, also referred to as
620 @notation{Common Practice Period}. However, alternate
621 pitches and tuning systems are also supported: see
622 @ref{Common notation for non-Western music}.
627 @rglos{Common Practice Period}.
630 @ref{Common notation for non-Western music}.
633 @file{scm/define-note-names.scm}.
639 @node Changing multiple pitches
640 @subsection Changing multiple pitches
642 This section discusses how to modify pitches.
649 * Modal transformations::
653 @unnumberedsubsubsec Octave checks
655 @cindex octave correction
657 @cindex control pitch
660 @funindex \octaveCheck
661 @funindex controlpitch
663 In relative mode, it is easy to forget an octave changing mark.
664 Octave checks make such errors easier to find by displaying a
665 warning and correcting the octave if a note is found in an
668 To check the octave of a note, specify the absolute octave after
669 the @code{=}@tie{}symbol. This example will generate a warning
670 (and change the pitch) because the second note is the absolute
671 octave @code{d''} instead of @code{d'} as indicated by the octave
674 @lilypond[verbatim,quote]
681 The octave of notes may also be checked with the
682 @code{\octaveCheck@tie{}@var{controlpitch}} command.
683 @code{@var{controlpitch}} is specified in absolute mode. This
684 checks that the interval between the previous note and the
685 @code{@var{controlpitch}} is within a fourth (i.e., the normal
686 calculation of relative mode). If this check fails, a warning is
687 printed. While the previous note itself is not changed, future
688 notes are relative to the corrected value.
690 @lilypond[verbatim,quote]
698 Compare the two bars below. The first and third @code{\octaveCheck}
699 checks fail, but the second one does not fail.
701 @lilypond[verbatim,quote]
720 @rinternals{RelativeOctaveCheck}.
724 @unnumberedsubsubsec Transpose
728 @cindex transposition
729 @cindex transposition of pitches
730 @cindex transposition of notes
731 @cindex pitches, transposition of
732 @cindex notes, transposition of
736 A music expression can be transposed with @code{\transpose}. The
740 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
744 This means that @code{@var{musicexpr}} is transposed by the
745 interval between the pitches @code{@var{frompitch}} and
746 @code{@var{topitch}}: any note with pitch @code{@var{frompitch}}
747 is changed to @code{@var{topitch}} and any other note is
748 transposed by the same interval. Both pitches are entered in
751 @warning{Music inside a @code{@bs{}transpose} block is absolute
752 unless a @code{@bs{}relative} is included in the block.}
754 Consider a piece written in the key of D-major. It can be
755 transposed up to E-major; note that the key signature is
756 automatically transposed as well.
758 @lilypond[verbatim,quote]
767 @cindex transposing instruments
768 @cindex instruments, transposing
770 If a part written in C (normal @notation{concert pitch}) is to be
771 played on the A clarinet (for which an A is notated as a C and
772 thus sounds a minor third lower than notated), the appropriate
773 part will be produced with:
775 @lilypond[verbatim,quote]
785 Note that we specify @w{@code{\key c \major}} explicitly. If we
786 do not specify a key signature, the notes will be transposed but
787 no key signature will be printed.
789 @code{\transpose} distinguishes between enharmonic pitches: both
790 @w{@code{\transpose c cis}} or @w{@code{\transpose c des}} will
791 transpose up a semitone. The first version will print sharps and
792 the notes will remain on the same scale step, the second version
793 will print flats on the scale step above.
795 @lilypond[verbatim,quote]
796 music = \relative { c' d e f }
798 \transpose c cis { \music }
799 \transpose c des { \music }
804 @code{\transpose} may also be used in a different way, to input
805 written notes for a transposing instrument. The previous examples
806 show how to enter pitches in C (or @notation{concert pitch}) and
807 typeset them for a transposing instrument, but the opposite is
808 also possible if you for example have a set of instrumental parts
809 and want to print a conductor's score. For example, when entering
810 music for a B-flat trumpet that begins on a notated E (concert D),
814 musicInBflat = @{ e4 @dots{} @}
815 \transpose c bes, \musicInBflat
819 To print this music in F (e.g., rearranging to a French horn) you
820 could wrap the existing music with another @code{\transpose}:
823 musicInBflat = @{ e4 @dots{} @}
824 \transpose f c' @{ \transpose c bes, \musicInBflat @}
828 For more information about transposing instruments,
829 see @ref{Instrument transpositions}.
834 @lilypondfile[verbatim,quote,texidoc,doctitle]
835 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
839 @ref{Instrument transpositions},
841 @ref{Modal transformations},
842 @ref{Relative octave entry},
849 @rinternals{TransposedMusic}.
856 The relative conversion will not affect @code{\transpose},
857 @code{\chordmode} or @code{\relative} sections in its argument. To use
858 relative mode within transposed music, an additional @code{\relative}
859 must be placed inside @code{\transpose}.
861 Triple accidentals will not be printed if using @code{\transpose}. An
862 @q{enharmonically equivalent} pitch will be used instead (e.g., d-flat
863 rather than e-triple-flat).
867 @unnumberedsubsubsec Inversion
870 @cindex operation, inversion
873 A music expression can be inverted and transposed in a single
877 \inversion @var{around-pitch} @var{to-pitch} @var{musicexpr}
880 The @code{@var{musicexpr}} is inverted interval-by-interval around
881 @code{@var{around-pitch}}, and then transposed so that
882 @code{@var{around-pitch}} is mapped to @code{@var{to-pitch}}.
884 @lilypond[verbatim,quote]
885 music = \relative { c' d e f }
888 \inversion d' d' \music
889 \inversion d' ees' \music
893 @warning{Motifs to be inverted should be expressed in absolute form
894 or be first converted to absolute form by enclosing them in a
895 @code{\relative} block.}
899 @ref{Modal transformations},
905 @unnumberedsubsubsec Retrograde
907 @cindex retrograde transformation
908 @cindex transformation, retrograde
909 @cindex operation, retrograde
910 @funindex \retrograde
912 A music expression can be reversed to produce its retrograde:
914 @lilypond[verbatim,quote]
915 music = \relative { c'8. ees16( fis8. a16 b8.) gis16 f8. d16 }
924 @code{\retrograde} is a rather simple tool. Since many events are
925 @q{mirrored} rather than exchanged, tweaks and directional
926 modifiers for opening spanners need to be added at the matching
927 closing spanners: @code{^(} needs to be ended by @code{^)}, every
928 @code{\<} or @code{\cresc} needs to be ended by @code{\!} or
929 @code{\endcr}, every @code{\>} or @code{\decr} needs to be ended
930 by @code{\enddecr}. Property-changing commands/overrides with a
931 lasting effect will likely cause surprises.
936 @ref{Modal transformations},
940 @node Modal transformations
941 @unnumberedsubsubsec Modal transformations
943 @cindex modal transformations
944 @cindex transformations, modal
945 @cindex operations, modal
947 In a musical composition that is based on a scale, a motif is
948 frequently transformed in various ways. It may be
949 @notation{transposed} to start at different places in the scale or
950 it may be @notation{inverted} around a pivot point in the scale.
951 It may also be reversed to produce its @notation{retrograde}, see
954 @warning{Any note that does not lie within the given scale will be
957 @subsubsubheading Modal transposition
959 @cindex modal transposition
960 @cindex transposition, modal
961 @cindex operation, transposition
962 @funindex \modalTranspose
964 A motif can be transposed within a given scale with:
967 \modalTranspose @var{from-pitch} @var{to-pitch} @var{scale} @var{motif}
970 The notes of @var{motif} are shifted within the @var{scale} by the
971 number of scale degrees given by the interval between @var{to-pitch}
972 and @var{from-pitch}:
974 @lilypond[verbatim,quote]
975 diatonicScale = \relative { c' d e f g a b }
976 motif = \relative { c'8 d e f g a b c }
980 \modalTranspose c f \diatonicScale \motif
981 \modalTranspose c b, \diatonicScale \motif
985 An ascending scale of any length and with any intervals may be
988 @lilypond[verbatim,quote]
989 pentatonicScale = \relative { ges aes bes des ees }
990 motif = \relative { ees'8 des ges,4 <ges' bes,> <ges bes,> }
994 \modalTranspose ges ees' \pentatonicScale \motif
998 When used with a chromatic scale @code{\modalTranspose} has a
999 similar effect to @code{\transpose}, but with the ability to
1000 specify the names of the notes to be used:
1002 @lilypond[verbatim,quote]
1003 chromaticScale = \relative { c' cis d dis e f fis g gis a ais b }
1004 motif = \relative { c'8 d e f g a b c }
1008 \transpose c f \motif
1009 \modalTranspose c f \chromaticScale \motif
1013 @subsubsubheading Modal inversion
1015 @cindex modal inversion
1016 @cindex inversion, modal
1017 @cindex operation, modal inversion
1018 @funindex \modalInversion
1020 A motif can be inverted within a given scale around a given pivot
1021 note and transposed in a single operation with:
1024 \modalInversion @var{around-pitch} @var{to-pitch} @var{scale} @var{motif}
1027 The notes of @var{motif} are placed the same number of scale degrees
1028 from the @var{around-pitch} note within the @var{scale}, but in the
1029 opposite direction, and the result is then shifted within the
1030 @var{scale} by the number of scale degrees given by the interval between
1031 @var{to-pitch} and @var{around-pitch}.
1033 So to simply invert around a note in the scale use the same value for
1034 @var{around-pitch} and @var{to-pitch}:
1036 @lilypond[verbatim,quote]
1037 octatonicScale = \relative { ees' f fis gis a b c d }
1038 motif = \relative { c'8. ees16 fis8. a16 b8. gis16 f8. d16 }
1042 \modalInversion fis' fis' \octatonicScale \motif
1046 To invert around a pivot between two notes in the scale, invert around
1047 one of the notes and then transpose by one scale degree. The two notes
1048 specified can be interpreted as bracketing the pivot point:
1050 @lilypond[verbatim,quote]
1051 scale = \relative { c' g' }
1052 motive = \relative { c' c g' c, }
1056 \modalInversion c' g' \scale \motive
1060 The combined operation of inversion and retrograde produce the
1061 retrograde-inversion:
1063 @lilypond[verbatim,quote]
1064 octatonicScale = \relative { ees' f fis gis a b c d }
1065 motif = \relative { c'8. ees16 fis8. a16 b8. gis16 f8. d16 }
1069 \retrograde \modalInversion c' c' \octatonicScale \motif
1080 @node Displaying pitches
1081 @subsection Displaying pitches
1083 This section discusses how to alter the output of pitches.
1089 * Instrument transpositions::
1090 * Automatic accidentals::
1096 @unnumberedsubsubsec Clef
1107 @cindex soprano clef
1108 @cindex mezzosoprano clef
1109 @cindex baritone clef
1110 @cindex varbaritone clef
1111 @cindex subbass clef
1113 @cindex ancient clef
1114 @cindex clef, ancient
1118 @cindex clef, treble
1119 @cindex clef, violin
1123 @cindex clef, french
1124 @cindex clef, soprano
1125 @cindex clef, mezzosoprano
1126 @cindex clef, baritone
1127 @cindex clef, varbaritone
1128 @cindex clef, subbass
1133 Without any explicit command, the default clef for LilyPond is the
1134 treble (or @emph{G}) clef.
1136 @lilypond[verbatim,quote,fragment,ragged-right]
1140 However, the clef can be changed by using the @code{\clef} command and
1141 an appropriate clef name. @emph{Middle C} is shown in each of the
1144 @lilypond[verbatim,quote,fragment]
1155 For the full range of possible clef names see @ref{Clef styles}.
1157 Specialized clefs, such as those used in @emph{Ancient} music, are
1158 described in @ref{Mensural clefs} and @ref{Gregorian clefs}. Music that
1159 requires tablature clefs is discussed in @ref{Default tablatures} and
1160 @ref{Custom tablatures}.
1163 @cindex Clefs with cue notes
1164 For mixing clefs when using cue notes, see the @code{\cueClef} and
1165 @code{\cueDuringWithClef} commands in @ref{Formatting cue notes}.
1167 @cindex transposing clef
1168 @cindex clef, transposing
1169 @cindex octave transposition
1170 @cindex optional octave transposition
1171 @cindex octave transposition, optional
1172 @cindex choral tenor clef
1173 @cindex tenor clef, choral
1175 By adding@tie{}@code{_8} or@tie{}@code{^8} to the clef name, the
1176 clef is transposed one octave down or up respectively,
1177 and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves.
1178 Other integers can be used if required. Clef names containing
1179 non-alphabetic characters must be enclosed in quotes
1181 @lilypond[verbatim,quote,fragment]
1196 Optional octavation can be obtained by enclosing the numeric
1197 argument in parentheses or brackets:
1199 @lilypond[verbatim,quote,fragment]
1206 The pitches are displayed as if the numeric argument were
1207 given without parentheses/brackets.
1209 By default, a clef change taking place at a line break will cause
1210 the new clef symbol to be printed at the end of the previous line,
1211 as a @emph{warning} clef, as well as the beginning of the next.
1212 This @emph{warning} clef can be suppressed.
1214 @lilypond[verbatim,quote,fragment]
1215 \clef treble { c'2 c' } \break
1216 \clef bass { c'2 c' } \break
1218 \set Staff.explicitClefVisibility = #end-of-line-invisible
1220 \unset Staff.explicitClefVisibility
1221 \clef bass { c'2 c' } \break
1224 By default, a clef that has previously been printed will not be
1225 re-printed if the same @code{\clef} command is issued again and
1226 will be ignored. The command
1227 @code{\set Staff.forceClef = ##t} changes this behaviour.
1229 @lilypond[verbatim,quote,fragment]
1234 \set Staff.forceClef = ##t
1241 To be more precise, it is not the @code{\clef} command itself that
1242 prints a clef. Instead, it sets or changes a property of the
1243 @code{Clef_engraver}, which then decides by its own whether to
1244 display a clef or not in the current staff. The @code{forceClef}
1245 property overrides this decision locally to re-print a clef once.
1247 When there is a manual clef change, the glyph of the changed clef
1248 will be smaller than normal. This behaviour can be overridden.
1250 @lilypond[verbatim,quote,fragment]
1257 \override Staff.Clef.full-size-change = ##t
1262 \revert Staff.Clef.full-size-change
1270 @lilypondfile[verbatim,quote,texidoc,doctitle]
1271 {tweaking-clef-properties.ly}
1275 @ref{Mensural clefs},
1276 @ref{Gregorian clefs},
1277 @ref{Default tablatures},
1278 @ref{Custom tablatures},
1279 @ref{Formatting cue notes}.
1282 @file{scm/parser-clef.scm}.
1287 Internals Reference:
1288 @rinternals{Clef_engraver},
1290 @rinternals{ClefModifier},
1291 @rinternals{clef-interface}.
1294 Ottavation numbers attached to clefs are treated as separate
1295 grobs. So any @code{\override} done to the @var{Clef} will also
1296 need to be applied, as a separate @code{\override}, to the
1297 @var{ClefModifier} grob.
1299 @lilypond[fragment,quote,verbatim]
1301 \override Clef.color = #blue
1302 \override ClefModifier.color = #red
1305 \clef "treble_8" c'4
1310 @unnumberedsubsubsec Key signature
1312 @cindex key signature
1316 @c duplicated in Key signature and Accidentals
1317 @warning{New users are sometimes confused about accidentals and
1318 key signatures. In LilyPond, note names are the raw input; key
1319 signatures and clefs determine how this raw input is displayed.
1320 An unaltered note like@tie{}@code{c} means @q{C natural},
1321 regardless of the key signature or clef. For more information,
1322 see @rlearning{Pitches and key signatures}.}
1324 The key signature indicates the tonality in which a piece is
1325 played. It is denoted by a set of alterations (flats or sharps)
1326 at the start of the staff. The key signature may be altered:
1329 \key @var{pitch} @var{mode}
1337 @funindex \mixolydian
1342 @cindex church modes
1355 Here, @code{@var{mode}} should be @code{\major} or @code{\minor}
1356 to get a key signature of @code{@var{pitch}}-major or
1357 @code{@var{pitch}}-minor, respectively. You may also use the
1358 standard mode names, also called @notation{church modes}:
1359 @code{\ionian}, @code{\dorian}, @code{\phrygian}, @code{\lydian},
1360 @code{\mixolydian}, @code{\aeolian}, and @code{\locrian}.
1362 @lilypond[verbatim,quote,fragment]
1371 Additional modes can be defined, by listing the alterations
1372 for each scale step when the mode starts on C.
1374 @lilypond[verbatim,quote]
1375 freygish = #`((0 . ,NATURAL) (1 . ,FLAT) (2 . ,NATURAL)
1376 (3 . ,NATURAL) (4 . ,NATURAL) (5 . ,FLAT) (6 . ,FLAT))
1379 \key c \freygish c'4 des e f
1380 \bar "||" \key d \freygish d es fis g
1384 Accidentals in the key signature may be printed in octaves other
1385 than their traditional positions, or in multiple octaves, by
1386 using the @code{flat-positions} and @code{sharp-positions}
1387 properties of @code{KeySignature}. Entries in these properties
1388 specify the range of staff-positions where accidentals will be
1389 printed. If a single position is specified in an entry, the
1390 accidentals are placed within the octave ending at that staff
1393 @lilypond[verbatim, quote,fragment]
1394 \override Staff.KeySignature.flat-positions = #'((-5 . 5))
1395 \override Staff.KeyCancellation.flat-positions = #'((-5 . 5))
1396 \clef bass \key es \major es g bes d'
1397 \clef treble \bar "||" \key es \major es' g' bes' d''
1399 \override Staff.KeySignature.sharp-positions = #'(2)
1400 \bar "||" \key b \major b' fis' b'2
1405 @lilypondfile[verbatim,quote,texidoc,doctitle]
1406 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
1408 @lilypondfile[verbatim,quote,texidoc,doctitle]
1409 {non-traditional-key-signatures.ly}
1414 @rglos{church mode},
1418 @rlearning{Pitches and key signatures}.
1423 Internals Reference:
1424 @rinternals{KeyChangeEvent},
1425 @rinternals{Key_engraver},
1426 @rinternals{Key_performer},
1427 @rinternals{KeyCancellation},
1428 @rinternals{KeySignature},
1429 @rinternals{key-signature-interface}.
1432 @node Ottava brackets
1433 @unnumberedsubsubsec Ottava brackets
1441 @funindex set-octavation
1444 @notation{Ottava brackets} introduce an extra transposition of an
1445 octave for the staff:
1447 @lilypond[verbatim,quote]
1465 @lilypondfile[verbatim,quote,texidoc,doctitle]
1468 @lilypondfile[verbatim,quote,texidoc,doctitle]
1469 {adding-an-ottava-marking-to-a-single-voice.ly}
1471 @lilypondfile[verbatim,quote,texidoc,doctitle]
1472 {modifying-the-ottava-spanner-slope.ly}
1481 Internals Reference:
1482 @rinternals{Ottava_spanner_engraver},
1483 @rinternals{OttavaBracket},
1484 @rinternals{ottava-bracket-interface}.
1487 @node Instrument transpositions
1488 @unnumberedsubsubsec Instrument transpositions
1490 @cindex transposition, MIDI
1491 @cindex transposition, instrument
1492 @cindex transposing instrument
1494 @cindex MIDI transposition
1496 @funindex \transposition
1498 When typesetting scores that involve transposing instruments, some
1499 parts can be typeset in a different pitch than the
1500 @notation{concert pitch}. In these cases, the key of the
1501 @notation{transposing instrument} should be specified; otherwise
1502 the MIDI output and cues in other parts will produce incorrect
1503 pitches. For more information about quotations, see
1504 @ref{Quoting other voices}.
1507 \transposition @var{pitch}
1510 The pitch to use for @code{\transposition} should correspond to
1511 the real sound heard when a@tie{}@code{c'} written on the staff is
1512 played by the transposing instrument. This pitch is entered in
1513 absolute mode, so an instrument that produces a real sound which
1514 is one tone higher than the printed music should use
1515 @w{@code{\transposition d'}}. @code{\transposition} should
1516 @emph{only} be used if the pitches are @emph{not} being entered in
1519 Here are a few notes for violin and B-flat clarinet where the
1520 parts have been entered using the notes and key as they appear in
1521 each part of the conductor's score. The two instruments are
1524 @lilypond[verbatim,quote]
1526 \new Staff = "violin" {
1528 \set Staff.instrumentName = #"Vln"
1529 \set Staff.midiInstrument = #"violin"
1530 % not strictly necessary, but a good reminder
1537 \new Staff = "clarinet" {
1539 \set Staff.instrumentName = \markup { Cl (B\flat) }
1540 \set Staff.midiInstrument = #"clarinet"
1550 The @code{\transposition} may be changed during a piece. For
1551 example, a clarinetist may be required to switch from an A clarinet
1552 to a B-flat clarinet.
1554 @lilypond[verbatim,quote]
1555 flute = \relative c'' {
1557 \cueDuring #"clarinet" #DOWN {
1558 R1 _\markup\tiny "clarinet"
1560 R1 _\markup\tiny "clarinet"
1563 clarinet = \relative c'' {
1567 R1^\markup { muta in B\flat }
1572 \addQuote "clarinet" \clarinet
1574 \new Staff \with { instrumentName = #"Flute" }
1576 \new Staff \with { instrumentName = #"Cl (A)" }
1583 @rglos{concert pitch},
1584 @rglos{transposing instrument}.
1587 @ref{Quoting other voices},
1594 @node Automatic accidentals
1595 @unnumberedsubsubsec Automatic accidentals
1597 @cindex accidental style
1598 @cindex accidental style, default
1600 @cindex accidentals, automatic
1601 @cindex automatic accidentals
1602 @cindex default accidental style
1604 @funindex \accidentalStyle
1608 There are many different conventions on how to typeset
1609 accidentals. LilyPond provides a function to specify which
1610 accidental style to use. This function is called as follows:
1614 \accidentalStyle voice
1619 The accidental style applies to the current @code{Staff} by
1620 default (with the exception of the styles @code{piano} and
1621 @code{piano-cautionary}, which are explained below). Optionally,
1622 the function can take a second argument that determines in which
1623 scope the style should be changed. For example, to use the same
1624 style in all staves of the current @code{StaffGroup}, use:
1627 \accidentalStyle StaffGroup.voice
1630 The following accidental styles are supported. To demonstrate
1631 each style, we use the following example:
1634 @lilypond[verbatim,quote]
1638 cis''8 fis, bes4 <a cis>8 f bis4 |
1652 \voiceTwo \relative {
1653 <fis a cis>8[ <fis a cis>
1656 \change Staff = down
1661 \change Staff = down
1662 <fis, a cis>4 gis <f a d>2 |
1669 \context Staff = "up" {
1670 \accidentalStyle default
1673 \context Staff = "down" {
1674 \accidentalStyle default
1681 Note that the last lines of this example can be replaced by the
1682 following, as long as the same accidental style should be used in
1688 \context Staff = "up" @{
1689 %%% change the next line as desired:
1690 \accidentalStyle Score.default
1693 \context Staff = "down" @{
1701 @c don't use verbatim in this table.
1705 @cindex default accidental style
1706 @cindex accidental style, default
1710 This is the default typesetting behavior. It corresponds to
1711 eighteenth-century common practice: accidentals are remembered to
1712 the end of the measure in which they occur and only in their own
1713 octave. Thus, in the example below, no natural signs are printed
1714 before the@tie{}@code{b} in the second measure or the
1721 cis''8 fis, bes4 <a cis>8 f bis4 |
1735 \voiceTwo \relative {
1736 <fis a cis>8[ <fis a cis>
1739 \change Staff = down
1744 \change Staff = down
1745 <fis, a cis>4 gis <f a d>2 |
1752 \context Staff = "up" {
1753 \accidentalStyle default
1756 \context Staff = "down" {
1757 \accidentalStyle default
1766 @cindex accidental style, voice
1767 @cindex voice accidental style
1768 @cindex accidental style, modern
1769 @cindex modern accidental style
1770 @cindex accidental style, modern-cautionary
1771 @cindex modern-cautionary accidental style
1775 The normal behavior is to remember the accidentals at
1776 @code{Staff}-level. In this style, however, accidentals are
1777 typeset individually for each voice. Apart from that, the rule is
1778 similar to @code{default}.
1780 As a result, accidentals from one voice do not get canceled in
1781 other voices, which is often an unwanted result: in the following
1782 example, it is hard to determine whether the second@tie{}@code{a}
1783 should be played natural or sharp. The @code{voice} option should
1784 therefore be used only if the voices are to be read solely by
1785 individual musicians. If the staff is to be used by one musician
1786 (e.g., a conductor or in a piano score) then @code{modern} or
1787 @code{modern-cautionary} should be used instead.
1794 cis''8 fis, bes4 <a cis>8 f bis4 |
1808 \voiceTwo \relative {
1809 <fis a cis>8[ <fis a cis>
1812 \change Staff = down
1817 \change Staff = down
1818 <fis, a cis>4 gis <f a d>2 |
1825 \context Staff = "up" {
1826 \accidentalStyle voice
1829 \context Staff = "down" {
1830 \accidentalStyle voice
1839 @cindex accidentals, modern style
1840 @cindex modern style accidentals
1844 This rule corresponds to the common practice in the twentieth
1845 century. It omits some extra natural signs, which were
1846 traditionally prefixed to a sharp following a double sharp,
1847 or a flat following a double flat. The @code{modern} rule
1848 prints the same accidentals as @code{default}, with
1849 two additions that serve to avoid ambiguity: after temporary
1850 accidentals, cancellation marks are printed also in the following
1851 measure (for notes in the same octave) and, in the same measure,
1852 for notes in other octaves. Hence the naturals before
1853 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1860 cis''8 fis, bes4 <a cis>8 f bis4 |
1874 \voiceTwo \relative {
1875 <fis a cis>8[ <fis a cis>
1878 \change Staff = down
1883 \change Staff = down
1884 <fis, a cis>4 gis <f a d>2 |
1891 \context Staff = "up" {
1892 \accidentalStyle modern
1895 \context Staff = "down" {
1896 \accidentalStyle modern
1903 @item modern-cautionary
1905 @cindex accidentals, modern cautionary style
1906 @cindex modern accidental style
1907 @cindex modern cautionary accidental style
1908 @cindex modern style accidentals
1909 @cindex modern style cautionary accidentals
1911 @funindex modern-cautionary
1913 This rule is similar to @code{modern}, but the @q{extra} accidentals
1914 are printed as cautionary accidentals (with parentheses). They can also
1915 be printed at a different size by overriding
1916 @code{AccidentalCautionary}'s @code{font-size} property.
1922 cis''8 fis, bes4 <a cis>8 f bis4 |
1936 \voiceTwo \relative {
1937 <fis a cis>8[ <fis a cis>
1940 \change Staff = down
1945 \change Staff = down
1946 <fis, a cis>4 gis <f a d>2 |
1953 \context Staff = "up" {
1954 \accidentalStyle modern-cautionary
1957 \context Staff = "down" {
1958 \accidentalStyle modern-cautionary
1967 @cindex accidental style, modern
1968 @cindex accidentals, modern
1969 @cindex accidentals, multivoice
1970 @cindex modern accidental style
1971 @cindex modern accidentals
1972 @cindex multivoice accidentals
1974 @funindex modern-voice
1976 This rule is used for multivoice accidentals to be read both by
1977 musicians playing one voice and musicians playing all voices.
1978 Accidentals are typeset for each voice, but they @emph{are}
1979 canceled across voices in the same @code{Staff}. Hence,
1980 the@tie{}@code{a} in the last measure is canceled because the
1981 previous cancellation was in a different voice, and
1982 the@tie{}@code{d} in the lower staff is canceled because of the
1983 accidental in a different voice in the previous measure:
1989 cis''8 fis, bes4 <a cis>8 f bis4 |
2003 \voiceTwo \relative {
2004 <fis a cis>8[ <fis a cis>
2007 \change Staff = down
2012 \change Staff = down
2013 <fis, a cis>4 gis <f a d>2 |
2020 \context Staff = "up" {
2021 \accidentalStyle modern-voice
2024 \context Staff = "down" {
2025 \accidentalStyle modern-voice
2032 @cindex accidental style, cautionary, modern voice
2033 @cindex accidental style, modern voice cautionary
2034 @cindex accidental style, voice, modern cautionary
2036 @funindex modern-voice-cautionary
2038 @item modern-voice-cautionary
2040 This rule is the same as @code{modern-voice}, but with the extra
2041 accidentals (the ones not typeset by @code{voice}) typeset as
2042 cautionaries. Even though all accidentals typeset by
2043 @code{default} @emph{are} typeset with this rule, some of them are
2044 typeset as cautionaries.
2050 cis''8 fis, bes4 <a cis>8 f bis4 |
2064 \voiceTwo \relative {
2065 <fis a cis>8[ <fis a cis>
2068 \change Staff = down
2073 \change Staff = down
2074 <fis, a cis>4 gis <f a d>2 |
2081 \context Staff = "up" {
2082 \accidentalStyle modern-voice-cautionary
2085 \context Staff = "down" {
2086 \accidentalStyle modern-voice-cautionary
2095 @cindex accidental style, piano
2096 @cindex accidentals, piano
2097 @cindex piano accidental style
2098 @cindex piano accidentals
2102 This rule reflects twentieth-century practice for piano notation.
2103 Its behavior is very similar to @code{modern} style, but here
2104 accidentals also get canceled across the staves in the same
2105 @code{GrandStaff} or @code{PianoStaff}, hence all the
2106 cancellations of the final notes.
2108 This accidental style applies to the current @code{GrandStaff} or
2109 @code{PianoStaff} by default.
2115 cis''8 fis, bes4 <a cis>8 f bis4 |
2129 \voiceTwo \relative {
2130 <fis a cis>8[ <fis a cis>
2133 \change Staff = down
2138 \change Staff = down
2139 <fis, a cis>4 gis <f a d>2 |
2146 \context Staff = "up" {
2147 \accidentalStyle piano
2150 \context Staff = "down" {
2157 @item piano-cautionary
2159 @cindex accidentals, piano cautionary
2160 @cindex cautionary accidentals, piano
2161 @cindex piano cautionary accidentals
2162 @cindex accidental style, piano cautionary
2163 @cindex cautionary accidental style, piano
2164 @cindex piano cautionary accidental style
2166 @funindex piano-cautionary
2168 This is the same as @code{piano} but with the extra accidentals
2169 typeset as cautionaries.
2175 cis''8 fis, bes4 <a cis>8 f bis4 |
2189 \voiceTwo \relative {
2190 <fis a cis>8[ <fis a cis>
2193 \change Staff = down
2198 \change Staff = down
2199 <fis, a cis>4 gis <f a d>2 |
2206 \context Staff = "up" {
2207 \accidentalStyle piano-cautionary
2210 \context Staff = "down" {
2220 @cindex accidental style, choral
2221 @cindex accidentals, choral
2222 @cindex choral accidental style
2223 @cindex choral accidentals
2227 This rule is a combination of the @code{modern-voice} and the @code{piano}
2228 style. It shows all accidentals required for singers that only follow their
2229 own voice, as well as additional accidentals for readers that follow all
2230 voices of an entire @code{ChoirStaff} simultaneously.
2232 This accidental style applies to the current @code{ChoirStaff} by default.
2238 cis''8 fis, bes4 <a cis>8 f bis4 |
2252 \voiceTwo \relative {
2253 <fis a cis>8[ <fis a cis>
2256 \change Staff = down
2261 \change Staff = down
2262 <fis, a cis>4 gis <f a d>2 |
2269 \context Staff = "up" {
2270 \accidentalStyle choral
2273 \context Staff = "down" {
2280 @item choral-cautionary
2282 @cindex accidentals, choral cautionary
2283 @cindex cautionary accidentals, choral
2284 @cindex choral cautionary accidentals
2285 @cindex accidental style, choral cautionary
2286 @cindex cautionary accidental style, choral
2287 @cindex choral cautionary accidental style
2289 @funindex choral-cautionary
2291 This is the same as @code{choral} but with the extra accidentals
2292 typeset as cautionaries.
2298 cis''8 fis, bes4 <a cis>8 f bis4 |
2312 \voiceTwo \relative {
2313 <fis a cis>8[ <fis a cis>
2316 \change Staff = down
2321 \change Staff = down
2322 <fis, a cis>4 gis <f a d>2 |
2329 \context Staff = "up" {
2330 \accidentalStyle choral-cautionary
2333 \context Staff = "down" {
2343 @cindex neo-modern accidental style
2344 @cindex accidental style, neo-modern
2346 @funindex neo-modern
2348 This rule reproduces a common practice in contemporary music:
2349 accidentals are printed like with @code{modern}, but they are printed
2350 again if the same note appears later in the same measure -- except
2351 if the note is immediately repeated.
2357 cis''8 fis, bes4 <a cis>8 f bis4 |
2371 \voiceTwo \relative {
2372 <fis a cis>8[ <fis a cis>
2375 \change Staff = down
2380 \change Staff = down
2381 <fis, a cis>4 gis <f a d>2 |
2388 \context Staff = "up" {
2389 \accidentalStyle neo-modern
2392 \context Staff = "down" {
2393 \accidentalStyle neo-modern
2400 @item neo-modern-cautionary
2402 @cindex neo-modern-cautionary accidental style
2403 @cindex accidental style, neo-modern-cautionary
2405 @funindex neo-modern-cautionary
2407 This rule is similar to @code{neo-modern}, but the @q{extra} accidentals
2408 are printed as cautionary accidentals (with parentheses). They can also
2409 be printed at a different size by overriding
2410 @code{AccidentalCautionary}'s @code{font-size} property.
2416 cis''8 fis, bes4 <a cis>8 f bis4 |
2430 \voiceTwo \relative {
2431 <fis a cis>8[ <fis a cis>
2434 \change Staff = down
2439 \change Staff = down
2440 <fis, a cis>4 gis <f a d>2 |
2447 \context Staff = "up" {
2448 \accidentalStyle neo-modern-cautionary
2451 \context Staff = "down" {
2452 \accidentalStyle neo-modern-cautionary
2460 @item neo-modern-voice
2462 @cindex neo-modern-voice accidental style
2463 @cindex accidental style, neo-modern-voice
2465 @funindex neo-modern-voice
2467 This rule is used for multivoice accidentals to be read both by
2468 musicians playing one voice and musicians playing all voices.
2469 Accidentals are typeset for each voice as with @code{neo-modern},
2470 but they are canceled across voices in the same @code{Staff}.
2476 cis''8 fis, bes4 <a cis>8 f bis4 |
2490 \voiceTwo \relative {
2491 <fis a cis>8[ <fis a cis>
2494 \change Staff = down
2499 \change Staff = down
2500 <fis, a cis>4 gis <f a d>2 |
2507 \context Staff = "up" {
2508 \accidentalStyle neo-modern-voice
2511 \context Staff = "down" {
2512 \accidentalStyle neo-modern-voice
2519 @item neo-modern-voice-cautionary
2521 @cindex neo-modern-voice-cautionary accidental style
2522 @cindex accidental style, neo-modern-voice-cautionary
2524 @funindex neo-modern-voice-cautionary
2526 This rule is similar to @code{neo-modern-voice}, but the extra
2527 accidentals are printed as cautionary accidentals.
2533 cis''8 fis, bes4 <a cis>8 f bis4 |
2547 \voiceTwo \relative {
2548 <fis a cis>8[ <fis a cis>
2551 \change Staff = down
2556 \change Staff = down
2557 <fis, a cis>4 gis <f a d>2 |
2564 \context Staff = "up" {
2565 \accidentalStyle neo-modern-voice-cautionary
2568 \context Staff = "down" {
2569 \accidentalStyle neo-modern-voice-cautionary
2578 @cindex dodecaphonic accidental style
2579 @cindex dodecaphonic style, neo-modern
2581 @funindex dodecaphonic
2583 This rule reflects a practice introduced by composers at
2584 the beginning of the 20th century, in an attempt to
2585 abolish the hierarchy between natural and non-natural notes.
2586 With this style, @emph{every} note gets an accidental sign,
2587 including natural signs.
2593 cis''8 fis, bes4 <a cis>8 f bis4 |
2607 \voiceTwo \relative {
2608 <fis a cis>8[ <fis a cis>
2611 \change Staff = down
2616 \change Staff = down
2617 <fis, a cis>4 gis <f a d>2 |
2624 \context Staff = "up" {
2625 \accidentalStyle dodecaphonic
2628 \context Staff = "down" {
2629 \accidentalStyle dodecaphonic
2636 @item dodecaphonic-no-repeat
2638 @cindex dodecaphonic accidental style
2639 @cindex dodecaphonic style, neo-modern
2641 @funindex dodecaphonic-no-repeat
2643 Like with the dodecaphonic accidental style @emph{every} note
2644 gets an accidental sign by default, but accidentals are
2645 suppressed for pitches immediately repeated within the same staff.
2651 cis''8 fis, bes4 <a cis>8 f bis4 |
2665 \voiceTwo \relative {
2666 <fis a cis>8[ <fis a cis>
2669 \change Staff = down
2674 \change Staff = down
2675 <fis, a cis>4 gis <f a d>2 |
2682 \context Staff = "up" {
2683 \accidentalStyle dodecaphonic-no-repeat
2686 \context Staff = "down" {
2687 \accidentalStyle dodecaphonic-no-repeat
2695 @item dodecaphonic-first
2697 @cindex dodecaphonic accidental style
2698 @cindex dodecaphonic style, neo-modern
2700 @funindex dodecaphonic-first
2702 Similar to the dodecaphonic accidental style @emph{every} pitch
2703 gets an accidental sign, but only the first time it is encountered
2704 in a measure. Accidentals are only remembered for the actual octave
2705 but throughout voices.
2711 cis''8 fis, bes4 <a cis>8 f bis4 |
2725 \voiceTwo \relative {
2726 <fis a cis>8[ <fis a cis>
2729 \change Staff = down
2734 \change Staff = down
2735 <fis, a cis>4 gis <f a d>2 |
2742 \context Staff = "up" {
2743 \accidentalStyle dodecaphonic-first
2746 \context Staff = "down" {
2747 \accidentalStyle dodecaphonic-first
2757 @cindex teaching accidental style
2758 @cindex accidental style, teaching
2762 This rule is intended for students, and makes it easy to create
2763 scale sheets with automatically created cautionary accidentals.
2764 Accidentals are printed like with @code{modern}, but cautionary
2765 accidentals are added for all sharp or flat tones specified by the
2766 key signature, except if the note is immediately repeated.
2768 @lilypond[quote,staffsize=18]
2772 cis''8 fis, bes4 <a cis>8 f bis4 |
2786 \voiceTwo \relative {
2787 <fis a cis>8[ <fis a cis>
2790 \change Staff = down
2795 \change Staff = down
2796 <fis, a cis>4 gis <f a d>2 |
2803 \context Staff = "up" {
2805 \accidentalStyle teaching
2808 \context Staff = "down" {
2810 \accidentalStyle teaching
2821 @cindex accidental style, no reset
2822 @cindex no reset accidental style
2826 This is the same as @code{default} but with accidentals lasting
2827 @q{forever} and not only within the same measure:
2833 cis''8 fis, bes4 <a cis>8 f bis4 |
2847 \voiceTwo \relative {
2848 <fis a cis>8[ <fis a cis>
2851 \change Staff = down
2856 \change Staff = down
2857 <fis, a cis>4 gis <f a d>2 |
2864 \context Staff = "up" {
2865 \accidentalStyle no-reset
2868 \context Staff = "down" {
2869 \accidentalStyle no-reset
2878 @cindex forget accidental style
2879 @cindex accidental style, forget
2883 This is the opposite of @code{no-reset}: Accidentals are not
2884 remembered at all -- and hence all accidentals are typeset
2885 relative to the key signature, regardless of what came before in
2892 cis''8 fis, bes4 <a cis>8 f bis4 |
2906 \voiceTwo \relative {
2907 <fis a cis>8[ <fis a cis>
2910 \change Staff = down
2915 \change Staff = down
2916 <fis, a cis>4 gis <f a d>2 |
2923 \context Staff = "up" {
2924 \accidentalStyle forget
2927 \context Staff = "down" {
2928 \accidentalStyle forget
2940 Internals Reference:
2941 @rinternals{Accidental},
2942 @rinternals{Accidental_engraver},
2943 @rinternals{GrandStaff},
2944 @rinternals{PianoStaff},
2946 @rinternals{AccidentalSuggestion},
2947 @rinternals{AccidentalPlacement},
2948 @rinternals{accidental-suggestion-interface}.
2950 @cindex accidentals and simultaneous notes
2951 @cindex simultaneous notes and accidentals
2952 @cindex accidentals in chords
2953 @cindex chords, accidentals in
2956 Simultaneous notes are not considered in the automatic
2957 determination of accidentals; only previous notes and the key
2958 signature are considered. Forcing accidentals with@tie{}@code{!}
2959 or@tie{}@code{?} may be required when the same note name occurs
2960 simultaneously with different alterations, as in @samp{<f! fis!>}.
2962 Cautionary cancellation of accidentals is done by looking at previous measure.
2963 However, in the @code{\alternative} block following a @code{\repeat volta N}
2964 section, one would expect the cancellation being calculated using the previous
2965 @emph{played} measure, not previous @emph{printed} measure.
2966 In the following example, the natural @code{c} in the second alternative does
2967 not need a natural sign:
2971 \accidentalStyle modern
2983 The following work-around can be used: define a function that locally changes
2984 the accidental style to @code{forget}:
2986 @lilypond[verbatim,quote]
2987 forget = #(define-music-function (music) (ly:music?) #{
2988 \accidentalStyle forget
2990 \accidentalStyle modern
2993 \accidentalStyle modern
3007 @unnumberedsubsubsec Ambitus
3010 @cindex range of pitches
3013 The term @notation{ambitus} (pl. ambitus) denotes a range of
3014 pitches for a given voice in a part of music. It may also denote
3015 the pitch range that a musical instrument is capable of playing.
3016 Ambitus are printed on vocal parts so that performers can easily
3017 determine if it matches their capabilities.
3019 Ambitus are denoted at the beginning of a piece near the initial
3020 clef. The range is graphically specified by two note heads that
3021 represent the lowest and highest pitches. Accidentals are only
3022 printed if they are not part of the key signature.
3024 @lilypond[verbatim,quote]
3028 \consists "Ambitus_engraver"
3041 @lilypondfile[verbatim,quote,texidoc,doctitle]
3042 {adding-ambitus-per-voice.ly}
3044 @lilypondfile[verbatim,quote,texidoc,doctitle]
3045 {ambitus-with-multiple-voices.ly}
3047 @lilypondfile[verbatim,quote,texidoc,doctitle]
3048 {changing-the-ambitus-gap.ly}
3057 Internals Reference:
3058 @rinternals{Ambitus_engraver},
3061 @rinternals{Ambitus},
3062 @rinternals{AmbitusAccidental},
3063 @rinternals{AmbitusLine},
3064 @rinternals{AmbitusNoteHead},
3065 @rinternals{ambitus-interface}.
3068 There is no collision handling in the case of multiple per-voice
3073 @subsection Note heads
3075 This section suggests ways of altering note heads.
3078 * Special note heads::
3079 * Easy notation note heads::
3080 * Shape note heads::
3084 @node Special note heads
3085 @unnumberedsubsubsec Special note heads
3087 @cindex note heads, special
3088 @cindex note heads, cross
3089 @cindex note heads, diamond
3090 @cindex note heads, parlato
3091 @cindex note heads, harmonic
3092 @cindex note heads, guitar
3093 @cindex special note heads
3094 @cindex cross note heads
3095 @cindex diamond note heads
3096 @cindex parlato note heads
3097 @cindex harmonic note heads
3098 @cindex guitar note heads
3099 @cindex note head styles
3100 @cindex styles, note heads
3104 The appearance of note heads may be altered:
3106 @lilypond[verbatim,quote]
3109 \override NoteHead.style = #'cross
3111 \revert NoteHead.style
3113 \override NoteHead.style = #'harmonic
3115 \revert NoteHead.style
3120 To see all note head styles, see @ref{Note head styles}.
3122 The @code{cross} style is used to represent a variety of musical
3123 intentions. The following generic predefined commands modify the
3124 note head in both staff and tablature contexts and can be used to
3125 represent any musical meaning:
3127 @lilypond[verbatim,quote]
3137 The music function form of this predefined command may be used
3138 inside and outside chords to generate crossed note heads in both
3139 staff and tablature contexts:
3141 @lilypond[verbatim,quote]
3145 c b < g \xNote c f > b
3149 As synonyms for @code{\xNote}, @code{\xNotesOn} and @code{\xNotesOff},
3150 @code{\deadNote}, @code{\deadNotesOn} and @code{\deadNotesOff} can
3151 be used. The term @notation{dead note} is commonly used by guitarists.
3153 There is also a similar shorthand for diamond shapes:
3155 @lilypond[verbatim,quote]
3157 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic
3173 @ref{Note head styles},
3174 @ref{Chorded notes},
3175 @ref{Indicating harmonics and dampened notes}.
3177 Internals Reference:
3178 @rinternals{note-event},
3179 @rinternals{Note_heads_engraver},
3180 @rinternals{Ledger_line_engraver},
3181 @rinternals{NoteHead},
3182 @rinternals{LedgerLineSpanner},
3183 @rinternals{note-head-interface},
3184 @rinternals{ledger-line-spanner-interface}.
3187 @node Easy notation note heads
3188 @unnumberedsubsubsec Easy notation note heads
3190 @cindex note heads, practice
3191 @cindex practice note heads
3192 @cindex note heads, easy notation
3193 @cindex easy notation
3194 @cindex beginners' music
3195 @cindex music, beginners'
3196 @cindex easy play note heads
3197 @cindex note heads, easy play
3199 @funindex \easyHeadsOn
3200 @funindex \easyHeadsOff
3202 The @q{easy play} note head includes a note name inside the head.
3203 It is used in music for beginners. To make the letters readable,
3204 it should be printed in a large font size. To print with a larger
3205 font, see @ref{Setting the staff size}.
3207 @lilypond[verbatim,quote]
3208 #(set-global-staff-size 26)
3220 @code{\easyHeadsOn},
3221 @code{\easyHeadsOff}.
3227 @lilypondfile[verbatim,quote,texidoc,doctitle]
3228 {numbers-as-easy-note-heads.ly}
3232 @ref{Setting the staff size}.
3237 Internals Reference:
3238 @rinternals{note-event},
3239 @rinternals{Note_heads_engraver},
3240 @rinternals{NoteHead},
3241 @rinternals{note-head-interface}.
3244 @node Shape note heads
3245 @unnumberedsubsubsec Shape note heads
3247 @cindex note heads, shape
3248 @cindex note heads, Aiken
3249 @cindex note heads, sacred harp
3251 @cindex Aiken shape note heads
3252 @cindex sacred harp note heads
3253 @cindex note heads, Southern Harmony
3254 @cindex Southern Harmony note heads
3255 @cindex Funk shape note heads
3256 @cindex note heads, Funk
3257 @cindex note heads, Harmonica Sacra
3258 @cindex Harmonica Sacra note heads
3259 @cindex Christian Harmony note heads
3260 @cindex note heads, Christian Harmony
3261 @cindex Walker shape note heads
3262 @cindex note heads, Walker
3264 @funindex \aikenHeads
3265 @funindex \sacredHarpHeads
3266 @funindex \southernHarmonyHeads
3267 @funindex \funkHeads
3268 @funindex \walkerHeads
3270 In shape note head notation, the shape of the note head
3271 corresponds to the harmonic function of a note in the scale. This
3272 notation was popular in nineteenth-century American song books.
3273 Shape note heads can be produced in Sacred Harp, Southern Harmony,
3274 Funk (Harmonica Sacra), Walker, and Aiken (Christian Harmony) styles:
3276 @lilypond[verbatim,quote]
3279 c, d e f g2 a b1 c \break
3281 c,4 d e f g2 a b1 c \break
3282 \southernHarmonyHeads
3283 c,4 d e f g2 a b1 c \break
3285 c,4 d e f g2 a b1 c \break
3287 c,4 d e f g2 a b1 c \break
3292 @funindex \aikenHeadsMinor
3293 @funindex \sacredHarpHeadsMinor
3294 @funindex \southernHarmonyHeadsMinor
3295 @funindex \funkHeadsMinor
3296 @funindex \walkerHeadsMinor
3298 Shapes are typeset according to the step in the scale, where the base
3299 of the scale is determined by the @code{\key} command. When writing
3300 in a minor key, the scale step can be determined from the relative
3303 @lilypond[verbatim,quote]
3307 a b c d e2 f g1 a \break
3309 a,4 b c d e2 f g1 a \break
3310 \sacredHarpHeadsMinor
3312 \southernHarmonyHeadsMinor
3324 @code{\aikenHeadsMinor},
3326 @code{\funkHeadsMinor},
3327 @code{\sacredHarpHeads},
3328 @code{\sacredHarpHeadsMinor},
3329 @code{\southernHarmonyHeads},
3330 @code{\southernHarmonyHeadsMinor},
3331 @code{\walkerHeads},
3332 @code{\walkerHeadsMinor}.
3338 @lilypondfile[verbatim,quote,texidoc,doctitle]
3339 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
3341 To see all note head styles, see @ref{Note head styles}.
3348 @ref{Note head styles}.
3350 Internals Reference:
3351 @rinternals{note-event},
3352 @rinternals{Note_heads_engraver},
3353 @rinternals{NoteHead},
3354 @rinternals{note-head-interface}.
3358 @unnumberedsubsubsec Improvisation
3360 @cindex improvisation
3361 @cindex slashed note heads
3362 @cindex note heads, improvisation
3363 @cindex note heads, slashed
3365 @funindex \improvisationOn
3366 @funindex \improvisationOff
3368 Improvisation is sometimes denoted with slashed note heads, where
3369 the performer may choose any pitch but should play the specified
3370 rhythm. Such note heads can be created:
3372 @lilypond[verbatim,quote]
3374 \consists "Pitch_squash_engraver"
3376 e''8 e g a a16( bes) a8 g
3387 @code{\improvisationOn},
3388 @code{\improvisationOff}.
3395 Internals Reference:
3396 @rinternals{Pitch_squash_engraver},
3398 @rinternals{RhythmicStaff}.