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" \with {
1527 instrumentName = #"Vln"
1528 midiInstrument = #"violin"
1531 % not strictly necessary, but a good reminder
1536 \new Staff = "clarinet" \with {
1537 instrumentName = \markup { Cl (B\flat) }
1538 midiInstrument = #"clarinet"
1548 The @code{\transposition} may be changed during a piece. For
1549 example, a clarinetist may be required to switch from an A clarinet
1550 to a B-flat clarinet.
1552 @lilypond[verbatim,quote]
1553 flute = \relative c'' {
1555 \cueDuring #"clarinet" #DOWN {
1556 R1 _\markup\tiny "clarinet"
1558 R1 _\markup\tiny "clarinet"
1561 clarinet = \relative c'' {
1565 R1^\markup { muta in B\flat }
1570 \addQuote "clarinet" \clarinet
1572 \new Staff \with { instrumentName = #"Flute" }
1574 \new Staff \with { instrumentName = #"Cl (A)" }
1581 @rglos{concert pitch},
1582 @rglos{transposing instrument}.
1585 @ref{Quoting other voices},
1592 @node Automatic accidentals
1593 @unnumberedsubsubsec Automatic accidentals
1595 @cindex accidental style
1596 @cindex accidental style, default
1598 @cindex accidentals, automatic
1599 @cindex automatic accidentals
1600 @cindex default accidental style
1602 @funindex \accidentalStyle
1606 There are many different conventions on how to typeset
1607 accidentals. LilyPond provides a function to specify which
1608 accidental style to use. This function is called as follows:
1612 \accidentalStyle voice
1617 The accidental style applies to the current @code{Staff} by
1618 default (with the exception of the styles @code{piano} and
1619 @code{piano-cautionary}, which are explained below). Optionally,
1620 the function can take a second argument that determines in which
1621 scope the style should be changed. For example, to use the same
1622 style in all staves of the current @code{StaffGroup}, use:
1625 \accidentalStyle StaffGroup.voice
1628 The following accidental styles are supported. To demonstrate
1629 each style, we use the following example:
1632 @lilypond[verbatim,quote]
1636 cis''8 fis, bes4 <a cis>8 f bis4 |
1650 \voiceTwo \relative {
1651 <fis a cis>8[ <fis a cis>
1654 \change Staff = down
1659 \change Staff = down
1660 <fis, a cis>4 gis <f a d>2 |
1667 \context Staff = "up" {
1668 \accidentalStyle default
1671 \context Staff = "down" {
1672 \accidentalStyle default
1679 Note that the last lines of this example can be replaced by the
1680 following, as long as the same accidental style should be used in
1686 \context Staff = "up" @{
1687 %%% change the next line as desired:
1688 \accidentalStyle Score.default
1691 \context Staff = "down" @{
1699 @c don't use verbatim in this table.
1703 @cindex default accidental style
1704 @cindex accidental style, default
1708 This is the default typesetting behavior. It corresponds to
1709 eighteenth-century common practice: accidentals are remembered to
1710 the end of the measure in which they occur and only in their own
1711 octave. Thus, in the example below, no natural signs are printed
1712 before the@tie{}@code{b} in the second measure or the
1719 cis''8 fis, bes4 <a cis>8 f bis4 |
1733 \voiceTwo \relative {
1734 <fis a cis>8[ <fis a cis>
1737 \change Staff = down
1742 \change Staff = down
1743 <fis, a cis>4 gis <f a d>2 |
1750 \context Staff = "up" {
1751 \accidentalStyle default
1754 \context Staff = "down" {
1755 \accidentalStyle default
1764 @cindex accidental style, voice
1765 @cindex voice accidental style
1766 @cindex accidental style, modern
1767 @cindex modern accidental style
1768 @cindex accidental style, modern-cautionary
1769 @cindex modern-cautionary accidental style
1773 The normal behavior is to remember the accidentals at
1774 @code{Staff}-level. In this style, however, accidentals are
1775 typeset individually for each voice. Apart from that, the rule is
1776 similar to @code{default}.
1778 As a result, accidentals from one voice do not get canceled in
1779 other voices, which is often an unwanted result: in the following
1780 example, it is hard to determine whether the second@tie{}@code{a}
1781 should be played natural or sharp. The @code{voice} option should
1782 therefore be used only if the voices are to be read solely by
1783 individual musicians. If the staff is to be used by one musician
1784 (e.g., a conductor or in a piano score) then @code{modern} or
1785 @code{modern-cautionary} should be used instead.
1792 cis''8 fis, bes4 <a cis>8 f bis4 |
1806 \voiceTwo \relative {
1807 <fis a cis>8[ <fis a cis>
1810 \change Staff = down
1815 \change Staff = down
1816 <fis, a cis>4 gis <f a d>2 |
1823 \context Staff = "up" {
1824 \accidentalStyle voice
1827 \context Staff = "down" {
1828 \accidentalStyle voice
1837 @cindex accidentals, modern style
1838 @cindex modern style accidentals
1842 This rule corresponds to the common practice in the twentieth
1843 century. It omits some extra natural signs, which were
1844 traditionally prefixed to a sharp following a double sharp,
1845 or a flat following a double flat. The @code{modern} rule
1846 prints the same accidentals as @code{default}, with
1847 two additions that serve to avoid ambiguity: after temporary
1848 accidentals, cancellation marks are printed also in the following
1849 measure (for notes in the same octave) and, in the same measure,
1850 for notes in other octaves. Hence the naturals before
1851 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1858 cis''8 fis, bes4 <a cis>8 f bis4 |
1872 \voiceTwo \relative {
1873 <fis a cis>8[ <fis a cis>
1876 \change Staff = down
1881 \change Staff = down
1882 <fis, a cis>4 gis <f a d>2 |
1889 \context Staff = "up" {
1890 \accidentalStyle modern
1893 \context Staff = "down" {
1894 \accidentalStyle modern
1901 @item modern-cautionary
1903 @cindex accidentals, modern cautionary style
1904 @cindex modern accidental style
1905 @cindex modern cautionary accidental style
1906 @cindex modern style accidentals
1907 @cindex modern style cautionary accidentals
1909 @funindex modern-cautionary
1911 This rule is similar to @code{modern}, but the @q{extra} accidentals
1912 are printed as cautionary accidentals (with parentheses). They can also
1913 be printed at a different size by overriding
1914 @code{AccidentalCautionary}'s @code{font-size} property.
1920 cis''8 fis, bes4 <a cis>8 f bis4 |
1934 \voiceTwo \relative {
1935 <fis a cis>8[ <fis a cis>
1938 \change Staff = down
1943 \change Staff = down
1944 <fis, a cis>4 gis <f a d>2 |
1951 \context Staff = "up" {
1952 \accidentalStyle modern-cautionary
1955 \context Staff = "down" {
1956 \accidentalStyle modern-cautionary
1965 @cindex accidental style, modern
1966 @cindex accidentals, modern
1967 @cindex accidentals, multivoice
1968 @cindex modern accidental style
1969 @cindex modern accidentals
1970 @cindex multivoice accidentals
1972 @funindex modern-voice
1974 This rule is used for multivoice accidentals to be read both by
1975 musicians playing one voice and musicians playing all voices.
1976 Accidentals are typeset for each voice, but they @emph{are}
1977 canceled across voices in the same @code{Staff}. Hence,
1978 the@tie{}@code{a} in the last measure is canceled because the
1979 previous cancellation was in a different voice, and
1980 the@tie{}@code{d} in the lower staff is canceled because of the
1981 accidental in a different voice in the previous measure:
1987 cis''8 fis, bes4 <a cis>8 f bis4 |
2001 \voiceTwo \relative {
2002 <fis a cis>8[ <fis a cis>
2005 \change Staff = down
2010 \change Staff = down
2011 <fis, a cis>4 gis <f a d>2 |
2018 \context Staff = "up" {
2019 \accidentalStyle modern-voice
2022 \context Staff = "down" {
2023 \accidentalStyle modern-voice
2030 @cindex accidental style, cautionary, modern voice
2031 @cindex accidental style, modern voice cautionary
2032 @cindex accidental style, voice, modern cautionary
2034 @funindex modern-voice-cautionary
2036 @item modern-voice-cautionary
2038 This rule is the same as @code{modern-voice}, but with the extra
2039 accidentals (the ones not typeset by @code{voice}) typeset as
2040 cautionaries. Even though all accidentals typeset by
2041 @code{default} @emph{are} typeset with this rule, some of them are
2042 typeset as cautionaries.
2048 cis''8 fis, bes4 <a cis>8 f bis4 |
2062 \voiceTwo \relative {
2063 <fis a cis>8[ <fis a cis>
2066 \change Staff = down
2071 \change Staff = down
2072 <fis, a cis>4 gis <f a d>2 |
2079 \context Staff = "up" {
2080 \accidentalStyle modern-voice-cautionary
2083 \context Staff = "down" {
2084 \accidentalStyle modern-voice-cautionary
2093 @cindex accidental style, piano
2094 @cindex accidentals, piano
2095 @cindex piano accidental style
2096 @cindex piano accidentals
2100 This rule reflects twentieth-century practice for piano notation.
2101 Its behavior is very similar to @code{modern} style, but here
2102 accidentals also get canceled across the staves in the same
2103 @code{GrandStaff} or @code{PianoStaff}, hence all the
2104 cancellations of the final notes.
2106 This accidental style applies to the current @code{GrandStaff} or
2107 @code{PianoStaff} by default.
2113 cis''8 fis, bes4 <a cis>8 f bis4 |
2127 \voiceTwo \relative {
2128 <fis a cis>8[ <fis a cis>
2131 \change Staff = down
2136 \change Staff = down
2137 <fis, a cis>4 gis <f a d>2 |
2144 \context Staff = "up" {
2145 \accidentalStyle piano
2148 \context Staff = "down" {
2155 @item piano-cautionary
2157 @cindex accidentals, piano cautionary
2158 @cindex cautionary accidentals, piano
2159 @cindex piano cautionary accidentals
2160 @cindex accidental style, piano cautionary
2161 @cindex cautionary accidental style, piano
2162 @cindex piano cautionary accidental style
2164 @funindex piano-cautionary
2166 This is the same as @code{piano} but with the extra accidentals
2167 typeset as cautionaries.
2173 cis''8 fis, bes4 <a cis>8 f bis4 |
2187 \voiceTwo \relative {
2188 <fis a cis>8[ <fis a cis>
2191 \change Staff = down
2196 \change Staff = down
2197 <fis, a cis>4 gis <f a d>2 |
2204 \context Staff = "up" {
2205 \accidentalStyle piano-cautionary
2208 \context Staff = "down" {
2218 @cindex accidental style, choral
2219 @cindex accidentals, choral
2220 @cindex choral accidental style
2221 @cindex choral accidentals
2225 This rule is a combination of the @code{modern-voice} and the @code{piano}
2226 style. It shows all accidentals required for singers that only follow their
2227 own voice, as well as additional accidentals for readers that follow all
2228 voices of an entire @code{ChoirStaff} simultaneously.
2230 This accidental style applies to the current @code{ChoirStaff} by default.
2236 cis''8 fis, bes4 <a cis>8 f bis4 |
2250 \voiceTwo \relative {
2251 <fis a cis>8[ <fis a cis>
2254 \change Staff = down
2259 \change Staff = down
2260 <fis, a cis>4 gis <f a d>2 |
2267 \context Staff = "up" {
2268 \accidentalStyle choral
2271 \context Staff = "down" {
2278 @item choral-cautionary
2280 @cindex accidentals, choral cautionary
2281 @cindex cautionary accidentals, choral
2282 @cindex choral cautionary accidentals
2283 @cindex accidental style, choral cautionary
2284 @cindex cautionary accidental style, choral
2285 @cindex choral cautionary accidental style
2287 @funindex choral-cautionary
2289 This is the same as @code{choral} but with the extra accidentals
2290 typeset as cautionaries.
2296 cis''8 fis, bes4 <a cis>8 f bis4 |
2310 \voiceTwo \relative {
2311 <fis a cis>8[ <fis a cis>
2314 \change Staff = down
2319 \change Staff = down
2320 <fis, a cis>4 gis <f a d>2 |
2327 \context Staff = "up" {
2328 \accidentalStyle choral-cautionary
2331 \context Staff = "down" {
2341 @cindex neo-modern accidental style
2342 @cindex accidental style, neo-modern
2344 @funindex neo-modern
2346 This rule reproduces a common practice in contemporary music:
2347 accidentals are printed like with @code{modern}, but they are printed
2348 again if the same note appears later in the same measure -- except
2349 if the note is immediately repeated.
2355 cis''8 fis, bes4 <a cis>8 f bis4 |
2369 \voiceTwo \relative {
2370 <fis a cis>8[ <fis a cis>
2373 \change Staff = down
2378 \change Staff = down
2379 <fis, a cis>4 gis <f a d>2 |
2386 \context Staff = "up" {
2387 \accidentalStyle neo-modern
2390 \context Staff = "down" {
2391 \accidentalStyle neo-modern
2398 @item neo-modern-cautionary
2400 @cindex neo-modern-cautionary accidental style
2401 @cindex accidental style, neo-modern-cautionary
2403 @funindex neo-modern-cautionary
2405 This rule is similar to @code{neo-modern}, but the @q{extra} accidentals
2406 are printed as cautionary accidentals (with parentheses). They can also
2407 be printed at a different size by overriding
2408 @code{AccidentalCautionary}'s @code{font-size} property.
2414 cis''8 fis, bes4 <a cis>8 f bis4 |
2428 \voiceTwo \relative {
2429 <fis a cis>8[ <fis a cis>
2432 \change Staff = down
2437 \change Staff = down
2438 <fis, a cis>4 gis <f a d>2 |
2445 \context Staff = "up" {
2446 \accidentalStyle neo-modern-cautionary
2449 \context Staff = "down" {
2450 \accidentalStyle neo-modern-cautionary
2458 @item neo-modern-voice
2460 @cindex neo-modern-voice accidental style
2461 @cindex accidental style, neo-modern-voice
2463 @funindex neo-modern-voice
2465 This rule is used for multivoice accidentals to be read both by
2466 musicians playing one voice and musicians playing all voices.
2467 Accidentals are typeset for each voice as with @code{neo-modern},
2468 but they are canceled across voices in the same @code{Staff}.
2474 cis''8 fis, bes4 <a cis>8 f bis4 |
2488 \voiceTwo \relative {
2489 <fis a cis>8[ <fis a cis>
2492 \change Staff = down
2497 \change Staff = down
2498 <fis, a cis>4 gis <f a d>2 |
2505 \context Staff = "up" {
2506 \accidentalStyle neo-modern-voice
2509 \context Staff = "down" {
2510 \accidentalStyle neo-modern-voice
2517 @item neo-modern-voice-cautionary
2519 @cindex neo-modern-voice-cautionary accidental style
2520 @cindex accidental style, neo-modern-voice-cautionary
2522 @funindex neo-modern-voice-cautionary
2524 This rule is similar to @code{neo-modern-voice}, but the extra
2525 accidentals are printed as cautionary accidentals.
2531 cis''8 fis, bes4 <a cis>8 f bis4 |
2545 \voiceTwo \relative {
2546 <fis a cis>8[ <fis a cis>
2549 \change Staff = down
2554 \change Staff = down
2555 <fis, a cis>4 gis <f a d>2 |
2562 \context Staff = "up" {
2563 \accidentalStyle neo-modern-voice-cautionary
2566 \context Staff = "down" {
2567 \accidentalStyle neo-modern-voice-cautionary
2576 @cindex dodecaphonic accidental style
2577 @cindex dodecaphonic style, neo-modern
2579 @funindex dodecaphonic
2581 This rule reflects a practice introduced by composers at
2582 the beginning of the 20th century, in an attempt to
2583 abolish the hierarchy between natural and non-natural notes.
2584 With this style, @emph{every} note gets an accidental sign,
2585 including natural signs.
2591 cis''8 fis, bes4 <a cis>8 f bis4 |
2605 \voiceTwo \relative {
2606 <fis a cis>8[ <fis a cis>
2609 \change Staff = down
2614 \change Staff = down
2615 <fis, a cis>4 gis <f a d>2 |
2622 \context Staff = "up" {
2623 \accidentalStyle dodecaphonic
2626 \context Staff = "down" {
2627 \accidentalStyle dodecaphonic
2634 @item dodecaphonic-no-repeat
2636 @cindex dodecaphonic accidental style
2637 @cindex dodecaphonic style, neo-modern
2639 @funindex dodecaphonic-no-repeat
2641 Like with the dodecaphonic accidental style @emph{every} note
2642 gets an accidental sign by default, but accidentals are
2643 suppressed for pitches immediately repeated within the same staff.
2649 cis''8 fis, bes4 <a cis>8 f bis4 |
2663 \voiceTwo \relative {
2664 <fis a cis>8[ <fis a cis>
2667 \change Staff = down
2672 \change Staff = down
2673 <fis, a cis>4 gis <f a d>2 |
2680 \context Staff = "up" {
2681 \accidentalStyle dodecaphonic-no-repeat
2684 \context Staff = "down" {
2685 \accidentalStyle dodecaphonic-no-repeat
2693 @item dodecaphonic-first
2695 @cindex dodecaphonic accidental style
2696 @cindex dodecaphonic style, neo-modern
2698 @funindex dodecaphonic-first
2700 Similar to the dodecaphonic accidental style @emph{every} pitch
2701 gets an accidental sign, but only the first time it is encountered
2702 in a measure. Accidentals are only remembered for the actual octave
2703 but throughout voices.
2709 cis''8 fis, bes4 <a cis>8 f bis4 |
2723 \voiceTwo \relative {
2724 <fis a cis>8[ <fis a cis>
2727 \change Staff = down
2732 \change Staff = down
2733 <fis, a cis>4 gis <f a d>2 |
2740 \context Staff = "up" {
2741 \accidentalStyle dodecaphonic-first
2744 \context Staff = "down" {
2745 \accidentalStyle dodecaphonic-first
2755 @cindex teaching accidental style
2756 @cindex accidental style, teaching
2760 This rule is intended for students, and makes it easy to create
2761 scale sheets with automatically created cautionary accidentals.
2762 Accidentals are printed like with @code{modern}, but cautionary
2763 accidentals are added for all sharp or flat tones specified by the
2764 key signature, except if the note is immediately repeated.
2766 @lilypond[quote,staffsize=18]
2770 cis''8 fis, bes4 <a cis>8 f bis4 |
2784 \voiceTwo \relative {
2785 <fis a cis>8[ <fis a cis>
2788 \change Staff = down
2793 \change Staff = down
2794 <fis, a cis>4 gis <f a d>2 |
2801 \context Staff = "up" {
2803 \accidentalStyle teaching
2806 \context Staff = "down" {
2808 \accidentalStyle teaching
2819 @cindex accidental style, no reset
2820 @cindex no reset accidental style
2824 This is the same as @code{default} but with accidentals lasting
2825 @q{forever} and not only within the same measure:
2831 cis''8 fis, bes4 <a cis>8 f bis4 |
2845 \voiceTwo \relative {
2846 <fis a cis>8[ <fis a cis>
2849 \change Staff = down
2854 \change Staff = down
2855 <fis, a cis>4 gis <f a d>2 |
2862 \context Staff = "up" {
2863 \accidentalStyle no-reset
2866 \context Staff = "down" {
2867 \accidentalStyle no-reset
2876 @cindex forget accidental style
2877 @cindex accidental style, forget
2881 This is the opposite of @code{no-reset}: Accidentals are not
2882 remembered at all -- and hence all accidentals are typeset
2883 relative to the key signature, regardless of what came before in
2890 cis''8 fis, bes4 <a cis>8 f bis4 |
2904 \voiceTwo \relative {
2905 <fis a cis>8[ <fis a cis>
2908 \change Staff = down
2913 \change Staff = down
2914 <fis, a cis>4 gis <f a d>2 |
2921 \context Staff = "up" {
2922 \accidentalStyle forget
2925 \context Staff = "down" {
2926 \accidentalStyle forget
2938 Internals Reference:
2939 @rinternals{Accidental},
2940 @rinternals{Accidental_engraver},
2941 @rinternals{GrandStaff},
2942 @rinternals{PianoStaff},
2944 @rinternals{AccidentalSuggestion},
2945 @rinternals{AccidentalPlacement},
2946 @rinternals{accidental-suggestion-interface}.
2948 @cindex accidentals and simultaneous notes
2949 @cindex simultaneous notes and accidentals
2950 @cindex accidentals in chords
2951 @cindex chords, accidentals in
2954 Simultaneous notes are not considered in the automatic
2955 determination of accidentals; only previous notes and the key
2956 signature are considered. Forcing accidentals with@tie{}@code{!}
2957 or@tie{}@code{?} may be required when the same note name occurs
2958 simultaneously with different alterations, as in @samp{<f! fis!>}.
2960 Cautionary cancellation of accidentals is done by looking at previous measure.
2961 However, in the @code{\alternative} block following a @code{\repeat volta N}
2962 section, one would expect the cancellation being calculated using the previous
2963 @emph{played} measure, not previous @emph{printed} measure.
2964 In the following example, the natural @code{c} in the second alternative does
2965 not need a natural sign:
2969 \accidentalStyle modern
2981 The following work-around can be used: define a function that locally changes
2982 the accidental style to @code{forget}:
2984 @lilypond[verbatim,quote]
2985 forget = #(define-music-function (music) (ly:music?) #{
2986 \accidentalStyle forget
2988 \accidentalStyle modern
2991 \accidentalStyle modern
3005 @unnumberedsubsubsec Ambitus
3008 @cindex range of pitches
3011 The term @notation{ambitus} (pl. ambitus) denotes a range of
3012 pitches for a given voice in a part of music. It may also denote
3013 the pitch range that a musical instrument is capable of playing.
3014 Ambitus are printed on vocal parts so that performers can easily
3015 determine if it matches their capabilities.
3017 Ambitus are denoted at the beginning of a piece near the initial
3018 clef. The range is graphically specified by two note heads that
3019 represent the lowest and highest pitches. Accidentals are only
3020 printed if they are not part of the key signature.
3022 @lilypond[verbatim,quote]
3026 \consists "Ambitus_engraver"
3039 @lilypondfile[verbatim,quote,texidoc,doctitle]
3040 {adding-ambitus-per-voice.ly}
3042 @lilypondfile[verbatim,quote,texidoc,doctitle]
3043 {ambitus-with-multiple-voices.ly}
3045 @lilypondfile[verbatim,quote,texidoc,doctitle]
3046 {changing-the-ambitus-gap.ly}
3055 Internals Reference:
3056 @rinternals{Ambitus_engraver},
3059 @rinternals{Ambitus},
3060 @rinternals{AmbitusAccidental},
3061 @rinternals{AmbitusLine},
3062 @rinternals{AmbitusNoteHead},
3063 @rinternals{ambitus-interface}.
3066 There is no collision handling in the case of multiple per-voice
3071 @subsection Note heads
3073 This section suggests ways of altering note heads.
3076 * Special note heads::
3077 * Easy notation note heads::
3078 * Shape note heads::
3082 @node Special note heads
3083 @unnumberedsubsubsec Special note heads
3085 @cindex note heads, special
3086 @cindex note heads, cross
3087 @cindex note heads, diamond
3088 @cindex note heads, parlato
3089 @cindex note heads, harmonic
3090 @cindex note heads, guitar
3091 @cindex special note heads
3092 @cindex cross note heads
3093 @cindex diamond note heads
3094 @cindex parlato note heads
3095 @cindex harmonic note heads
3096 @cindex guitar note heads
3097 @cindex note head styles
3098 @cindex styles, note heads
3102 The appearance of note heads may be altered:
3104 @lilypond[verbatim,quote]
3107 \override NoteHead.style = #'cross
3109 \revert NoteHead.style
3111 \override NoteHead.style = #'harmonic
3113 \revert NoteHead.style
3118 To see all note head styles, see @ref{Note head styles}.
3120 The @code{cross} style is used to represent a variety of musical
3121 intentions. The following generic predefined commands modify the
3122 note head in both staff and tablature contexts and can be used to
3123 represent any musical meaning:
3125 @lilypond[verbatim,quote]
3135 The music function form of this predefined command may be used
3136 inside and outside chords to generate crossed note heads in both
3137 staff and tablature contexts:
3139 @lilypond[verbatim,quote]
3143 c b < g \xNote c f > b
3147 As synonyms for @code{\xNote}, @code{\xNotesOn} and @code{\xNotesOff},
3148 @code{\deadNote}, @code{\deadNotesOn} and @code{\deadNotesOff} can
3149 be used. The term @notation{dead note} is commonly used by guitarists.
3151 There is also a similar shorthand for diamond shapes:
3153 @lilypond[verbatim,quote]
3155 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic
3171 @ref{Note head styles},
3172 @ref{Chorded notes},
3173 @ref{Indicating harmonics and dampened notes}.
3175 Internals Reference:
3176 @rinternals{note-event},
3177 @rinternals{Note_heads_engraver},
3178 @rinternals{Ledger_line_engraver},
3179 @rinternals{NoteHead},
3180 @rinternals{LedgerLineSpanner},
3181 @rinternals{note-head-interface},
3182 @rinternals{ledger-line-spanner-interface}.
3185 @node Easy notation note heads
3186 @unnumberedsubsubsec Easy notation note heads
3188 @cindex note heads, practice
3189 @cindex practice note heads
3190 @cindex note heads, easy notation
3191 @cindex easy notation
3192 @cindex beginners' music
3193 @cindex music, beginners'
3194 @cindex easy play note heads
3195 @cindex note heads, easy play
3197 @funindex \easyHeadsOn
3198 @funindex \easyHeadsOff
3200 The @q{easy play} note head includes a note name inside the head.
3201 It is used in music for beginners. To make the letters readable,
3202 it should be printed in a large font size. To print with a larger
3203 font, see @ref{Setting the staff size}.
3205 @lilypond[verbatim,quote]
3206 #(set-global-staff-size 26)
3218 @code{\easyHeadsOn},
3219 @code{\easyHeadsOff}.
3225 @lilypondfile[verbatim,quote,texidoc,doctitle]
3226 {numbers-as-easy-note-heads.ly}
3230 @ref{Setting the staff size}.
3235 Internals Reference:
3236 @rinternals{note-event},
3237 @rinternals{Note_heads_engraver},
3238 @rinternals{NoteHead},
3239 @rinternals{note-head-interface}.
3242 @node Shape note heads
3243 @unnumberedsubsubsec Shape note heads
3245 @cindex note heads, shape
3246 @cindex note heads, Aiken
3247 @cindex note heads, sacred harp
3249 @cindex Aiken shape note heads
3250 @cindex sacred harp note heads
3251 @cindex note heads, Southern Harmony
3252 @cindex Southern Harmony note heads
3253 @cindex Funk shape note heads
3254 @cindex note heads, Funk
3255 @cindex note heads, Harmonica Sacra
3256 @cindex Harmonica Sacra note heads
3257 @cindex Christian Harmony note heads
3258 @cindex note heads, Christian Harmony
3259 @cindex Walker shape note heads
3260 @cindex note heads, Walker
3262 @funindex \aikenHeads
3263 @funindex \sacredHarpHeads
3264 @funindex \southernHarmonyHeads
3265 @funindex \funkHeads
3266 @funindex \walkerHeads
3268 In shape note head notation, the shape of the note head
3269 corresponds to the harmonic function of a note in the scale. This
3270 notation was popular in nineteenth-century American song books.
3271 Shape note heads can be produced in Sacred Harp, Southern Harmony,
3272 Funk (Harmonica Sacra), Walker, and Aiken (Christian Harmony) styles:
3274 @lilypond[verbatim,quote]
3277 c, d e f g2 a b1 c \break
3279 c,4 d e f g2 a b1 c \break
3280 \southernHarmonyHeads
3281 c,4 d e f g2 a b1 c \break
3283 c,4 d e f g2 a b1 c \break
3285 c,4 d e f g2 a b1 c \break
3290 @funindex \aikenHeadsMinor
3291 @funindex \sacredHarpHeadsMinor
3292 @funindex \southernHarmonyHeadsMinor
3293 @funindex \funkHeadsMinor
3294 @funindex \walkerHeadsMinor
3296 Shapes are typeset according to the step in the scale, where the base
3297 of the scale is determined by the @code{\key} command. When writing
3298 in a minor key, the scale step can be determined from the relative
3301 @lilypond[verbatim,quote]
3305 a b c d e2 f g1 a \break
3307 a,4 b c d e2 f g1 a \break
3308 \sacredHarpHeadsMinor
3310 \southernHarmonyHeadsMinor
3322 @code{\aikenHeadsMinor},
3324 @code{\funkHeadsMinor},
3325 @code{\sacredHarpHeads},
3326 @code{\sacredHarpHeadsMinor},
3327 @code{\southernHarmonyHeads},
3328 @code{\southernHarmonyHeadsMinor},
3329 @code{\walkerHeads},
3330 @code{\walkerHeadsMinor}.
3336 @lilypondfile[verbatim,quote,texidoc,doctitle]
3337 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
3339 To see all note head styles, see @ref{Note head styles}.
3346 @ref{Note head styles}.
3348 Internals Reference:
3349 @rinternals{note-event},
3350 @rinternals{Note_heads_engraver},
3351 @rinternals{NoteHead},
3352 @rinternals{note-head-interface}.
3356 @unnumberedsubsubsec Improvisation
3358 @cindex improvisation
3359 @cindex slashed note heads
3360 @cindex note heads, improvisation
3361 @cindex note heads, slashed
3363 @funindex \improvisationOn
3364 @funindex \improvisationOff
3366 Improvisation is sometimes denoted with slashed note heads, where
3367 the performer may choose any pitch but should play the specified
3368 rhythm. Such note heads can be created:
3370 @lilypond[verbatim,quote]
3372 \consists "Pitch_squash_engraver"
3374 e''8 e g a a16( bes) a8 g
3385 @code{\improvisationOn},
3386 @code{\improvisationOff}.
3393 Internals Reference:
3394 @rinternals{Pitch_squash_engraver},
3396 @rinternals{RhythmicStaff}.