]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/pitches.itely
306d6d44da2dd7e665943d507c9bb42a123c92a2
[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 Intro text.
29
30 @menu
31 * Normal pitches::              
32 * Relative octaves::            
33 * Accidentals::                 
34 * Note names in other languages::  
35 @end menu
36
37
38 @node Normal pitches
39 @unnumberedsubsubsec Normal pitches
40
41 @cindex Pitch names
42 @cindex pitches
43
44 A pitch name is specified using lowercase letters @code{a} through
45 @code{g}.  An ascending C-major scale is engraved with
46
47 @lilypond[quote,fragment,verbatim,ragged-right]
48 \clef bass
49 c d e f g a b c'
50 @end lilypond
51
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.
56
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.
60
61 @lilypond[quote,fragment,verbatim,ragged-right]
62 \clef treble
63 c1
64 \clef bass
65 c1
66 @end lilypond
67
68 @funindex '
69 @funindex ,
70
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
75 pitch by an octave.
76
77 @lilypond[quote,ragged-right,fragment,verbatim]
78 \clef treble
79 c' c'' e' g d'' d' d c
80 \clef bass
81 c, c,, e, g d,, d, d c
82 @end lilypond
83
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
87 octaves}.
88
89 @seealso
90
91 Snippets: @lsrdir{pitch}
92
93
94
95 @node Relative octaves
96 @unnumberedsubsubsec Relative octaves
97
98 @cindex Relative
99 @cindex Relative octave specification
100 @funindex \relative
101
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.
109
110 @example
111 \relative @var{startpitch} @var{musicexpr}
112 @end example
113
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:
117
118 @itemize
119 @item 
120 The pitch of the first note is relative to @code{\relative
121 @var{startpitch} }.  
122
123 @item
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
126 or less.
127
128 @item
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
135 semitones.
136
137 @item
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
140 interval.
141
142 @item
143 Multiple octave changing marks can be used.  @code{''} will raise
144 the pitch by two octaves.
145
146 @end itemize 
147
148 Here is the relative mode shown in action:
149
150 @lilypond[quote,fragment,ragged-right,verbatim]
151 \relative c'' {
152   b c d c b c bes a
153 }
154 @end lilypond
155
156 Octave changing marks are used for intervals greater than a
157 fourth:
158
159 @lilypond[quote,ragged-right,fragment,verbatim]
160 \relative c'' {
161   c g c f, c' a, e''
162 }
163 @end lilypond
164
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:
168
169 @lilypond[quote,ragged-right,fragment,verbatim]
170 \relative c' {
171   c <c e g>
172   <c' e g>
173   <c, e' g>
174 }
175 @end lilypond
176
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. 
180
181
182 @seealso
183
184 Snippets: @lsrdir{pitch}
185
186
187 @refbugs
188
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}.
193
194 @c DEPRECATED
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.
198
199
200
201
202 @node Accidentals
203 @unnumberedsubsubsec Accidentals
204
205 @cindex note names, Dutch
206 @cindex note names, default
207
208 @c following paragraph changed to match Tutorial and Accidental
209 @c and Key Signature pages.  
210
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
217 in other languages}.
218
219 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
220 a2 ais a aes
221 a2 aisis a aeses
222 @end lilypond
223
224 @noindent
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
228
229 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
230 a2 as e es
231 @end lilypond
232
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
236 name
237
238 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
239 a4 aes a2
240 @end lilypond
241
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
246 and key signatures}.
247
248 @lilypond[fragment,quote,ragged-right,verbatim,relative]
249 \key d \major
250 d e f g
251 d e fis g
252 @end lilypond
253
254
255
256 @cindex accidental, reminder
257 @cindex accidental, cautionary
258 @cindex accidental, parenthesized
259 @cindex reminder accidental
260 @funindex ?
261 @cindex cautionary accidental
262 @cindex parenthesized accidental
263 @funindex !
264
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.
271
272 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
273 cis cis cis! cis? c c? c! c
274 @end lilypond
275
276
277 @cindex quarter tones
278 @cindex semi-flats, semi-sharps
279
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
282 pitches
283
284 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
285 \set Staff.extraNatural = ##f
286 ceseh ceh cih cisih
287 @end lilypond
288
289 Micro tones are also exported to the MIDI file.
290
291
292 @commonprop
293
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}
298
299 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
300 ceses4 ces cis c
301 \set Staff.extraNatural = ##f
302 ceses4 ces cis c
303 @end lilypond
304
305
306 @seealso
307
308 The automatic production of accidentals can be tuned in many ways.
309 For more information, see @ref{Automatic accidentals}.
310
311 Program reference: @internalsref{LedgerLineSpanner},
312 @internalsref{NoteHead}.
313
314
315 @refbugs
316
317 There are no generally accepted standards for denoting
318 three-quarter flats, so LilyPond's symbol does not conform to any
319 standard.
320
321
322
323 @node Note names in other languages
324 @unnumberedsubsubsec Note names in other languages
325
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
330 define are
331
332 @cindex note names, other languages
333
334 @example
335 @multitable @columnfractions .2 .6 .05 .05 .05 .05
336 @headitem Language
337   @tab Note names
338   @tab sharp @tab flat @tab double sharp @tab double flat
339 @item netherlands.ly
340   @tab c d e f g a bes b
341   @tab -is @tab -es @tab -isis @tab -eses
342 @item english.ly
343   @tab c d e f g a bf b 
344   @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
345     @tab -ff/-flatflat
346 @item deutsch.ly
347   @tab c d e f g a b h 
348   @tab -is @tab -es @tab -isis @tab -eses
349 @item norsk.ly
350   @tab c d e f g a b h 
351   @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
352     @tab -essess/-eses
353 @item svenska.ly
354   @tab c d e f g a b h 
355   @tab -iss @tab -ess @tab -ississ @tab -essess
356 @item italiano.ly
357   @tab do re mi fa sol la sib si 
358   @tab -d @tab -b @tab -dd @tab -bb
359 @item catalan.ly
360   @tab do re mi fa sol la sib si 
361   @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
362 @item espanol.ly
363   @tab do re mi fa sol la sib si 
364   @tab -s @tab -b @tab -ss @tab -bb
365 @end multitable
366 @end example
367
368 @noindent
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).
375
376 @noindent
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.
383
384
385 @c What about Turkish Maquam music and similar microtonal systems?
386 @c
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.
390
391 @example
392                         Note Names             semi-   semi-  sesqui-  sesqui-
393                                                sharp   flat    sharp    flat
394
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  
403 @end example
404
405
406 @node Changing multiple pitches
407 @subsection Changing multiple pitches
408
409 @menu
410 * Octave check::                
411 * Transpose::                   
412 @end menu
413
414 @node Octave check
415 @unnumberedsubsubsec Octave check
416
417 @cindex Octave check
418
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,
422
423 @example
424 \relative c'' @{ c='' b=' d,='' @}
425 @end example
426
427 @noindent
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'}.
433
434 There is also an octave check that produces no visible output.
435 The syntax
436
437 @example
438 \octave @var{pitch}
439 @end example
440
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
445 note.
446
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.
453
454 @example
455 \relative c' @{
456   e
457   \octave a'
458   \octave b'
459 @}
460 @end example
461
462
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.
468
469 @lilypond[quote,ragged-right,verbatim,fragment]
470 \relative c' {
471   e
472   \octave b
473   a
474 }
475 @end lilypond
476
477
478 @node Transpose
479 @unnumberedsubsubsec Transpose
480
481 @cindex Transpose
482 @cindex Transposition of pitches
483 @funindex \transpose
484
485 A music expression can be transposed with @code{\transpose}.  The
486 syntax is
487
488 @example
489 \transpose @var{from} @var{to} @var{musicexpr}
490 @end example
491
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}.
495
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
498 E-major with
499
500 @example
501 \transpose d e @dots{}
502 @end example
503
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
508
509 @example
510 \transpose a c @dots{}
511 @end example
512
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
517
518 @lilypond[quote,ragged-right,verbatim]
519 mus = { \key d \major cis d fis g }
520 \new Staff {
521   \clef "F" \mus
522   \clef "G"
523   \transpose c g' \mus
524   \transpose c f' \mus
525 }
526 @end lilypond
527
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
533
534 @example
535 \transpose c bes @{ e4 @dots{} @}
536 @end example
537
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}
541
542 @example
543 \transpose bes c @{ \transpose c bes @{ e4 @dots{} @} @}
544 @end example
545
546
547 @seealso
548
549 Program reference: @internalsref{TransposedMusic}.
550
551 Example:
552 @lsr{scheme,transpose-pitches-with-minimum-accidentals.ly}.
553
554
555 @refbugs
556
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
560 a @code{\transpose}.
561
562
563 @node Displaying pitches
564 @subsection Displaying pitches
565
566 @menu
567 * Clef::                        
568 * Key signature::               
569 * Ottava brackets::             
570 * Instrument transpositions::   
571 @end menu
572
573 @node Clef
574 @unnumberedsubsubsec Clef
575
576 @funindex \clef
577
578 The clef indicates which lines of the staff correspond to which
579 pitches.  The clef is set with the @code{\clef} command
580
581 @lilypond[quote,ragged-right,fragment,verbatim]
582 { c''2 \clef alto g'2 }
583 @end lilypond
584
585 @cindex treble clef
586 @cindex violin clef
587 @cindex alto clef
588 @cindex tenor clef
589 @cindex bass clef
590 @cindex french clef
591 @cindex soprano clef
592 @cindex mezzosoprano clef
593 @cindex baritone clef
594 @cindex varbaritone clef
595 @cindex subbass clef
596
597 Supported clefs include
598
599 @multitable @columnfractions .33 .66
600 @headitem Clef @tab Position
601 @item @code{treble}, violin, G, G2 @tab
602 G clef on 2nd line
603 @item @code{alto, C} @tab
604 C clef on 3rd line
605 @item @code{tenor} @tab
606 C clef on 4th line.
607 @item @code{bass, F} @tab
608 F clef on 4th line
609 @item @code{french} @tab
610 G clef on 1st line, so-called French violin clef
611 @item @code{soprano} @tab
612 C clef on 1st line
613 @item @code{mezzosoprano} @tab
614 C clef on 2nd line
615 @item @code{baritone} @tab
616 C clef on 5th line
617 @item @code{varbaritone} @tab
618 F clef on 3rd line
619 @item @code{subbass} @tab
620 F clef on 5th line
621 @item @code{percussion} @tab
622 percussion clef
623 @item @code{tab} @tab
624 tablature clef
625 @end multitable
626
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.
631 For example,
632
633 @cindex choral tenor clef
634 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
635 \clef "G_8" c4
636 @end lilypond
637
638
639 @commonprop
640
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.
647
648 @lilypond[quote,ragged-right,verbatim]
649 {
650   \set Staff.clefGlyph = #"clefs.F"
651   \set Staff.clefPosition = #2
652   c'4
653   \set Staff.clefGlyph = #"clefs.G"
654   c'4
655   \set Staff.clefGlyph = #"clefs.C"
656   c'4
657   \set Staff.clefOctavation = #7
658   c'4
659   \set Staff.clefOctavation = #0
660   \set Staff.clefPosition = #0
661   c'4
662   \clef "bass"
663   c'4
664   \set Staff.middleCPosition = #4
665   c'4
666 }
667 @end lilypond
668
669
670 @seealso
671
672 Program reference: @internalsref{Clef}.
673
674 This manual: @ref{Ancient clefs}.
675
676
677 @node Key signature
678 @unnumberedsubsubsec Key signature
679
680 @cindex Key signature
681 @funindex \key
682
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.
686
687 Setting or changing the key signature is done with the @code{\key}
688 command
689
690 @example
691 @code{\key} @var{pitch} @var{type}
692 @end example
693
694 @funindex \minor
695 @funindex \major
696 @funindex \minor
697 @funindex \ionian
698 @funindex \locrian
699 @funindex \aeolian
700 @funindex \mixolydian
701 @funindex \lydian
702 @funindex \phrygian
703 @funindex \dorian
704 @cindex church modes
705
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
711 @code{\dorian}.
712
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
716 example TODO.
717 @c TODO: LSR snippet 248.  leave this here for now -gp
718
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}.}
727
728 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
729 \key g \major
730 f1
731 fis
732 @end lilypond
733
734
735 @commonprop
736
737 A natural sign is printed to cancel any previous accidentals.
738 This can be suppressed by setting the
739 @code{Staff.printKeyCancellation} property.
740
741 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
742 \key d \major
743 a b cis d
744 \key g \minor
745 a bes c d
746 \set Staff.printKeyCancellation = ##f
747 \key d \major
748 a b cis d
749 \key g \minor
750 a bes c d
751 @end lilypond
752
753
754 @seealso
755
756 Program reference: @internalsref{KeyCancellation},
757 @internalsref{KeySignature}.
758
759
760 @node Ottava brackets
761 @unnumberedsubsubsec Ottava brackets
762
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}
766
767 @cindex ottava
768 @cindex 15ma
769 @cindex octavation
770
771 @lilypond[quote,ragged-right,verbatim,fragment]
772 \relative c''' {
773   a2 b
774   #(set-octavation 1)
775   a b
776   #(set-octavation 0)
777   a b
778 }
779 @end lilypond
780
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.,
787
788 @lilypond[quote,ragged-right,verbatim]
789 {
790   #(set-octavation 1)
791   \set Staff.ottavation = #"8"
792   c'''
793 }
794 @end lilypond
795
796
797 @seealso
798
799 Program reference: @internalsref{OttavaBracket}.
800
801
802 @refbugs
803
804 @code{set-octavation} will get confused when clef changes happen
805 during an octavation bracket.
806
807
808 @node Instrument transpositions
809 @unnumberedsubsubsec Instrument transpositions
810
811 @cindex transposition, MIDI
812 @cindex transposition, instrument
813
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).
817
818 The transposition is entered after the keyword
819 @code{\transposition}
820
821 @example
822 \transposition bes   %% B-flat clarinet
823 @end example
824
825 @noindent
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}.
830
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
836
837 @example
838 clarinet = @{
839   \transposition c'
840   ...
841 @}
842 saxophone = @{
843   \transposition c'
844   ...
845 @}
846 @end example
847
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.,
853
854 @example
855 \transposition d'
856 c'4^"in D"
857 ...
858 \transposition g'
859 c'4^"in G"
860 ...
861 @end example
862