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. See TRANSLATION for details.
13 This section discusses how to specify the pitch of notes.
15 @lilypondfile[ragged-right,line-width=16\cm,staffsize=16,quote]
20 * Changing multiple pitches::
21 * Displaying pitches::
26 @subsection Writing pitches
33 * Note names in other languages::
38 @unnumberedsubsubsec Normal pitches
43 A pitch name is specified using lowercase letters @code{a} through
44 @code{g}. An ascending C-major scale is engraved with
46 @lilypond[quote,fragment,verbatim,ragged-right]
51 The note name @code{c} is engraved one octave below middle C.
53 @lilypond[quote,fragment,verbatim,ragged-right]
63 The optional octave specification takes the form of a series of
64 single quote (@samp{'}) characters or a series of comma (@samp{,})
65 characters. Each @samp{'} raises the pitch by one octave; each
66 @samp{,} lowers the pitch by an octave.
68 @lilypond[quote,ragged-right,fragment,verbatim]
70 c' c'' e' g d'' d' d c
72 c, c,, e, g d,, d, d c
75 An alternate method may be used to declare which octave to engrave
76 a pitch; this method does not require as many octave
77 specifications (@code{'} and @code{,}). See @ref{Relative
82 @unnumberedsubsubsec Accidentals
84 @cindex note names, Dutch
85 @cindex note names, default
87 @c following paragraph changed to match Tutorial and Accidental
88 @c and Key Signature pages.
90 A @rglos{sharp} pitch is made by adding @samp{is} to the name, and
91 a @rglos{flat} pitch by adding @samp{es}. As you might expect,
92 a @rglos{double sharp} or @rglos{double flat} is made by adding
93 @samp{isis} or @samp{eses}. This syntax derived from note naming
94 conventions in Nordic and Germanic languages, like German and
95 Dutch. To use other names for accidentals, see @ruser{Note names
98 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
104 These are the Dutch note names. In Dutch, @code{aes} is
105 contracted to @code{as}, but both forms are accepted. Similarly,
106 both @code{es} and @code{ees} are accepted
108 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
112 A natural will cancel the effect of an accidental or key
113 signature. However, naturals are not encoded into the note name
114 syntax with a suffix; a natural pitch is shown as a simple note
117 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
121 The input @code{d e f} is interpreted as @q{print a D-natural,
122 E-natural, and an F-natural,} regardless of the key signature.
123 For more information about the distinction between musical content
124 and the presentation of that content, see @rlearning{Accidentals
127 @lilypond[fragment,quote,ragged-right,verbatim,relative]
135 @cindex accidental, reminder
136 @cindex accidental, cautionary
137 @cindex accidental, parenthesized
138 @cindex reminder accidental
140 @cindex cautionary accidental
141 @cindex parenthesized accidental
144 Normally accidentals are printed automatically, but you may also
145 print them manually. A reminder accidental can be forced by
146 adding an exclamation mark @code{!} after the pitch. A cautionary
147 accidental (i.e., an accidental within parentheses) can be
148 obtained by adding the question mark @samp{?} after the pitch.
149 These extra accidentals can be used to produce natural signs, too.
151 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
152 cis cis cis! cis? c c? c! c
156 @cindex quarter tones
157 @cindex semi-flats, semi-sharps
159 Half-flats and half-sharps are formed by adding @code{-eh} and
160 @code{-ih}; the following is a series of Cs with increasing
163 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
164 \set Staff.extraNatural = ##f
168 Micro tones are also exported to the MIDI file.
173 In accordance with standard typesetting rules, a natural sign is
174 printed before a sharp or flat if a previous accidental needs to
175 be cancelled. To change this behavior, use @code{\set
176 Staff.extraNatural = ##f}
178 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
180 \set Staff.extraNatural = ##f
187 The automatic production of accidentals can be tuned in many ways.
188 For more information, see @ref{Automatic accidentals}.
190 Program reference: @internalsref{LedgerLineSpanner},
191 @internalsref{NoteHead}.
196 There are no generally accepted standards for denoting
197 three-quarter flats, so LilyPond's symbol does not conform to any
202 @node Note names in other languages
203 @unnumberedsubsubsec Note names in other languages
205 There are predefined sets of note names for various other
206 languages. To use them, include the language specific init file.
207 For example, add @code{\include "english.ly"} to the top of the
208 input file. The available language files and the note names they
211 @cindex note names, other languages
212 @c put the rest of the old table into this new format.
214 @multitable @columnfractions .2 .6 .05 .05 .05 .05
217 @tab sharp @tab flat @tab double sharp @tab double flat
219 @tab c d e f g a bes b
220 @tab -is @tab -es @tab -isis @tab -eses
230 Note Names sharp flat double double
233 nederlands.ly c d e f g a bes b -is -es -isis -eses
234 english.ly c d e f g a bf b -s/-sharp -f/-flat -ss/-x/ -ff/
235 -sharpsharp -flatflat
236 deutsch.ly c d e f g a b h -is -es -isis -eses
237 norsk.ly c d e f g a b h -iss/-is -ess/-es -ississ/-isis -essess/-eses
238 svenska.ly c d e f g a b h -iss -ess -ississ -essess
239 italiano.ly do re mi fa sol la sib si -d -b -dd -bb
240 catalan.ly do re mi fa sol la sib si -d/-s -b -dd/-ss -bb
241 espanol.ly do re mi fa sol la sib si -s -b -ss -bb
246 Note that in Dutch, German, Norwegian, and Swedish, the flat
247 alterations of @samp{a} like for example @code{aes} and
248 @code{aeses} are usually contracted to @code{as} and @code{ases}
249 (or more commonly @code{asas}). Sometimes only these contracted
250 names are defined in the corresponding language files (this also
251 applies to the suffixes for quartertones below).
254 Some music uses microtones whose alterations are fractions of a
255 @q{regular} sharp or flat. The note names for quartertones defined
256 in the various language files are listed in the following table.
257 Here the prefixes @q{semi-} and @q{sesqui-} mean @q{half} and
258 @q{one and a half}, respectively. For Norwegian, Swedish, Catalan
259 and Spanish no special names have been defined yet.
261 @c What about Turkish Maquam music and similar microtonal systems?
263 @c Note that the term "three-quarter-sharp/-flat" used in lilypond's source code
264 @c is actually misleading since the alteration is in fact one and a half
265 @c of a regular sharp/flat. Whence the naming "sesqui-sharp/-flat" used below.
268 Note Names semi- semi- sesqui- sesqui-
269 sharp flat sharp flat
271 nederlands.ly c d e f g a bes b -ih -eh -isih -eseh
272 english.ly c d e f g a bf b -qs -qf -tqs -tqf
273 deutsch.ly c d e f g a b h -ih -eh -isih -eseh
274 norsk.ly c d e f g a b h
275 svenska.ly c d e f g a b h
276 italiano.ly do re mi fa sol la sib si -sd -sb -dsd -bsb
277 catalan.ly do re mi fa sol la sib si
278 espanol.ly do re mi fa sol la sib si
282 @node Changing multiple pitches
283 @subsection Changing multiple pitches
291 @node Relative octaves
292 @unnumberedsubsubsec Relative octaves
295 @cindex Relative octave specification
298 Octaves are specified by adding @code{'} and @code{,} to pitch
299 names. When you copy existing music, it is easy to accidentally
300 put a pitch in the wrong octave and hard to find such an error.
301 The relative octave mode prevents these errors by making the
302 mistakes much larger: a single error puts the rest of the piece
306 \relative @var{startpitch} @var{musicexpr}
313 \relative @var{musicexpr}
317 @code{c'} is used as the default if no starting pitch is defined.
319 The octave of notes that appear in @var{musicexpr} are calculated
324 If no octave changing marks are used, the basic interval between
325 this and the last note is always taken to be a fourth or less.
328 This distance is determined without regarding alterations; a
329 @code{fisis} following a @code{ceses} will be put above the
330 @code{ceses}. In other words, a doubly-augmented fourth is
331 considered a smaller interval than a diminished fifth, even though
332 the doubly-augmented fourth spans seven semitones while the
333 diminished fifth only spans six semitones.
336 The octave changing marks @code{'} and @code{,} can be added to
337 raise or lower the pitch by an extra octave from the basic
341 Multiple octave changing marks can be used. @code{''} will raise
342 the pitch by two octaves.
345 The pitch of the first note is relative to @code{\relative
349 If you do not specify @var{startpitch} then middle C is used.
353 Here is the relative mode shown in action
355 @lilypond[quote,fragment,ragged-right,verbatim]
361 Octave changing marks are used for intervals greater than a fourth
363 @lilypond[quote,ragged-right,fragment,verbatim]
369 If the preceding item is a chord, the first note of the chord is
370 used to determine the first note of the next chord
372 @lilypond[quote,ragged-right,fragment,verbatim]
380 The pitch after @code{\relative} contains a note name.
382 The relative conversion will not affect @code{\transpose},
383 @code{\chordmode} or @code{\relative} sections in its argument.
384 To use relative within transposed music, an additional
385 @code{\relative} must be placed inside @code{\transpose}.
389 @unnumberedsubsubsec Octave check
393 Octave checks make octave errors easier to correct: a note may be
394 followed by @code{=}@var{quotes} which indicates what its absolute
395 octave should be. In the following example,
398 \relative c'' @{ c='' b=' d,='' @}
402 the @code{d} will generate a warning, because a @code{d''} is
403 expected (because @code{b'} to @code{d''} is only a third), but a
404 @code{d'} is found. In the output, the octave is corrected to be
405 a @code{d''} and the next note is calculated relative to
406 @code{d''} instead of @code{d'}.
408 There is also an octave check that produces no visible output.
415 This checks that @var{pitch} (without quotes) yields @var{pitch}
416 (with quotes) in @code{\relative} mode compared to the note given
417 in the @code{\relative} command. If not, a warning is printed,
418 and the octave is corrected. The @var{pitch} is not printed as a
421 In the example below, the first check passes without incident,
422 since the @code{e} (in @code{relative} mode) is within a fifth of
423 @code{a'}. However, the second check produces a warning, since
424 the @code{e} is not within a fifth of @code{b'}. The warning
425 message is printed, and the octave is adjusted so that the
426 following notes are in the correct octave once again.
437 The octave of a note following an octave check is determined with
438 respect to the note preceding it. In the next fragment, the last
439 note is an @code{a'}, above middle C. That means that the
440 @code{\octave} check passes successfully, so the check could be
441 deleted without changing the output of the piece.
443 @lilypond[quote,ragged-right,verbatim,fragment]
453 @unnumberedsubsubsec Transpose
456 @cindex Transposition of pitches
459 A music expression can be transposed with @code{\transpose}. The
463 \transpose @var{from} @var{to} @var{musicexpr}
466 This means that @var{musicexpr} is transposed by the interval
467 between the pitches @var{from} and @var{to}: any note with pitch
468 @code{from} is changed to @code{to}.
470 Consider a piece written in the key of D-major. If this piece is
471 a little too low for its performer, it can be transposed up to
475 \transpose d e @dots{}
478 Consider a part written for violin (a C instrument). If this part
479 is to be played on the A clarinet (for which an A is notated as a
480 C, and which sounds a minor third lower than notated), the
481 following transposition will produce the appropriate part
484 \transpose a c @dots{}
487 @code{\transpose} distinguishes between enharmonic pitches: both
488 @code{\transpose c cis} or @code{\transpose c des} will transpose
489 up half a tone. The first version will print sharps and the
490 second version will print flats
492 @lilypond[quote,ragged-right,verbatim]
493 mus = { \key d \major cis d fis g }
502 @code{\transpose} may also be used to input written notes for a
503 transposing instrument. Pitches are normally entered into
504 LilyPond in C (or @q{concert pitch}), but they may be entered in
505 another key. For example, when entering music for a B-flat
506 trumpet which begins on concert D, one would write
509 \transpose c bes @{ e4 @dots{} @}
512 To print this music in B-flat again (i.e., producing a trumpet
513 part, instead of a concert pitch conductor's score) you would wrap
514 the existing music with another @code{transpose}
517 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
523 Program reference: @internalsref{TransposedMusic}.
526 @lsr{scheme,transpose-pitches-with-minimum-accidentals.ly}.
531 If you want to use both @code{\transpose} and @code{\relative},
532 you must put @code{\transpose} outside of @code{\relative}, since
533 @code{\relative} will have no effect on music that appears inside
537 @node Displaying pitches
538 @subsection Displaying pitches
544 * Instrument transpositions::
548 @unnumberedsubsubsec Clef
552 The clef indicates which lines of the staff correspond to which
553 pitches. The clef is set with the @code{\clef} command
555 @lilypond[quote,ragged-right,fragment,verbatim]
556 { c''2 \clef alto g'2 }
566 @cindex mezzosoprano clef
567 @cindex baritone clef
568 @cindex varbaritone clef
571 Supported clefs include
573 @multitable @columnfractions .33 .66
574 @headitem Clef @tab Position
575 @item @code{treble}, violin, G, G2 @tab
577 @item @code{alto, C} @tab
579 @item @code{tenor} @tab
581 @item @code{bass, F} @tab
583 @item @code{french} @tab
584 G clef on 1st line, so-called French violin clef
585 @item @code{soprano} @tab
587 @item @code{mezzosoprano} @tab
589 @item @code{baritone} @tab
591 @item @code{varbaritone} @tab
593 @item @code{subbass} @tab
595 @item @code{percussion} @tab
597 @item @code{tab} @tab
601 By adding @code{_8} or @code{^8} to the clef name, the clef is
602 transposed one octave down or up, respectively, and @code{_15} and
603 @code{^15} transposes by two octaves. The argument @var{clefname}
604 must be enclosed in quotes when it contains underscores or digits.
607 @cindex choral tenor clef
608 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
615 The command @code{\clef "treble_8"} is equivalent to setting
616 @code{clefGlyph}, @code{clefPosition} (which controls the Y
617 position of the clef), @code{middleCPosition} and
618 @code{clefOctavation}. A clef is printed when any of these
619 properties are changed. The following example shows possibilities
620 when setting properties manually.
622 @lilypond[quote,ragged-right,verbatim]
624 \set Staff.clefGlyph = #"clefs.F"
625 \set Staff.clefPosition = #2
627 \set Staff.clefGlyph = #"clefs.G"
629 \set Staff.clefGlyph = #"clefs.C"
631 \set Staff.clefOctavation = #7
633 \set Staff.clefOctavation = #0
634 \set Staff.clefPosition = #0
638 \set Staff.middleCPosition = #4
646 Program reference: @internalsref{Clef}.
648 This manual: @ref{Ancient clefs}.
652 @unnumberedsubsubsec Key signature
654 @cindex Key signature
657 The key signature indicates the tonality in which a piece is
658 played. It is denoted by a set of alterations (flats or sharps)
659 at the start of the staff.
661 Setting or changing the key signature is done with the @code{\key}
665 @code{\key} @var{pitch} @var{type}
674 @funindex \mixolydian
680 Here, @var{type} should be @code{\major} or @code{\minor} to get
681 @var{pitch}-major or @var{pitch}-minor, respectively. You may
682 also use the standard mode names (also called @q{church modes}):
683 @code{\ionian}, @code{\locrian}, @code{\aeolian},
684 @code{\mixolydian}, @code{\lydian}, @code{\phrygian}, and
687 This command sets the context property @code{Staff.keySignature}.
688 Non-standard key signatures can be specified by setting this
691 Accidentals and key signatures often confuse new users, because
692 unaltered notes get natural signs depending on the key signature.
693 For more information, see @ref{Accidentals}, or
694 @rlearning{Accidentals and key signatures}.
696 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
705 A natural sign is printed to cancel any previous accidentals.
706 This can be suppressed by setting the
707 @code{Staff.printKeyCancellation} property.
709 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
714 \set Staff.printKeyCancellation = ##f
724 Program reference: @internalsref{KeyCancellation},
725 @internalsref{KeySignature}.
728 @node Ottava brackets
729 @unnumberedsubsubsec Ottava brackets
731 @q{Ottava} brackets introduce an extra transposition of an octave
732 for the staff. They are created by invoking the function
733 @code{set-octavation}
739 @lilypond[quote,ragged-right,verbatim,fragment]
749 The @code{set-octavation} function also takes -1 (for 8va bassa),
750 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
751 Internally the function sets the properties @code{ottavation}
752 (e.g., to @code{"8va"} or @code{"8vb"}) and
753 @code{centralCPosition}. For overriding the text of the bracket,
754 set @code{ottavation} after invoking @code{set-octavation}, i.e.,
756 @lilypond[quote,ragged-right,verbatim]
759 \set Staff.ottavation = #"8"
767 Program reference: @internalsref{OttavaBracket}.
772 @code{set-octavation} will get confused when clef changes happen
773 during an octavation bracket.
776 @node Instrument transpositions
777 @unnumberedsubsubsec Instrument transpositions
779 @cindex transposition, MIDI
780 @cindex transposition, instrument
782 The key of a transposing instrument can also be specified. This
783 applies to many wind instruments, for example, clarinets (B-flat,
784 A, and E-flat), horn (F) and trumpet (B-flat, C, D, and E-flat).
786 The transposition is entered after the keyword
787 @code{\transposition}
790 \transposition bes %% B-flat clarinet
794 This command sets the property @code{instrumentTransposition}.
795 The value of this property is used for MIDI output and quotations.
796 It does not affect how notes are printed in the current staff. To
797 change the printed output, see @ref{Transpose}.
799 The pitch to use for @code{\transposition} should correspond to
800 the real sound heard when a @code{c'} written on the staff is
801 played by the transposing instrument. For example, when entering
802 a score in concert pitch, typically all voices are entered in C,
803 so they should be entered as
816 The command @code{\transposition} should be used when the music is
817 entered from a (transposed) orchestral part. For example, in
818 classical horn parts, the tuning of the instrument is often
819 changed during a piece. When copying the notes from the part, use
820 @code{\transposition}, e.g.,