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 * Cautionary accidentals::
35 * Note names in other languages::
40 @unnumberedsubsubsec Normal pitches
45 A pitch name is specified using lowercase letters @code{a} through
46 @code{g}. An ascending C-major scale is engraved with
48 @lilypond[quote,fragment,verbatim,ragged-right]
53 The note name @code{c} is engraved one octave below middle C.
55 @lilypond[quote,fragment,verbatim,ragged-right]
65 The optional octave specification takes the form of a series of
66 single quote (@samp{'}) characters or a series of comma (@samp{,})
67 characters. Each @samp{'} raises the pitch by one octave; each
68 @samp{,} lowers the pitch by an octave.
70 @lilypond[quote,ragged-right,fragment,verbatim]
72 c' c'' e' g d'' d' d c
74 c, c,, e, g d,, d, d c
77 An alternate method may be used to declare which octave to engrave
78 a pitch; this method does not require as many octave
79 specifications (@code{'} and @code{,}). See @ref{Relative
84 @unnumberedsubsubsec Accidentals
86 @cindex note names, Dutch
87 @cindex note names, default
89 @c following paragraph changed to match Tutorial and Accidental
90 @c and Key Signature pages.
92 A @rglos{sharp} pitch is made by adding @samp{is} to the name, and
93 a @rglos{flat} pitch by adding @samp{es}. As you might expect, a
94 @rglos{double sharp} or @rglos{double flat} is made by adding
95 @samp{isis} or @samp{eses}@footnote{This syntax derived from note
96 naming conventions in Nordic and Germanic languages, like German
97 and Dutch. To use other names for accidentals, see @ruser{Note
98 names in other languages}.}
100 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
106 These are the Dutch note names. In Dutch, @code{aes} is
107 contracted to @code{as}, but both forms are accepted. Similarly,
108 both @code{es} and @code{ees} are accepted
110 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
114 A natural will cancel the effect of an accidental or key
115 signature. However, naturals are not encoded into the note name
116 syntax with a suffix; a natural pitch is shown as a simple note
119 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
123 The input @code{d e f} is interpreted as @q{print a D-natural,
124 E-natural, and an F-natural,} regardless of the key signature.
125 For more information about the distinction between musical content
126 and the presentation of that content, see @rlearning{Accidentals
129 @lilypond[fragment,quote,ragged-right,verbatim,relative]
138 In accordance with standard typesetting rules, a natural sign is
139 printed before a sharp or flat if a previous accidental needs to
140 be cancelled. To change this behavior, use @code{\set
141 Staff.extraNatural = ##f}
143 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
145 \set Staff.extraNatural = ##f
152 Program reference: @internalsref{LedgerLineSpanner},
153 @internalsref{NoteHead}.
156 @node Cautionary accidentals
157 @unnumberedsubsubsec Cautionary accidentals
159 @cindex accidental, reminder
160 @cindex accidental, cautionary
161 @cindex accidental, parenthesized
162 @cindex reminder accidental
164 @cindex cautionary accidental
165 @cindex parenthesized accidental
168 Normally accidentals are printed automatically, but you may also
169 print them manually. A reminder accidental can be forced by
170 adding an exclamation mark @code{!} after the pitch. A cautionary
171 accidental (i.e., an accidental within parentheses) can be
172 obtained by adding the question mark @samp{?} after the pitch.
173 These extra accidentals can be used to produce natural signs, too.
175 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
176 cis cis cis! cis? c c? c! c
182 The automatic production of accidentals can be tuned in many ways.
183 For more information, see @ref{Automatic accidentals}.
187 @unnumberedsubsubsec Micro tones
189 @cindex quarter tones
190 @cindex semi-flats, semi-sharps
192 Half-flats and half-sharps are formed by adding @code{-eh} and
193 @code{-ih}; the following is a series of Cs with increasing
196 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
197 \set Staff.extraNatural = ##f
201 Micro tones are also exported to the MIDI file.
206 There are no generally accepted standards for denoting
207 three-quarter flats, so LilyPond's symbol does not conform to any
211 @node Note names in other languages
212 @unnumberedsubsubsec Note names in other languages
214 There are predefined sets of note names for various other
215 languages. To use them, include the language specific init file.
216 For example, add @code{\include "english.ly"} to the top of the
217 input file. The available language files and the note names they
220 @cindex note names, other languages
221 @c put the rest of the old table into this new format.
223 @multitable @columnfractions .2 .6 .05 .05 .05 .05
226 @tab sharp @tab flat @tab double sharp @tab double flat
228 @tab c d e f g a bes b
229 @tab -is @tab -es @tab -isis @tab -eses
239 Note Names sharp flat double double
242 nederlands.ly c d e f g a bes b -is -es -isis -eses
243 english.ly c d e f g a bf b -s/-sharp -f/-flat -ss/-x/ -ff/
244 -sharpsharp -flatflat
245 deutsch.ly c d e f g a b h -is -es -isis -eses
246 norsk.ly c d e f g a b h -iss/-is -ess/-es -ississ/-isis -essess/-eses
247 svenska.ly c d e f g a b h -iss -ess -ississ -essess
248 italiano.ly do re mi fa sol la sib si -d -b -dd -bb
249 catalan.ly do re mi fa sol la sib si -d/-s -b -dd/-ss -bb
250 espanol.ly do re mi fa sol la sib si -s -b -ss -bb
255 Note that in Dutch, German, Norwegian, and Swedish, the flat
256 alterations of @samp{a} like for example @code{aes} and
257 @code{aeses} are usually contracted to @code{as} and @code{ases}
258 (or more commonly @code{asas}). Sometimes only these contracted
259 names are defined in the corresponding language files (this also
260 applies to the suffixes for quartertones below).
263 Some music uses microtones whose alterations are fractions of a
264 @q{regular} sharp or flat. The note names for quartertones defined
265 in the various language files are listed in the following table.
266 Here the prefixes @q{semi-} and @q{sesqui-} mean @q{half} and
267 @q{one and a half}, respectively. For Norwegian, Swedish, Catalan
268 and Spanish no special names have been defined yet.
270 @c What about Turkish Maquam music and similar microtonal systems?
272 @c Note that the term "three-quarter-sharp/-flat" used in lilypond's source code
273 @c is actually misleading since the alteration is in fact one and a half
274 @c of a regular sharp/flat. Whence the naming "sesqui-sharp/-flat" used below.
277 Note Names semi- semi- sesqui- sesqui-
278 sharp flat sharp flat
280 nederlands.ly c d e f g a bes b -ih -eh -isih -eseh
281 english.ly c d e f g a bf b -qs -qf -tqs -tqf
282 deutsch.ly c d e f g a b h -ih -eh -isih -eseh
283 norsk.ly c d e f g a b h
284 svenska.ly c d e f g a b h
285 italiano.ly do re mi fa sol la sib si -sd -sb -dsd -bsb
286 catalan.ly do re mi fa sol la sib si
287 espanol.ly do re mi fa sol la sib si
291 @node Changing multiple pitches
292 @subsection Changing multiple pitches
300 @node Relative octaves
301 @unnumberedsubsubsec Relative octaves
304 @cindex Relative octave specification
307 Octaves are specified by adding @code{'} and @code{,} to pitch
308 names. When you copy existing music, it is easy to accidentally
309 put a pitch in the wrong octave and hard to find such an error.
310 The relative octave mode prevents these errors by making the
311 mistakes much larger: a single error puts the rest of the piece
315 \relative @var{startpitch} @var{musicexpr}
322 \relative @var{musicexpr}
326 @code{c'} is used as the default if no starting pitch is defined.
328 The octave of notes that appear in @var{musicexpr} are calculated
333 If no octave changing marks are used, the basic interval between
334 this and the last note is always taken to be a fourth or less.
337 This distance is determined without regarding alterations; a
338 @code{fisis} following a @code{ceses} will be put above the
339 @code{ceses}. In other words, a doubly-augmented fourth is
340 considered a smaller interval than a diminished fifth, even though
341 the doubly-augmented fourth spans seven semitones while the
342 diminished fifth only spans six semitones.
345 The octave changing marks @code{'} and @code{,} can be added to
346 raise or lower the pitch by an extra octave from the basic
350 Multiple octave changing marks can be used. @code{''} will raise
351 the pitch by two octaves.
354 The pitch of the first note is relative to @code{\relative
358 If you do not specify @var{startpitch} then middle C is used.
362 Here is the relative mode shown in action
364 @lilypond[quote,fragment,ragged-right,verbatim]
370 Octave changing marks are used for intervals greater than a fourth
372 @lilypond[quote,ragged-right,fragment,verbatim]
378 If the preceding item is a chord, the first note of the chord is
379 used to determine the first note of the next chord
381 @lilypond[quote,ragged-right,fragment,verbatim]
389 The pitch after @code{\relative} contains a note name.
391 The relative conversion will not affect @code{\transpose},
392 @code{\chordmode} or @code{\relative} sections in its argument.
393 To use relative within transposed music, an additional
394 @code{\relative} must be placed inside @code{\transpose}.
398 @unnumberedsubsubsec Octave check
402 Octave checks make octave errors easier to correct: a note may be
403 followed by @code{=}@var{quotes} which indicates what its absolute
404 octave should be. In the following example,
407 \relative c'' @{ c='' b=' d,='' @}
411 the @code{d} will generate a warning, because a @code{d''} is
412 expected (because @code{b'} to @code{d''} is only a third), but a
413 @code{d'} is found. In the output, the octave is corrected to be
414 a @code{d''} and the next note is calculated relative to
415 @code{d''} instead of @code{d'}.
417 There is also an octave check that produces no visible output.
424 This checks that @var{pitch} (without quotes) yields @var{pitch}
425 (with quotes) in @code{\relative} mode compared to the note given
426 in the @code{\relative} command. If not, a warning is printed,
427 and the octave is corrected. The @var{pitch} is not printed as a
430 In the example below, the first check passes without incident,
431 since the @code{e} (in @code{relative} mode) is within a fifth of
432 @code{a'}. However, the second check produces a warning, since
433 the @code{e} is not within a fifth of @code{b'}. The warning
434 message is printed, and the octave is adjusted so that the
435 following notes are in the correct octave once again.
446 The octave of a note following an octave check is determined with
447 respect to the note preceding it. In the next fragment, the last
448 note is an @code{a'}, above middle C. That means that the
449 @code{\octave} check passes successfully, so the check could be
450 deleted without changing the output of the piece.
452 @lilypond[quote,ragged-right,verbatim,fragment]
462 @unnumberedsubsubsec Transpose
465 @cindex Transposition of pitches
468 A music expression can be transposed with @code{\transpose}. The
472 \transpose @var{from} @var{to} @var{musicexpr}
475 This means that @var{musicexpr} is transposed by the interval
476 between the pitches @var{from} and @var{to}: any note with pitch
477 @code{from} is changed to @code{to}.
479 Consider a piece written in the key of D-major. If this piece is
480 a little too low for its performer, it can be transposed up to
484 \transpose d e @dots{}
487 Consider a part written for violin (a C instrument). If this part
488 is to be played on the A clarinet (for which an A is notated as a
489 C, and which sounds a minor third lower than notated), the
490 following transposition will produce the appropriate part
493 \transpose a c @dots{}
496 @code{\transpose} distinguishes between enharmonic pitches: both
497 @code{\transpose c cis} or @code{\transpose c des} will transpose
498 up half a tone. The first version will print sharps and the
499 second version will print flats
501 @lilypond[quote,ragged-right,verbatim]
502 mus = { \key d \major cis d fis g }
511 @code{\transpose} may also be used to input written notes for a
512 transposing instrument. Pitches are normally entered into
513 LilyPond in C (or @q{concert pitch}), but they may be entered in
514 another key. For example, when entering music for a B-flat
515 trumpet which begins on concert D, one would write
518 \transpose c bes @{ e4 @dots{} @}
521 To print this music in B-flat again (i.e., producing a trumpet
522 part, instead of a concert pitch conductor's score) you would wrap
523 the existing music with another @code{transpose}
526 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
532 Program reference: @internalsref{TransposedMusic}.
535 @lsr{scheme,transpose-pitches-with-minimum-accidentals.ly}.
540 If you want to use both @code{\transpose} and @code{\relative},
541 you must put @code{\transpose} outside of @code{\relative}, since
542 @code{\relative} will have no effect on music that appears inside
546 @node Displaying pitches
547 @subsection Displaying pitches
553 * Instrument transpositions::
557 @unnumberedsubsubsec Clef
561 The clef indicates which lines of the staff correspond to which
562 pitches. The clef is set with the @code{\clef} command
564 @lilypond[quote,ragged-right,fragment,verbatim]
565 { c''2 \clef alto g'2 }
575 @cindex mezzosoprano clef
576 @cindex baritone clef
577 @cindex varbaritone clef
580 Supported clefs include
582 @multitable @columnfractions .33 .66
583 @headitem Clef @tab Position
584 @item @code{treble}, violin, G, G2 @tab
586 @item @code{alto, C} @tab
588 @item @code{tenor} @tab
590 @item @code{bass, F} @tab
592 @item @code{french} @tab
593 G clef on 1st line, so-called French violin clef
594 @item @code{soprano} @tab
596 @item @code{mezzosoprano} @tab
598 @item @code{baritone} @tab
600 @item @code{varbaritone} @tab
602 @item @code{subbass} @tab
604 @item @code{percussion} @tab
606 @item @code{tab} @tab
610 By adding @code{_8} or @code{^8} to the clef name, the clef is
611 transposed one octave down or up, respectively, and @code{_15} and
612 @code{^15} transposes by two octaves. The argument @var{clefname}
613 must be enclosed in quotes when it contains underscores or digits.
616 @cindex choral tenor clef
617 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
624 The command @code{\clef "treble_8"} is equivalent to setting
625 @code{clefGlyph}, @code{clefPosition} (which controls the Y
626 position of the clef), @code{middleCPosition} and
627 @code{clefOctavation}. A clef is printed when any of these
628 properties are changed. The following example shows possibilities
629 when setting properties manually.
631 @lilypond[quote,ragged-right,verbatim]
633 \set Staff.clefGlyph = #"clefs.F"
634 \set Staff.clefPosition = #2
636 \set Staff.clefGlyph = #"clefs.G"
638 \set Staff.clefGlyph = #"clefs.C"
640 \set Staff.clefOctavation = #7
642 \set Staff.clefOctavation = #0
643 \set Staff.clefPosition = #0
647 \set Staff.middleCPosition = #4
655 Manual: @ref{Grace notes}.
657 Program reference: @internalsref{Clef}.
661 @unnumberedsubsubsec Key signature
663 @cindex Key signature
666 The key signature indicates the tonality in which a piece is
667 played. It is denoted by a set of alterations (flats or sharps)
668 at the start of the staff.
670 Setting or changing the key signature is done with the @code{\key}
674 @code{\key} @var{pitch} @var{type}
683 @funindex \mixolydian
689 Here, @var{type} should be @code{\major} or @code{\minor} to get
690 @var{pitch}-major or @var{pitch}-minor, respectively. You may
691 also use the standard mode names (also called @q{church modes}):
692 @code{\ionian}, @code{\locrian}, @code{\aeolian},
693 @code{\mixolydian}, @code{\lydian}, @code{\phrygian}, and
696 This command sets the context property @code{Staff.keySignature}.
697 Non-standard key signatures can be specified by setting this
700 Accidentals and key signatures often confuse new users, because
701 unaltered notes get natural signs depending on the key signature.
702 For more information, see @ref{Accidentals}, or
703 @rlearning{Accidentals and key signatures}.
705 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
714 A natural sign is printed to cancel any previous accidentals.
715 This can be suppressed by setting the
716 @code{Staff.printKeyCancellation} property.
718 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
723 \set Staff.printKeyCancellation = ##f
733 Program reference: @internalsref{KeyCancellation},
734 @internalsref{KeySignature}.
737 @node Ottava brackets
738 @unnumberedsubsubsec Ottava brackets
740 @q{Ottava} brackets introduce an extra transposition of an octave
741 for the staff. They are created by invoking the function
742 @code{set-octavation}
748 @lilypond[quote,ragged-right,verbatim,fragment]
758 The @code{set-octavation} function also takes -1 (for 8va bassa),
759 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
760 Internally the function sets the properties @code{ottavation}
761 (e.g., to @code{"8va"} or @code{"8vb"}) and
762 @code{centralCPosition}. For overriding the text of the bracket,
763 set @code{ottavation} after invoking @code{set-octavation}, i.e.,
765 @lilypond[quote,ragged-right,verbatim]
768 \set Staff.ottavation = #"8"
776 Program reference: @internalsref{OttavaBracket}.
781 @code{set-octavation} will get confused when clef changes happen
782 during an octavation bracket.
785 @node Instrument transpositions
786 @unnumberedsubsubsec Instrument transpositions
788 @cindex transposition, MIDI
789 @cindex transposition, instrument
791 The key of a transposing instrument can also be specified. This
792 applies to many wind instruments, for example, clarinets (B-flat,
793 A, and E-flat), horn (F) and trumpet (B-flat, C, D, and E-flat).
795 The transposition is entered after the keyword
796 @code{\transposition}
799 \transposition bes %% B-flat clarinet
803 This command sets the property @code{instrumentTransposition}.
804 The value of this property is used for MIDI output and quotations.
805 It does not affect how notes are printed in the current staff. To
806 change the printed output, see @ref{Transpose}.
808 The pitch to use for @code{\transposition} should correspond to
809 the real sound heard when a @code{c'} written on the staff is
810 played by the transposing instrument. For example, when entering
811 a score in concert pitch, typically all voices are entered in C,
812 so they should be entered as
825 The command @code{\transposition} should be used when the music is
826 entered from a (transposed) orchestral part. For example, in
827 classical horn parts, the tuning of the instrument is often
828 changed during a piece. When copying the notes from the part, use
829 @code{\transposition}, e.g.,