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 A sharp is formed by adding @code{-is} to the end of a pitch name
90 and a flat is formed by adding @code{-es}. Double sharps and
91 double flats are obtained by adding @code{-isis} or @code{-eses}
94 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
100 These are the Dutch note names. In Dutch, @code{aes} is
101 contracted to @code{as}, but both forms are accepted. Similarly,
102 both @code{es} and @code{ees} are accepted
104 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
108 A natural will cancel the effect of an accidental or key
109 signature. However, naturals are not encoded into the note name
110 syntax with a suffix; a natural pitch is shown as a simple note
113 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
117 The input @code{d e f} is interpreted as @q{print a D-natural,
118 E-natural, and an F-natural,} regardless of the key signature.
119 For more information about the distinction between musical content
120 and the presentation of that content, see @rlearning{Accidentals
123 @lilypond[fragment,quote,ragged-right,verbatim,relative]
132 In accordance with standard typesetting rules, a natural sign is
133 printed before a sharp or flat if a previous accidental needs to
134 be cancelled. To change this behavior, use @code{\set
135 Staff.extraNatural = ##f}
137 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
139 \set Staff.extraNatural = ##f
146 Program reference: @internalsref{LedgerLineSpanner},
147 @internalsref{NoteHead}.
150 @node Cautionary accidentals
151 @unnumberedsubsubsec Cautionary accidentals
153 @cindex accidental, reminder
154 @cindex accidental, cautionary
155 @cindex accidental, parenthesized
156 @cindex reminder accidental
158 @cindex cautionary accidental
159 @cindex parenthesized accidental
162 Normally accidentals are printed automatically, but you may also
163 print them manually. A reminder accidental can be forced by
164 adding an exclamation mark @code{!} after the pitch. A cautionary
165 accidental (i.e., an accidental within parentheses) can be
166 obtained by adding the question mark @samp{?} after the pitch.
167 These extra accidentals can be used to produce natural signs, too.
169 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
170 cis cis cis! cis? c c? c! c
176 The automatic production of accidentals can be tuned in many ways.
177 For more information, see @ref{Automatic accidentals}.
181 @unnumberedsubsubsec Micro tones
183 @cindex quarter tones
184 @cindex semi-flats, semi-sharps
186 Half-flats and half-sharps are formed by adding @code{-eh} and
187 @code{-ih}; the following is a series of Cs with increasing
190 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
191 \set Staff.extraNatural = ##f
195 Micro tones are also exported to the MIDI file.
200 There are no generally accepted standards for denoting
201 three-quarter flats, so LilyPond's symbol does not conform to any
205 @node Note names in other languages
206 @unnumberedsubsubsec Note names in other languages
208 There are predefined sets of note names for various other
209 languages. To use them, include the language specific init file.
210 For example, add @code{\include "english.ly"} to the top of the
211 input file. The available language files and the note names they
214 @cindex note names, other languages
215 @c put the rest of the old table into this new format.
217 @multitable @columnfractions .2 .6 .05 .05 .05 .05
220 @tab sharp @tab flat @tab double sharp @tab double flat
222 @tab c d e f g a bes b
223 @tab -is @tab -es @tab -isis @tab -eses
233 Note Names sharp flat double double
236 nederlands.ly c d e f g a bes b -is -es -isis -eses
237 english.ly c d e f g a bf b -s/-sharp -f/-flat -ss/-x/ -ff/
238 -sharpsharp -flatflat
239 deutsch.ly c d e f g a b h -is -es -isis -eses
240 norsk.ly c d e f g a b h -iss/-is -ess/-es -ississ/-isis -essess/-eses
241 svenska.ly c d e f g a b h -iss -ess -ississ -essess
242 italiano.ly do re mi fa sol la sib si -d -b -dd -bb
243 catalan.ly do re mi fa sol la sib si -d/-s -b -dd/-ss -bb
244 espanol.ly do re mi fa sol la sib si -s -b -ss -bb
249 Note that in Dutch, German, Norwegian, and Swedish, the flat
250 alterations of @samp{a} like for example @code{aes} and
251 @code{aeses} are usually contracted to @code{as} and @code{ases}
252 (or more commonly @code{asas}). Sometimes only these contracted
253 names are defined in the corresponding language files (this also
254 applies to the suffixes for quartertones below).
257 Some music uses microtones whose alterations are fractions of a
258 @q{regular} sharp or flat. The note names for quartertones defined
259 in the various language files are listed in the following table.
260 Here the prefixes @q{semi-} and @q{sesqui-} mean @q{half} and
261 @q{one and a half}, respectively. For Norwegian, Swedish, Catalan
262 and Spanish no special names have been defined yet.
264 @c What about Turkish Maquam music and similar microtonal systems?
266 @c Note that the term "three-quarter-sharp/-flat" used in lilypond's source code
267 @c is actually misleading since the alteration is in fact one and a half
268 @c of a regular sharp/flat. Whence the naming "sesqui-sharp/-flat" used below.
271 Note Names semi- semi- sesqui- sesqui-
272 sharp flat sharp flat
274 nederlands.ly c d e f g a bes b -ih -eh -isih -eseh
275 english.ly c d e f g a bf b -qs -qf -tqs -tqf
276 deutsch.ly c d e f g a b h -ih -eh -isih -eseh
277 norsk.ly c d e f g a b h
278 svenska.ly c d e f g a b h
279 italiano.ly do re mi fa sol la sib si -sd -sb -dsd -bsb
280 catalan.ly do re mi fa sol la sib si
281 espanol.ly do re mi fa sol la sib si
285 @node Changing multiple pitches
286 @subsection Changing multiple pitches
294 @node Relative octaves
295 @unnumberedsubsubsec Relative octaves
298 @cindex Relative octave specification
301 Octaves are specified by adding @code{'} and @code{,} to pitch
302 names. When you copy existing music, it is easy to accidentally
303 put a pitch in the wrong octave and hard to find such an error.
304 The relative octave mode prevents these errors by making the
305 mistakes much larger: a single error puts the rest of the piece
309 \relative @var{startpitch} @var{musicexpr}
316 \relative @var{musicexpr}
320 @code{c'} is used as the default if no starting pitch is defined.
322 The octave of notes that appear in @var{musicexpr} are calculated
323 as follows: if no octave changing marks are used, the basic
324 interval between this and the last note is always taken to be a
325 fourth or less. This distance is determined without regarding
326 alterations; a @code{fisis} following a @code{ceses} will be put
327 above the @code{ceses}. In other words, a doubly-augmented fourth
328 is considered a smaller interval than a diminished fifth, even
329 though the doubly-augmented fourth spans seven semitones while the
330 diminished fifth only spans six semitones.
332 The octave changing marks @code{'} and @code{,} can be added to
333 raise or lower the pitch by an extra octave. Upon entering
334 relative mode, an absolute starting pitch can be specified that
335 will act as the predecessor of the first note of @var{musicexpr}.
336 If no starting pitch is specified, then middle C is used as a
339 Here is the relative mode shown in action
340 @lilypond[quote,fragment,ragged-right,verbatim]
346 Octave changing marks are used for intervals greater than a fourth
348 @lilypond[quote,ragged-right,fragment,verbatim]
354 If the preceding item is a chord, the first note of the chord is
355 used to determine the first note of the next chord
357 @lilypond[quote,ragged-right,fragment,verbatim]
365 The pitch after @code{\relative} contains a note name.
367 The relative conversion will not affect @code{\transpose},
368 @code{\chordmode} or @code{\relative} sections in its argument.
369 To use relative within transposed music, an additional
370 @code{\relative} must be placed inside @code{\transpose}.
374 @unnumberedsubsubsec Octave check
378 Octave checks make octave errors easier to correct: a note may be
379 followed by @code{=}@var{quotes} which indicates what its absolute
380 octave should be. In the following example,
383 \relative c'' @{ c='' b=' d,='' @}
387 the @code{d} will generate a warning, because a @code{d''} is
388 expected (because @code{b'} to @code{d''} is only a third), but a
389 @code{d'} is found. In the output, the octave is corrected to be
390 a @code{d''} and the next note is calculated relative to
391 @code{d''} instead of @code{d'}.
393 There is also an octave check that produces no visible output.
400 This checks that @var{pitch} (without quotes) yields @var{pitch}
401 (with quotes) in @code{\relative} mode compared to the note given
402 in the @code{\relative} command. If not, a warning is printed,
403 and the octave is corrected. The @var{pitch} is not printed as a
406 In the example below, the first check passes without incident,
407 since the @code{e} (in @code{relative} mode) is within a fifth of
408 @code{a'}. However, the second check produces a warning, since
409 the @code{e} is not within a fifth of @code{b'}. The warning
410 message is printed, and the octave is adjusted so that the
411 following notes are in the correct octave once again.
422 The octave of a note following an octave check is determined with
423 respect to the note preceding it. In the next fragment, the last
424 note is an @code{a'}, above middle C. That means that the
425 @code{\octave} check passes successfully, so the check could be
426 deleted without changing the output of the piece.
428 @lilypond[quote,ragged-right,verbatim,fragment]
438 @unnumberedsubsubsec Transpose
441 @cindex Transposition of pitches
444 A music expression can be transposed with @code{\transpose}. The
448 \transpose @var{from} @var{to} @var{musicexpr}
451 This means that @var{musicexpr} is transposed by the interval
452 between the pitches @var{from} and @var{to}: any note with pitch
453 @code{from} is changed to @code{to}.
455 For example, consider a piece written in the key of D-major. If
456 this piece is a little too low for its performer, it can be
457 transposed up to E-major with
460 \transpose d e @dots{}
463 Consider a part written for violin (a C instrument). If this part
464 is to be played on the A clarinet (for which an A is notated as a
465 C, and which sounds a minor third lower than notated), the
466 following transposition will produce the appropriate part
469 \transpose a c @dots{}
472 @code{\transpose} distinguishes between enharmonic pitches: both
473 @code{\transpose c cis} or @code{\transpose c des} will transpose
474 up half a tone. The first version will print sharps and the
475 second version will print flats
477 @lilypond[quote,ragged-right,verbatim]
478 mus = { \key d \major cis d fis g }
487 @code{\transpose} may also be used to input written notes for a
488 transposing instrument. Pitches are normally entered into
489 LilyPond in C (or @q{concert pitch}), but they may be entered in
490 another key. For example, when entering music for a B-flat
491 trumpet which begins on concert D, one would write
494 \transpose c bes @{ e4 @dots{} @}
497 To print this music in B-flat again (i.e., producing a trumpet
498 part, instead of a concert pitch conductor's score) you would wrap
499 the existing music with another @code{transpose}
502 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
508 Program reference: @internalsref{TransposedMusic}.
511 @lsr{scheme,transpose-pitches-with-minimum-accidentals.ly}.
516 If you want to use both @code{\transpose} and @code{\relative},
517 you must put @code{\transpose} outside of @code{\relative}, since
518 @code{\relative} will have no effect on music that appears inside
522 @node Displaying pitches
523 @subsection Displaying pitches
529 * Instrument transpositions::
533 @unnumberedsubsubsec Clef
537 The clef indicates which lines of the staff correspond to which
538 pitches. The clef is set with the @code{\clef} command
540 @lilypond[quote,ragged-right,fragment,verbatim]
541 { c''2 \clef alto g'2 }
551 @cindex mezzosoprano clef
552 @cindex baritone clef
553 @cindex varbaritone clef
556 Supported clefs include
558 @multitable @columnfractions .33 .66
559 @headitem Clef @tab Position
560 @item @code{treble}, violin, G, G2 @tab
562 @item @code{alto, C} @tab
564 @item @code{tenor} @tab
566 @item @code{bass, F} @tab
568 @item @code{french} @tab
569 G clef on 1st line, so-called French violin clef
570 @item @code{soprano} @tab
572 @item @code{mezzosoprano} @tab
574 @item @code{baritone} @tab
576 @item @code{varbaritone} @tab
578 @item @code{subbass} @tab
580 @item @code{percussion} @tab
582 @item @code{tab} @tab
586 By adding @code{_8} or @code{^8} to the clef name, the clef is
587 transposed one octave down or up, respectively, and @code{_15} and
588 @code{^15} transposes by two octaves. The argument @var{clefname}
589 must be enclosed in quotes when it contains underscores or digits.
592 @cindex choral tenor clef
593 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
600 The command @code{\clef "treble_8"} is equivalent to setting
601 @code{clefGlyph}, @code{clefPosition} (which controls the Y
602 position of the clef), @code{middleCPosition} and
603 @code{clefOctavation}. A clef is printed when any of these
604 properties are changed. The following example shows possibilities
605 when setting properties manually.
607 @lilypond[quote,ragged-right,verbatim]
609 \set Staff.clefGlyph = #"clefs.F"
610 \set Staff.clefPosition = #2
612 \set Staff.clefGlyph = #"clefs.G"
614 \set Staff.clefGlyph = #"clefs.C"
616 \set Staff.clefOctavation = #7
618 \set Staff.clefOctavation = #0
619 \set Staff.clefPosition = #0
623 \set Staff.middleCPosition = #4
631 Manual: @ref{Grace notes}.
633 Program reference: @internalsref{Clef}.
637 @unnumberedsubsubsec Key signature
639 @cindex Key signature
642 The key signature indicates the tonality in which a piece is
643 played. It is denoted by a set of alterations (flats or sharps)
644 at the start of the staff.
646 Setting or changing the key signature is done with the @code{\key}
650 @code{\key} @var{pitch} @var{type}
659 @funindex \mixolydian
665 Here, @var{type} should be @code{\major} or @code{\minor} to get
666 @var{pitch}-major or @var{pitch}-minor, respectively. You may
667 also use the standard mode names (also called @q{church modes}):
668 @code{\ionian}, @code{\locrian}, @code{\aeolian},
669 @code{\mixolydian}, @code{\lydian}, @code{\phrygian}, and
672 This command sets the context property @code{Staff.keySignature}.
673 Non-standard key signatures can be specified by setting this
676 Accidentals and key signatures often confuse new users, because
677 unaltered notes get natural signs depending on the key signature.
678 For more information, see @ref{Accidentals}, or
679 @rlearning{Accidentals and key signatures}.
681 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
690 A natural sign is printed to cancel any previous accidentals.
691 This can be suppressed by setting the
692 @code{Staff.printKeyCancellation} property.
694 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
699 \set Staff.printKeyCancellation = ##f
709 Program reference: @internalsref{KeyCancellation},
710 @internalsref{KeySignature}.
713 @node Ottava brackets
714 @unnumberedsubsubsec Ottava brackets
716 @q{Ottava} brackets introduce an extra transposition of an octave
717 for the staff. They are created by invoking the function
718 @code{set-octavation}
724 @lilypond[quote,ragged-right,verbatim,fragment]
734 The @code{set-octavation} function also takes -1 (for 8va bassa),
735 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
736 Internally the function sets the properties @code{ottavation}
737 (e.g., to @code{"8va"} or @code{"8vb"}) and
738 @code{centralCPosition}. For overriding the text of the bracket,
739 set @code{ottavation} after invoking @code{set-octavation}, i.e.,
741 @lilypond[quote,ragged-right,verbatim]
744 \set Staff.ottavation = #"8"
752 Program reference: @internalsref{OttavaBracket}.
757 @code{set-octavation} will get confused when clef changes happen
758 during an octavation bracket.
761 @node Instrument transpositions
762 @unnumberedsubsubsec Instrument transpositions
764 @cindex transposition, MIDI
765 @cindex transposition, instrument
767 The key of a transposing instrument can also be specified. This
768 applies to many wind instruments, for example, clarinets (B-flat,
769 A, and E-flat), horn (F) and trumpet (B-flat, C, D, and E-flat).
771 The transposition is entered after the keyword
772 @code{\transposition}
775 \transposition bes %% B-flat clarinet
779 This command sets the property @code{instrumentTransposition}.
780 The value of this property is used for MIDI output and quotations.
781 It does not affect how notes are printed in the current staff. To
782 change the printed output, see @ref{Transpose}.
784 The pitch to use for @code{\transposition} should correspond to
785 the real sound heard when a @code{c'} written on the staff is
786 played by the transposing instrument. For example, when entering
787 a score in concert pitch, typically all voices are entered in C,
788 so they should be entered as
801 The command @code{\transposition} should be used when the music is
802 entered from a (transposed) orchestral part. For example, in
803 classical horn parts, the tuning of the instrument is often
804 changed during a piece. When copying the notes from the part, use
805 @code{\transposition}, e.g.,