]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/pitches.itely
caa1d3fc72808d6d68cc4b96bc71de3f5238a83a
[lilypond.git] / Documentation / user / pitches.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  See TRANSLATION for details.
7 @end ignore
8
9
10 @node Pitches
11 @section Pitches
12
13 This section discusses how to specify the pitch of notes.
14
15 @lilypondfile[ragged-right,line-width=16\cm,staffsize=16,quote]
16 {pitches-headword.ly}
17
18 @menu
19 * Writing pitches::             
20 * Changing multiple pitches::   
21 * Displaying pitches::          
22 @end menu
23
24
25 @node Writing pitches
26 @subsection Writing pitches
27
28 Into text.
29
30 @menu
31 * Normal pitches::              
32 * Accidentals::                 
33 * Cautionary accidentals::      
34 * Micro tones::                 
35 * Note names in other languages::  
36 @end menu
37
38
39 @node Normal pitches
40 @unnumberedsubsubsec Normal pitches
41
42 @cindex Pitch names
43 @cindex pitches
44
45 A pitch name is specified using lowercase letters @code{a} through
46 @code{g}.  An ascending C-major scale is engraved with
47
48 @lilypond[quote,fragment,verbatim,ragged-right]
49 \clef bass
50 c d e f g a b c'
51 @end lilypond
52
53 The note name @code{c} is engraved one octave below middle C.
54
55 @lilypond[quote,fragment,verbatim,ragged-right]
56 \clef treble
57 c1
58 \clef bass
59 c1
60 @end lilypond
61
62 @funindex '
63 @funindex ,
64
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.
69
70 @lilypond[quote,ragged-right,fragment,verbatim]
71 \clef treble
72 c' c'' e' g d'' d' d c
73 \clef bass
74 c, c,, e, g d,, d, d c
75 @end lilypond
76
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
80 octaves}.
81
82
83 @node Accidentals
84 @unnumberedsubsubsec Accidentals
85
86 @cindex note names, Dutch
87 @cindex note names, default
88
89 @c following paragraph changed to match Tutorial and Accidental
90 @c and Key Signature pages.  
91
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}.}
99
100 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
101 a2 ais a aes
102 a2 aisis a aeses
103 @end lilypond
104
105 @noindent
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
109
110 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
111 a2 as e es
112 @end lilypond
113
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
117 name
118
119 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
120 a4 aes a2
121 @end lilypond
122
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
127 and key signatures}.
128
129 @lilypond[fragment,quote,ragged-right,verbatim,relative]
130 \key d \major
131 d e f g
132 d e fis g
133 @end lilypond
134
135
136 @commonprop
137
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}
142
143 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
144 ceses4 ces cis c
145 \set Staff.extraNatural = ##f
146 ceses4 ces cis c
147 @end lilypond
148
149
150 @seealso
151
152 Program reference: @internalsref{LedgerLineSpanner},
153 @internalsref{NoteHead}.
154
155
156 @node Cautionary accidentals
157 @unnumberedsubsubsec Cautionary accidentals
158
159 @cindex accidental, reminder
160 @cindex accidental, cautionary
161 @cindex accidental, parenthesized
162 @cindex reminder accidental
163 @funindex ?
164 @cindex cautionary accidental
165 @cindex parenthesized accidental
166 @funindex !
167
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.
174
175 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
176 cis cis cis! cis? c c? c! c
177 @end lilypond
178
179
180 @seealso
181
182 The automatic production of accidentals can be tuned in many ways.
183 For more information, see @ref{Automatic accidentals}.
184
185
186 @node Micro tones
187 @unnumberedsubsubsec Micro tones
188
189 @cindex quarter tones
190 @cindex semi-flats, semi-sharps
191
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
194 pitches
195
196 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
197 \set Staff.extraNatural = ##f
198 ceseh ceh cih cisih
199 @end lilypond
200
201 Micro tones are also exported to the MIDI file.
202
203
204 @refbugs
205
206 There are no generally accepted standards for denoting
207 three-quarter flats, so LilyPond's symbol does not conform to any
208 standard.
209
210
211 @node Note names in other languages
212 @unnumberedsubsubsec Note names in other languages
213
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
218 define are
219
220 @cindex note names, other languages
221 @c  put the rest of the old table into this new format.
222 @example
223 @multitable @columnfractions .2 .6 .05 .05 .05 .05
224 @headitem Language
225   @tab Note names
226   @tab sharp @tab flat @tab double sharp @tab double flat
227 @item netherlands.ly
228   @tab c d e f g a bes b
229   @tab -is @tab -es @tab -isis @tab -eses
230 @c new stuff here:
231
232
233 @end multitable
234 @end example
235
236 @c old table
237 @ignore
238 @example
239                         Note Names               sharp       flat     double        double
240                                                                        sharp        flat
241
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
251 @end example
252 @end ignore
253
254 @noindent
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).
261
262 @noindent
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.
269
270 @c What about Turkish Maquam music and similar microtonal systems?
271 @c
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.
275
276 @example
277                         Note Names             semi-   semi-  sesqui-  sesqui-
278                                                sharp   flat    sharp    flat
279
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  
288 @end example
289
290
291 @node Changing multiple pitches
292 @subsection Changing multiple pitches
293
294 @menu
295 * Relative octaves::            
296 * Octave check::                
297 * Transpose::                   
298 @end menu
299
300 @node Relative octaves
301 @unnumberedsubsubsec Relative octaves
302
303 @cindex Relative
304 @cindex Relative octave specification
305 @funindex \relative
306
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
312 off by one octave
313
314 @example
315 \relative @var{startpitch} @var{musicexpr}
316 @end example
317
318 @noindent
319 or
320
321 @example
322 \relative @var{musicexpr}
323 @end example
324
325 @noindent
326 @code{c'} is used as the default if no starting pitch is defined.
327
328 The octave of notes that appear in @var{musicexpr} are calculated
329 as follows:
330
331 @itemize
332 @item
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.
335
336 @item
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.
343
344 @item
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
347 interval.
348
349 @item
350 Multiple octave changing marks can be used.  @code{''} will raise
351 the pitch by two octaves.
352
353 @item 
354 The pitch of the first note is relative to @code{\relative
355 @var{startpitch} }.  
356
357 @item
358 If you do not specify @var{startpitch} then middle C is used.
359
360 @end itemize 
361
362 Here is the relative mode shown in action
363
364 @lilypond[quote,fragment,ragged-right,verbatim]
365 \relative c'' {
366   b c d c b c bes a
367 }
368 @end lilypond
369
370 Octave changing marks are used for intervals greater than a fourth
371
372 @lilypond[quote,ragged-right,fragment,verbatim]
373 \relative c'' {
374   c g c f, c' a, e''
375 }
376 @end lilypond
377
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
380
381 @lilypond[quote,ragged-right,fragment,verbatim]
382 \relative c' {
383   c <c e g>
384   <c' e g>
385   <c, e' g>
386 }
387 @end lilypond
388
389 The pitch after @code{\relative} contains a note name.
390
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}.
395
396
397 @node Octave check
398 @unnumberedsubsubsec Octave check
399
400 @cindex Octave check
401
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,
405
406 @example
407 \relative c'' @{ c='' b=' d,='' @}
408 @end example
409
410 @noindent
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'}.
416
417 There is also an octave check that produces no visible output.
418 The syntax
419
420 @example
421 \octave @var{pitch}
422 @end example
423
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
428 note.
429
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.
436
437 @example
438 \relative c' @{
439   e
440   \octave a'
441   \octave b'
442 @}
443 @end example
444
445
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.
451
452 @lilypond[quote,ragged-right,verbatim,fragment]
453 \relative c' {
454   e
455   \octave b
456   a
457 }
458 @end lilypond
459
460
461 @node Transpose
462 @unnumberedsubsubsec Transpose
463
464 @cindex Transpose
465 @cindex Transposition of pitches
466 @funindex \transpose
467
468 A music expression can be transposed with @code{\transpose}.  The
469 syntax is
470
471 @example
472 \transpose @var{from} @var{to} @var{musicexpr}
473 @end example
474
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}.
478
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
481 E-major with
482
483 @example
484 \transpose d e @dots{}
485 @end example
486
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
491
492 @example
493 \transpose a c @dots{}
494 @end example
495
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
500
501 @lilypond[quote,ragged-right,verbatim]
502 mus = { \key d \major cis d fis g }
503 \new Staff {
504   \clef "F" \mus
505   \clef "G"
506   \transpose c g' \mus
507   \transpose c f' \mus
508 }
509 @end lilypond
510
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
516
517 @example
518 \transpose c bes @{ e4 @dots{} @}
519 @end example
520
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}
524
525 @example
526 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
527 @end example
528
529
530 @seealso
531
532 Program reference: @internalsref{TransposedMusic}.
533
534 Example:
535 @lsr{scheme,transpose-pitches-with-minimum-accidentals.ly}.
536
537
538 @refbugs
539
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
543 a @code{\transpose}.
544
545
546 @node Displaying pitches
547 @subsection Displaying pitches
548
549 @menu
550 * Clef::                        
551 * Key signature::               
552 * Ottava brackets::             
553 * Instrument transpositions::   
554 @end menu
555
556 @node Clef
557 @unnumberedsubsubsec Clef
558
559 @funindex \clef
560
561 The clef indicates which lines of the staff correspond to which
562 pitches.  The clef is set with the @code{\clef} command
563
564 @lilypond[quote,ragged-right,fragment,verbatim]
565 { c''2 \clef alto g'2 }
566 @end lilypond
567
568 @cindex treble clef
569 @cindex violin clef
570 @cindex alto clef
571 @cindex tenor clef
572 @cindex bass clef
573 @cindex french clef
574 @cindex soprano clef
575 @cindex mezzosoprano clef
576 @cindex baritone clef
577 @cindex varbaritone clef
578 @cindex subbass clef
579
580 Supported clefs include
581
582 @multitable @columnfractions .33 .66
583 @headitem Clef @tab Position
584 @item @code{treble}, violin, G, G2 @tab
585 G clef on 2nd line
586 @item @code{alto, C} @tab
587 C clef on 3rd line
588 @item @code{tenor} @tab
589 C clef on 4th line.
590 @item @code{bass, F} @tab
591 F clef on 4th line
592 @item @code{french} @tab
593 G clef on 1st line, so-called French violin clef
594 @item @code{soprano} @tab
595 C clef on 1st line
596 @item @code{mezzosoprano} @tab
597 C clef on 2nd line
598 @item @code{baritone} @tab
599 C clef on 5th line
600 @item @code{varbaritone} @tab
601 F clef on 3rd line
602 @item @code{subbass} @tab
603 F clef on 5th line
604 @item @code{percussion} @tab
605 percussion clef
606 @item @code{tab} @tab
607 tablature clef
608 @end multitable
609
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.
614 For example,
615
616 @cindex choral tenor clef
617 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
618 \clef "G_8" c4
619 @end lilypond
620
621
622 @commonprop
623
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.
630
631 @lilypond[quote,ragged-right,verbatim]
632 {
633   \set Staff.clefGlyph = #"clefs.F"
634   \set Staff.clefPosition = #2
635   c'4
636   \set Staff.clefGlyph = #"clefs.G"
637   c'4
638   \set Staff.clefGlyph = #"clefs.C"
639   c'4
640   \set Staff.clefOctavation = #7
641   c'4
642   \set Staff.clefOctavation = #0
643   \set Staff.clefPosition = #0
644   c'4
645   \clef "bass"
646   c'4
647   \set Staff.middleCPosition = #4
648   c'4
649 }
650 @end lilypond
651
652
653 @seealso
654
655 Manual: @ref{Grace notes}.
656
657 Program reference: @internalsref{Clef}.
658
659
660 @node Key signature
661 @unnumberedsubsubsec Key signature
662
663 @cindex Key signature
664 @funindex \key
665
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.
669
670 Setting or changing the key signature is done with the @code{\key}
671 command
672
673 @example
674 @code{\key} @var{pitch} @var{type}
675 @end example
676
677 @funindex \minor
678 @funindex \major
679 @funindex \minor
680 @funindex \ionian
681 @funindex \locrian
682 @funindex \aeolian
683 @funindex \mixolydian
684 @funindex \lydian
685 @funindex \phrygian
686 @funindex \dorian
687 @cindex church modes
688
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
694 @code{\dorian}.
695
696 This command sets the context property @code{Staff.keySignature}.
697 Non-standard key signatures can be specified by setting this
698 property directly.
699
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}.
704
705 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
706 \key g \major
707 f1
708 fis
709 @end lilypond
710
711
712 @commonprop
713
714 A natural sign is printed to cancel any previous accidentals.
715 This can be suppressed by setting the
716 @code{Staff.printKeyCancellation} property.
717
718 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
719 \key d \major
720 a b cis d
721 \key g \minor
722 a bes c d
723 \set Staff.printKeyCancellation = ##f
724 \key d \major
725 a b cis d
726 \key g \minor
727 a bes c d
728 @end lilypond
729
730
731 @seealso
732
733 Program reference: @internalsref{KeyCancellation},
734 @internalsref{KeySignature}.
735
736
737 @node Ottava brackets
738 @unnumberedsubsubsec Ottava brackets
739
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}
743
744 @cindex ottava
745 @cindex 15ma
746 @cindex octavation
747
748 @lilypond[quote,ragged-right,verbatim,fragment]
749 \relative c''' {
750   a2 b
751   #(set-octavation 1)
752   a b
753   #(set-octavation 0)
754   a b
755 }
756 @end lilypond
757
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.,
764
765 @lilypond[quote,ragged-right,verbatim]
766 {
767   #(set-octavation 1)
768   \set Staff.ottavation = #"8"
769   c'''
770 }
771 @end lilypond
772
773
774 @seealso
775
776 Program reference: @internalsref{OttavaBracket}.
777
778
779 @refbugs
780
781 @code{set-octavation} will get confused when clef changes happen
782 during an octavation bracket.
783
784
785 @node Instrument transpositions
786 @unnumberedsubsubsec Instrument transpositions
787
788 @cindex transposition, MIDI
789 @cindex transposition, instrument
790
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).
794
795 The transposition is entered after the keyword
796 @code{\transposition}
797
798 @example
799 \transposition bes   %% B-flat clarinet
800 @end example
801
802 @noindent
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}.
807
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
813
814 @example
815 clarinet = @{
816   \transposition c'
817   ...
818 @}
819 saxophone = @{
820   \transposition c'
821   ...
822 @}
823 @end example
824
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.,
830
831 @example
832 \transposition d'
833 c'4^"in D"
834 ...
835 \transposition g'
836 c'4^"in G"
837 ...
838 @end example
839