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
34 * Note names in other languages::
39 @unnumberedsubsubsec Normal pitches
44 A pitch name is specified using lowercase letters @code{a} through
45 @code{g}. An ascending C-major scale is engraved with
47 @lilypond[quote,fragment,verbatim,ragged-right]
52 There are two different ways to enter these note names with regard
53 to octave placement: absolute and relative. The relative mode will
54 in most cases be the most convenient, but since the absolute mode
55 is most fundamental, it will be presented first.
57 In absolute mode, the note name @code{c} is engraved one octave
58 below middle C, and each note up to @code{b} in the octave above,
59 as in the previous example.
61 @lilypond[quote,fragment,verbatim,ragged-right]
71 If a note should be in another octave than this, an octave
72 specification can be given. It takes the form of a series of
73 single quote (@samp{'}) or comma (@samp{,}) characters. Each
74 @samp{'} raises the pitch by one octave; each @samp{,} lowers the
77 @lilypond[quote,ragged-right,fragment,verbatim]
79 c' c'' e' g d'' d' d c
81 c, c,, e, g d,, d, d c
84 An alternate method may be used to declare which octave to engrave
85 a pitch; this method does not require as many octave
86 specifications (@code{'} and @code{,}). See @ref{Relative
91 Snippets: @lsrdir{pitch}
95 @node Relative octaves
96 @unnumberedsubsubsec Relative octaves
99 @cindex Relative octave specification
102 When octaves are specified as above by adding @code{'} and
103 @code{,} to pitch names, it is easy to accidentally put a pitch in
104 the wrong octave. The relative octave mode prevents these errors
105 since most of the time it is not necessary to indicate any octaves
106 at all. Furthermore, in absolute mode, a single mistake may be
107 difficult to spot; in relative mode, a single error puts the rest
108 of the piece off by one octave.
111 \relative @var{startpitch} @var{musicexpr}
114 In relative mode, each note is assumed to be as close to the
115 previous note as possible. This means that the octave of notes
116 that appear in @var{musicexpr} are calculated as follows:
120 The pitch of the first note is relative to @code{\relative
124 If no octave changing marks are used, the basic interval between a
125 note and the one that precedes it is always taken to be a fourth
129 This distance is determined without regarding alterations or the
130 actual sounding pitches; a @code{fisis} following a @code{ceses}
131 will be put above the @code{ceses}. In other words, a
132 doubly-augmented fourth is considered a smaller interval than a
133 diminished fifth, even though the doubly-augmented fourth spans
134 seven semitones while the diminished fifth only spans six
138 The octave changing marks @code{'} and @code{,} can be added to
139 raise or lower the pitch by an extra octave from the basic
143 Multiple octave changing marks can be used. @code{''} will raise
144 the pitch by two octaves.
148 Here is the relative mode shown in action:
150 @lilypond[quote,fragment,ragged-right,verbatim]
156 Octave changing marks are used for intervals greater than a
159 @lilypond[quote,ragged-right,fragment,verbatim]
165 If the preceding item is a chord, the first note of the chord is
166 used as the reference point for the octave placement of a
167 following note or chord:
169 @lilypond[quote,ragged-right,fragment,verbatim]
177 The @var{startpitch} (after @code{\relative}) is a note name in
178 absolute mode. In principle it can be any note name, but common
179 practice is to use @code{c} in various octave positions.
184 Snippets: @lsrdir{pitch}
189 The relative conversion will not affect @code{\transpose},
190 @code{\chordmode} or @code{\relative} sections in its argument.
191 To use relative within transposed music, an additional
192 @code{\relative} must be placed inside @code{\transpose}.
195 If no @var{startpitch} is specified for @code{\relative}, then
196 @code{c'} is assumed. However, this is a deprecated option and
197 may disappear in future versions, so its use is discouraged.
203 @unnumberedsubsubsec Accidentals
205 @cindex note names, Dutch
206 @cindex note names, default
208 @c following paragraph changed to match Tutorial and Accidental
209 @c and Key Signature pages.
211 A @rglos{sharp} pitch is made by adding @samp{is} to the name, and
212 a @rglos{flat} pitch by adding @samp{es}. As you might expect,
213 a @rglos{double sharp} or @rglos{double flat} is made by adding
214 @samp{isis} or @samp{eses}. This syntax derived from note naming
215 conventions in Nordic and Germanic languages, like German and
216 Dutch. To use other names for accidentals, see @ruser{Note names
219 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
225 These are the Dutch note names. In Dutch, @code{aes} is
226 contracted to @code{as}, but both forms are accepted. Similarly,
227 both @code{es} and @code{ees} are accepted
229 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
233 A natural will cancel the effect of an accidental or key
234 signature. However, naturals are not encoded into the note name
235 syntax with a suffix; a natural pitch is shown as a simple note
238 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
242 The input @code{d e f} is interpreted as @q{print a D-natural,
243 E-natural, and an F-natural,} regardless of the key signature.
244 For more information about the distinction between musical content
245 and the presentation of that content, see @rlearning{Accidentals
248 @lilypond[fragment,quote,ragged-right,verbatim,relative]
256 @cindex accidental, reminder
257 @cindex accidental, cautionary
258 @cindex accidental, parenthesized
259 @cindex reminder accidental
261 @cindex cautionary accidental
262 @cindex parenthesized accidental
265 Normally accidentals are printed automatically, but you may also
266 print them manually. A reminder accidental can be forced by
267 adding an exclamation mark @code{!} after the pitch. A cautionary
268 accidental (i.e., an accidental within parentheses) can be
269 obtained by adding the question mark @samp{?} after the pitch.
270 These extra accidentals can be used to produce natural signs, too.
272 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
273 cis cis cis! cis? c c? c! c
277 @cindex quarter tones
278 @cindex semi-flats, semi-sharps
280 Half-flats and half-sharps are formed by adding @code{-eh} and
281 @code{-ih}; the following is a series of Cs with increasing
284 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
285 \set Staff.extraNatural = ##f
289 Micro tones are also exported to the MIDI file.
294 In accordance with standard typesetting rules, a natural sign is
295 printed before a sharp or flat if a previous accidental needs to
296 be cancelled. To change this behavior, use @code{\set
297 Staff.extraNatural = ##f}
299 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
301 \set Staff.extraNatural = ##f
308 The automatic production of accidentals can be tuned in many ways.
309 For more information, see @ref{Automatic accidentals}.
311 Program reference: @internalsref{LedgerLineSpanner},
312 @internalsref{NoteHead}.
317 There are no generally accepted standards for denoting
318 three-quarter flats, so LilyPond's symbol does not conform to any
323 @node Note names in other languages
324 @unnumberedsubsubsec Note names in other languages
326 There are predefined sets of note names for various other
327 languages. To use them, include the language specific init file.
328 For example, add @code{\include "english.ly"} to the top of the
329 input file. The available language files and the note names they
332 @cindex note names, other languages
335 @multitable @columnfractions .2 .6 .05 .05 .05 .05
338 @tab sharp @tab flat @tab double sharp @tab double flat
340 @tab c d e f g a bes b
341 @tab -is @tab -es @tab -isis @tab -eses
343 @tab c d e f g a bf b
344 @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
348 @tab -is @tab -es @tab -isis @tab -eses
351 @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
355 @tab -iss @tab -ess @tab -ississ @tab -essess
357 @tab do re mi fa sol la sib si
358 @tab -d @tab -b @tab -dd @tab -bb
360 @tab do re mi fa sol la sib si
361 @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
363 @tab do re mi fa sol la sib si
364 @tab -s @tab -b @tab -ss @tab -bb
369 Note that in Dutch, German, Norwegian, and Swedish, the flat
370 alterations of @samp{a} like for example @code{aes} and
371 @code{aeses} are usually contracted to @code{as} and @code{ases}
372 (or more commonly @code{asas}). Sometimes only these contracted
373 names are defined in the corresponding language files (this also
374 applies to the suffixes for quartertones below).
377 Some music uses microtones whose alterations are fractions of a
378 @q{regular} sharp or flat. The note names for quartertones
379 defined in the various language files are listed in the following
380 table. Here the prefixes @q{semi-} and @q{sesqui-} mean @q{half}
381 and @q{one and a half}, respectively. For Norwegian, Swedish,
382 Catalan and Spanish no special names have been defined yet.
385 @c What about Turkish Maquam music and similar microtonal systems?
387 @c Note that the term "three-quarter-sharp/-flat" used in lilypond's source code
388 @c is actually misleading since the alteration is in fact one and a half
389 @c of a regular sharp/flat. Whence the naming "sesqui-sharp/-flat" used below.
392 Note Names semi- semi- sesqui- sesqui-
393 sharp flat sharp flat
395 nederlands.ly c d e f g a bes b -ih -eh -isih -eseh
396 english.ly c d e f g a bf b -qs -qf -tqs -tqf
397 deutsch.ly c d e f g a b h -ih -eh -isih -eseh
398 norsk.ly c d e f g a b h
399 svenska.ly c d e f g a b h
400 italiano.ly do re mi fa sol la sib si -sd -sb -dsd -bsb
401 catalan.ly do re mi fa sol la sib si
402 espanol.ly do re mi fa sol la sib si
406 @node Changing multiple pitches
407 @subsection Changing multiple pitches
415 @unnumberedsubsubsec Octave check
419 Octave checks make octave errors easier to correct: a note may be
420 followed by @code{=}@var{quotes} which indicates what its absolute
421 octave should be. In the following example,
424 \relative c'' @{ c='' b=' d,='' @}
428 the @code{d} will generate a warning, because a @code{d''} is
429 expected (because @code{b'} to @code{d''} is only a third), but a
430 @code{d'} is found. In the output, the octave is corrected to be
431 a @code{d''} and the next note is calculated relative to
432 @code{d''} instead of @code{d'}.
434 There is also an octave check that produces no visible output.
441 This checks that @var{pitch} (without quotes) yields @var{pitch}
442 (with quotes) in @code{\relative} mode compared to the note given
443 in the @code{\relative} command. If not, a warning is printed,
444 and the octave is corrected. The @var{pitch} is not printed as a
447 In the example below, the first check passes without incident,
448 since the @code{e} (in @code{relative} mode) is within a fifth of
449 @code{a'}. However, the second check produces a warning, since
450 the @code{e} is not within a fifth of @code{b'}. The warning
451 message is printed, and the octave is adjusted so that the
452 following notes are in the correct octave once again.
463 The octave of a note following an octave check is determined with
464 respect to the note preceding it. In the next fragment, the last
465 note is an @code{a'}, above middle C. That means that the
466 @code{\octave} check passes successfully, so the check could be
467 deleted without changing the output of the piece.
469 @lilypond[quote,ragged-right,verbatim,fragment]
479 @unnumberedsubsubsec Transpose
482 @cindex Transposition of pitches
485 A music expression can be transposed with @code{\transpose}. The
489 \transpose @var{from} @var{to} @var{musicexpr}
492 This means that @var{musicexpr} is transposed by the interval
493 between the pitches @var{from} and @var{to}: any note with pitch
494 @code{from} is changed to @code{to}.
496 Consider a piece written in the key of D-major. If this piece is
497 a little too low for its performer, it can be transposed up to
501 \transpose d e @dots{}
504 Consider a part written for violin (a C instrument). If this part
505 is to be played on the A clarinet (for which an A is notated as a
506 C, and which sounds a minor third lower than notated), the
507 following transposition will produce the appropriate part
510 \transpose a c @dots{}
513 @code{\transpose} distinguishes between enharmonic pitches: both
514 @code{\transpose c cis} or @code{\transpose c des} will transpose
515 up half a tone. The first version will print sharps and the
516 second version will print flats
518 @lilypond[quote,ragged-right,verbatim]
519 mus = { \key d \major cis d fis g }
528 @code{\transpose} may also be used to input written notes for a
529 transposing instrument. Pitches are normally entered into
530 LilyPond in C (or @q{concert pitch}), but they may be entered in
531 another key. For example, when entering music for a B-flat
532 trumpet which begins on concert D, one would write
535 \transpose c bes @{ e4 @dots{} @}
538 To print this music in B-flat again (i.e., producing a trumpet
539 part, instead of a concert pitch conductor's score) you would wrap
540 the existing music with another @code{transpose}
543 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
549 Program reference: @internalsref{TransposedMusic}.
552 @lsr{scheme,transpose-pitches-with-minimum-accidentals.ly}.
557 If you want to use both @code{\transpose} and @code{\relative},
558 you must put @code{\transpose} outside of @code{\relative}, since
559 @code{\relative} will have no effect on music that appears inside
563 @node Displaying pitches
564 @subsection Displaying pitches
570 * Instrument transpositions::
574 @unnumberedsubsubsec Clef
578 The clef indicates which lines of the staff correspond to which
579 pitches. The clef is set with the @code{\clef} command
581 @lilypond[quote,ragged-right,fragment,verbatim]
582 { c''2 \clef alto g'2 }
592 @cindex mezzosoprano clef
593 @cindex baritone clef
594 @cindex varbaritone clef
597 Supported clefs include
599 @multitable @columnfractions .33 .66
600 @headitem Clef @tab Position
601 @item @code{treble}, violin, G, G2 @tab
603 @item @code{alto, C} @tab
605 @item @code{tenor} @tab
607 @item @code{bass, F} @tab
609 @item @code{french} @tab
610 G clef on 1st line, so-called French violin clef
611 @item @code{soprano} @tab
613 @item @code{mezzosoprano} @tab
615 @item @code{baritone} @tab
617 @item @code{varbaritone} @tab
619 @item @code{subbass} @tab
621 @item @code{percussion} @tab
623 @item @code{tab} @tab
627 By adding @code{_8} or @code{^8} to the clef name, the clef is
628 transposed one octave down or up, respectively, and @code{_15} and
629 @code{^15} transposes by two octaves. The argument @var{clefname}
630 must be enclosed in quotes when it contains underscores or digits.
633 @cindex choral tenor clef
634 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
641 The command @code{\clef "treble_8"} is equivalent to setting
642 @code{clefGlyph}, @code{clefPosition} (which controls the Y
643 position of the clef), @code{middleCPosition} and
644 @code{clefOctavation}. A clef is printed when any of these
645 properties are changed. The following example shows possibilities
646 when setting properties manually.
648 @lilypond[quote,ragged-right,verbatim]
650 \set Staff.clefGlyph = #"clefs.F"
651 \set Staff.clefPosition = #2
653 \set Staff.clefGlyph = #"clefs.G"
655 \set Staff.clefGlyph = #"clefs.C"
657 \set Staff.clefOctavation = #7
659 \set Staff.clefOctavation = #0
660 \set Staff.clefPosition = #0
664 \set Staff.middleCPosition = #4
672 Program reference: @internalsref{Clef}.
674 This manual: @ref{Ancient clefs}.
678 @unnumberedsubsubsec Key signature
680 @cindex Key signature
683 The key signature indicates the tonality in which a piece is
684 played. It is denoted by a set of alterations (flats or sharps)
685 at the start of the staff.
687 Setting or changing the key signature is done with the @code{\key}
691 @code{\key} @var{pitch} @var{type}
700 @funindex \mixolydian
706 Here, @var{type} should be @code{\major} or @code{\minor} to get
707 @var{pitch}-major or @var{pitch}-minor, respectively. You may
708 also use the standard mode names (also called @q{church modes}):
709 @code{\ionian}, @code{\locrian}, @code{\aeolian},
710 @code{\mixolydian}, @code{\lydian}, @code{\phrygian}, and
713 This command sets the context property @code{Staff.keySignature}.
714 on-standard key signatures can be specified by setting this
715 property directly. See @internalsref{Key_engraver}, and for an
717 @c TODO: LSR snippet 248. leave this here for now -gp
719 @warning{The relationship between accidentals and key signatures can
720 be confusing to new users who think of the note letters as scale
721 steps and not as absolute pitches. The note names that are
722 entered in a music expression are the raw material; key signatures
723 and clefs decide how this raw material is displayed. Thus,
724 unaltered notes may get natural signs depending on the key
725 signature. For more information, see @ref{Accidentals} and
726 @rlearning{Accidentals and key signatures}.}
728 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
737 A natural sign is printed to cancel any previous accidentals.
738 This can be suppressed by setting the
739 @code{Staff.printKeyCancellation} property.
741 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
746 \set Staff.printKeyCancellation = ##f
756 Program reference: @internalsref{KeyCancellation},
757 @internalsref{KeySignature}.
760 @node Ottava brackets
761 @unnumberedsubsubsec Ottava brackets
763 @q{Ottava} brackets introduce an extra transposition of an octave
764 for the staff. They are created by invoking the function
765 @code{set-octavation}
771 @lilypond[quote,ragged-right,verbatim,fragment]
781 The @code{set-octavation} function also takes -1 (for 8va bassa),
782 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
783 Internally the function sets the properties @code{ottavation}
784 (e.g., to @code{"8va"} or @code{"8vb"}) and
785 @code{centralCPosition}. For overriding the text of the bracket,
786 set @code{ottavation} after invoking @code{set-octavation}, i.e.,
788 @lilypond[quote,ragged-right,verbatim]
791 \set Staff.ottavation = #"8"
799 Program reference: @internalsref{OttavaBracket}.
804 @code{set-octavation} will get confused when clef changes happen
805 during an octavation bracket.
808 @node Instrument transpositions
809 @unnumberedsubsubsec Instrument transpositions
811 @cindex transposition, MIDI
812 @cindex transposition, instrument
814 The key of a transposing instrument can also be specified. This
815 applies to many wind instruments, for example, clarinets (B-flat,
816 A, and E-flat), horn (F) and trumpet (B-flat, C, D, and E-flat).
818 The transposition is entered after the keyword
819 @code{\transposition}
822 \transposition bes %% B-flat clarinet
826 This command sets the property @code{instrumentTransposition}.
827 The value of this property is used for MIDI output and quotations.
828 It does not affect how notes are printed in the current staff. To
829 change the printed output, see @ref{Transpose}.
831 The pitch to use for @code{\transposition} should correspond to
832 the real sound heard when a @code{c'} written on the staff is
833 played by the transposing instrument. For example, when entering
834 a score in concert pitch, typically all voices are entered in C,
835 so they should be entered as
848 The command @code{\transposition} should be used when the music is
849 entered from a (transposed) orchestral part. For example, in
850 classical horn parts, the tuning of the instrument is often
851 changed during a piece. When copying the notes from the part, use
852 @code{\transposition}, e.g.,