]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/pitches.itely
Minor fixes; thanks Mats!
[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 @lilypondfile[quote,ragged-right,line-width=16\cm,staffsize=16]
14 {pitches-headword.ly}
15
16 This section discusses how to specify the pitch of notes.  There
17 are three steps to this process: input, modifying, and output.
18
19 @menu
20 * Writing pitches::             
21 * Changing multiple pitches::   
22 * Displaying pitches::          
23 * Note heads::                  
24 @end menu
25
26
27 @node Writing pitches
28 @subsection Writing pitches
29
30 This section discusses how to input pitches.  There are two
31 different ways to place notes in octaves: absolute and relative
32 mode.  In most cases, relative mode will be more convient.
33
34 @menu
35 * Absolute octave entry::       
36 * Relative octave entry::       
37 * Accidentals::                 
38 * Note names in other languages::  
39 @end menu
40
41
42 @node Absolute octave entry
43 @unnumberedsubsubsec Absolute octave entry
44
45 @cindex pitch names
46 @cindex pitches
47 @cindex absolute
48 @cindex absolute octave specification
49
50 A pitch name is specified using lowercase letters@tie{}@code{a}
51 through@tie{}@code{g}.  The note names @code{c} to @code{b} are
52 engraved in the octave below middle C.
53
54 @c NOTE: don't use c' here.
55 @lilypond[verbatim,quote,ragged-right,fragment]
56 \clef bass
57 c d e f
58 g a b c
59 d e f g
60 @end lilypond
61
62 @funindex '
63 @funindex ,
64
65 Other octaves may be specified with a single quote@tie{}(@code{'})
66 or comma@tie{}(@code{,}) character.  Each@tie{}@code{'} raises the
67 pitch by one octave; each@tie{}@code{,} lowers the pitch by an
68 octave.
69
70 @lilypond[verbatim,quote,ragged-right,fragment]
71 \clef treble
72 c' c'' e' g
73 d'' d' d c
74 \clef bass
75 c, c,, e, g
76 d,, d, d c
77 @end lilypond
78
79 @seealso
80
81 Music Glossary: @rglos{Pitch names}.
82
83 Snippets: @lsrdir{Pitches}.
84
85
86 @node Relative octave entry
87 @unnumberedsubsubsec Relative octave entry
88
89 @cindex relative
90 @cindex relative octave specification
91 @funindex \relative
92
93 When octaves are specified in absolute mode it is easy to
94 accidentally put a pitch in the wrong octave.  Relative octave
95 mode reduces these errors since most of the time it is not
96 necessary to indicate any octaves at all.  Furthermore, in
97 absolute mode a single mistake may be difficult to spot, while in
98 relative mode a single error puts the rest of the piece off by one
99 octave.
100
101 @example
102 \relative @var{startpitch} @var{musicexpr}
103 @end example
104
105 In relative mode, each note is assumed to be as close to the
106 previous note as possible.  This means that the octave of pitches
107 in @var{musicexpr} is calculated as follows:
108
109 @itemize
110 @item
111 If no octave changing mark is used on a pitch, its octave is calculated
112 so that the interval with the previous note is less than a fifth.  This
113 interval is determined without considering accidentals.
114
115 @item
116 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be added to
117 respectively raise or lower a pitch by an extra octave, relatively to
118 the pitch calculated without octave mark.
119
120 @item
121 Multiple octave changing marks can be used.  For example, @code{''}@tie{}and
122 @code{,,}@tie{} will alter the pitch by two octaves.
123
124 @item
125 The pitch of the first note is relative to
126 @code{@var{startpitch}}.  @var{startpitch} is specified in
127 absolute octave mode, and it is recommended that it be a octave of
128 @code{c}.
129
130 @end itemize
131
132 Here is the relative mode shown in action:
133
134 @lilypond[verbatim,quote,ragged-right]
135 \relative c {
136   \clef bass
137   c d e f
138   g a b c
139   d e f g
140 }
141 @end lilypond
142
143 Octave changing marks are used for intervals greater than a
144 fourth:
145
146 @lilypond[verbatim,quote,ragged-right]
147 \relative c'' {
148   c g c f,
149   c' a, e'' c
150 }
151 @end lilypond
152
153 A note sequence without a single octave mark can nevertheless span
154 large intervals:
155
156 @lilypond[verbatim,quote,ragged-right]
157 \relative c {
158   c f b e
159   a d g c
160 }
161 @end lilypond
162
163 If the preceding item is a chord, the first note of the chord is
164 used as the reference point for the octave placement of a
165 following note or chord.  Inside of chords the next note is always
166 relative to the preceding one.
167
168 @lilypond[verbatim,quote,ragged-right]
169 \relative c' {
170   c
171   <c e g>
172   % the C is now an octave higher
173   <c' e g'>
174   % the C returns to the original pitch
175   <c, e, g''>
176 }
177 @end lilypond
178
179 As explained above, the octave of pitches is calculated only with
180 the note names, regardless of any alterations.  Therefore, an
181 E-double-sharp sharp following a B will be placed higher, while an
182 F-double-flat would be placed lower.  In other words, a
183 double-augmented fourth is considered a smaller interval than a
184 double-diminished fifth, regardless of the number of semitones
185 that each interval contains.
186
187 @lilypond[verbatim,quote,ragged-right]
188 \relative c'' {
189   c2 fis
190   c2 ges
191   b2 eisis
192   b2 feses
193 }
194 @end lilypond
195
196
197 @seealso
198
199 Music Glossary: @rglos{fifth}, @rglos{interval}, @rglos{Pitch names}.
200
201 Notation Reference: @ref{Octave corrections and checks}.
202
203 Snippets: @lsrdir{Pitches}.
204
205
206 @refbugs
207
208 The relative conversion will not affect @code{\transpose},
209 @code{\chordmode} or @code{\relative} sections in its argument.
210 To use relative mode within transposed music, an additional
211 @code{\relative} must be placed inside @code{\transpose}.
212
213 @c TODO: DEPRECATED
214 If no @var{startpitch} is specified for @code{\relative},
215 then@tie{}@code{c'} is assumed.  However, this is a deprecated
216 option and may disappear in future versions, so its use is
217 discouraged.
218
219
220
221 @node Accidentals
222 @unnumberedsubsubsec Accidentals
223
224 @warning{New users are sometimes confused about accidentals and
225 key signatures.  In LilyPond, note names are the raw input; key
226 signatures and clefs determine how this raw input is displayed.
227 An unaltered note like@tie{}@code{c} means @q{C natural},
228 regardless of the key signature or clef.  For more information,
229 see @rlearning{Accidentals and key signatures}.}
230
231 @cindex note names, Dutch
232 @cindex note names, default
233
234 A @notation{sharp} pitch is made by adding @code{is} to the name,
235 and a @notation{flat} pitch by adding @code{es}.  As you might
236 expect, a @notation{double sharp} or @notation{double flat} is
237 made by adding @code{isis} or @code{eses}.  This syntax is derived
238 from Dutch note naming conventions.  To use other names for
239 accidentals, see @ref{Note names in other languages}.
240
241 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
242 ais1 aes aisis aeses
243 @end lilypond
244
245 A natural will cancel the effect of an accidental or key
246 signature.  However, naturals are not encoded into the note name
247 syntax with a suffix; a natural pitch is shown as a simple note
248 name:
249
250 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
251 a4 aes a2
252 @end lilypond
253
254 @cindex quarter tones
255 @cindex semi-flats, semi-sharps
256
257 Half-flats and half-sharps are formed by adding @code{eh} and
258 @code{ih}; the following is a series of Cs with increasing
259 pitches
260
261 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
262 ceseh1 ces ceh c cih cis cisih
263 @end lilypond
264
265
266
267 @cindex accidental, reminder
268 @cindex accidental, cautionary
269 @cindex accidental, parenthesized
270 @cindex reminder accidental
271 @funindex ?
272 @cindex cautionary accidental
273 @cindex parenthesized accidental
274 @funindex !
275
276 Normally accidentals are printed automatically, but you may also
277 print them manually.  A reminder accidental can be forced by
278 adding an exclamation mark@tie{}@code{!} after the pitch.  A
279 cautionary accidental (i.e., an accidental within parentheses) can
280 be obtained by adding the question mark@tie{}@code{?} after the
281 pitch.  These extra accidentals can also be used to produce
282 natural signs.
283
284 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
285 cis cis cis! cis? c c c! c?
286 @end lilypond
287
288 Accidentals are only printed on tied notes which begin a new
289 system:
290
291 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
292 cis1~ cis~
293 \break
294 cis
295 @end lilypond
296
297
298 @commonprop
299
300 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
301 {preventing-extra-naturals-from-being-automatically-added.ly}
302
303 @seealso
304
305 Music Glossary: @rglos{sharp}, @rglos{flat}, @rglos{double sharp},
306 @rglos{double flat}, @rglos{Pitch names}.
307
308 Learning Manual: @rlearning{Accidentals and key signatures}.
309
310 Notation Reference: @ref{Automatic accidentals},
311 @ref{Musica ficta accidentals},
312 @ref{Note names in other languages}.
313
314 Snippets: @lsrdir{Pitches},
315 @lsr{Pitches,
316 dodecaphonic-style-accidentals-for-each-note-including-naturals.ly},
317 @lsr{Pitches, makam.ly}.
318
319
320 @refbugs
321
322 There are no generally accepted standards for denoting
323 three-quarter flats, so LilyPond's symbol does not conform to any
324 standard.
325
326
327
328 @node Note names in other languages
329 @unnumberedsubsubsec Note names in other languages
330
331 There are predefined sets of note names for various other
332 languages.  To use them, include the language specific init file.
333 For example, add @code{\include "english.ly"} to the top of the
334 input file.  The available language files and the note names they
335 define are:
336
337 @cindex note names, other languages
338
339 @smallexample
340 @multitable {nederlands.ly} {do re mi fa sol la sib si} {-iss/-is} {-ess/-es} {-ss/-x/-sharpsharp} {-essess/-eses}
341 @headitem Language
342   @tab Note names
343   @tab sharp @tab flat @tab double sharp @tab double flat
344 @item nederlands.ly
345   @tab c d e f g a bes b
346   @tab -is @tab -es @tab -isis @tab -eses
347 @item english.ly
348   @tab c d e f g a bf b
349   @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
350     @tab -ff/-flatflat
351 @item deutsch.ly
352   @tab c d e f g a b h
353   @tab -is @tab -es @tab -isis @tab -eses
354 @item norsk.ly
355   @tab c d e f g a b h
356   @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
357     @tab -essess/-eses
358 @item svenska.ly
359   @tab c d e f g a b h
360   @tab -iss @tab -ess @tab -ississ @tab -essess
361 @item suomi.ly
362   @tab c d e f g a b h
363   @tab -is @tab -es @tab -isis @tab -eses
364 @item italiano.ly
365   @tab do re mi fa sol la sib si
366   @tab -d @tab -b @tab -dd @tab -bb
367 @item catalan.ly
368   @tab do re mi fa sol la sib si
369   @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
370 @item espanol.ly
371   @tab do re mi fa sol la sib si
372   @tab -s @tab -b @tab -ss @tab -bb
373 @item portugues.ly
374   @tab do re mi fa sol la sib si
375   @tab -s @tab -b @tab -ss @tab -bb
376 @item vlaams.ly
377   @tab do re mi fa sol la sib si
378   @tab -k @tab -b @tab -kk @tab -bb
379 @end multitable
380 @end smallexample
381
382 Some music uses microtones whose alterations are fractions of a
383 @q{normal} sharp or flat.  The note names for quartertones defined
384 in the various language files are listed in the following table.
385 Here the prefixes @notation{semi-} and @notation{sesqui-} mean
386 @q{half} and @q{one and a half}, respectively.  For the other
387 languages, no special names have been defined yet.
388
389 @smallexample
390 @multitable {nederlands.ly} {do re mi fa sol la sib si} {-iss/-is} {-ess/-es} {-ississ/-isis} {-ississ/-isis}
391 @headitem Language
392   @tab Note names
393   @tab semi- @tab semi- @tab sesqui- @tab sesqui-
394
395 @item nederlands.ly
396   @tab c d e f g a bes b
397   @tab -ih @tab -eh @tab -isih @tab -eseh
398 @item english.ly
399   @tab c d e f g a bf b
400   @tab -qs @tab -qf @tab -tqs @tab -tqf
401 @item deutsch.ly
402   @tab c d e f g a b h
403   @tab -ih @tab -eh @tab -isih @tab -eseh
404 @item italiano.ly
405   @tab do re mi fa sol la sib si
406   @tab -sd @tab -sb @tab -dsd @tab -bsb
407 @item portugues.ly
408   @tab do re mi fa sol la sib si
409   @tab -sqt @tab -bqt @tab -stqt @tab -btqt
410 @end multitable
411 @end smallexample
412
413 In Dutch, @code{aes} is contracted to @code{as}, but both forms
414 are accepted in LilyPond.  Similarly, both @code{es} and
415 @code{ees} are accepted.  This also applies to
416 @code{aeses}@tie{}/@tie{}@code{ases} and
417 @code{eeses}@tie{}/@tie{}@code{eses}.  Sometimes only these
418 contracted names are defined in the corresponding language files.
419
420 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
421 a2 as e es a ases e eses
422 @end lilypond
423
424 In some languages such as Norwegian and Swedish, the usual
425 spelling for accidentals is a double @q{s} such as in @code{ciss}
426 or @code{cess}.  For both historical reasons and a greater
427 simplicity, LilyPond uses a single @q{s} for all these languages.
428
429 @seealso
430
431 Music Glossary: @lsrdir{Pitch names}.
432
433 Snippets: @lsrdir{Pitches}.
434
435
436 @node Changing multiple pitches
437 @subsection Changing multiple pitches
438
439 This section discusses how to modify pitches.
440
441 @menu
442 * Octave corrections and checks::  
443 * Transpose::                   
444 @end menu
445
446 @node Octave corrections and checks
447 @unnumberedsubsubsec Octave corrections and checks
448
449 @cindex octave correction
450 @cindex octave check
451 @funindex =
452 @funindex \octave
453
454 In relative mode, it is easy to forget an octave changing mark.
455 Octave corrections and checks make such errors easier to find
456 by displaying a warning if a note is found in an unexpected
457 octave.  An octave correction will change the pitch, while an
458 octave check does not change the pitch.  Both commands will print
459 a warning and change the octave for future notes.
460
461 To use an octave correction, add @code{=}@var{quotes} after the
462 pitch.  The @var{quotes} indicate what its absolute octave should
463 be.  This example will generate a warning (and change the pitch)
464 because the second note is the absolute octave @code{d''} instead
465 of @code{d'} as indicated by the octave correction.
466
467 @lilypond[verbatim,quote,ragged-right,fragment]
468 \relative c'' {
469   c2 d='
470   e2 f
471 }
472 @end lilypond
473
474 To use an octave check, add @code{\octave}@tie{}@var{controlpitch}
475 to the note.  This checks that the note lies within the octave
476 surrounding @var{controlpitch}, i.e. not more than a fourth above
477 or below it.  If this is not the case, a warning is printed.  The
478 @var{controlpitch} is not printed as a note.
479
480 @lilypond[verbatim,quote,ragged-right,fragment]
481 \relative c'' {
482   c2 d \octave c'
483   e2 f
484 }
485 @end lilypond
486
487 In both cases, the following note (the@tie{}@code{e}) is adjusted
488 to be relative to@tie{}@code{d'} instead of@tie{}@code{d''}.
489
490 @seealso
491
492 Snippets: @lsrdir{Pitches}.
493
494
495 @node Transpose
496 @unnumberedsubsubsec Transpose
497
498 @cindex transpose
499 @cindex transposition of pitches
500 @funindex \transpose
501
502 A music expression can be transposed with @code{\transpose}.  The
503 syntax is
504
505 @example
506 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
507 @end example
508
509 @noindent
510 This means that @var{musicexpr} is transposed by the interval
511 between the pitches @var{frompitch} and @var{topitch}: any note
512 with pitch @var{frompitch} is changed to @var{topitch} and any
513 other note is transposed by the same interval.
514
515 Consider a piece written in the key of D-major.  It can be
516 transposed up to E-major; note that the key signature is
517 automatically transposed as well.
518
519 @lilypond[verbatim,quote,ragged-right]
520 \transpose d e {
521   \relative c' {
522     \key d \major
523     d4 fis a d
524   }
525 }
526 @end lilypond
527
528 If a part written in C (normal concert pitch) is to be played on
529 the A clarinet (for which an A is notated as a C and thus sounds a
530 minor third lower than notated), the appropriate part will be
531 produced with:
532
533 @lilypond[verbatim,quote,ragged-right]
534 \transpose a c' {
535   \relative c' {
536     \key c \major
537     c4 d e g
538   }
539 }
540 @end lilypond
541
542 @noindent
543 Note that we specify @code{\key c \major} explicitly.  If we do
544 not specify a key signature, the notes will be transposed but no
545 key signature will be printed.
546
547 @code{\transpose} distinguishes between enharmonic pitches: both
548 @code{\transpose c cis} or @code{\transpose c des} will transpose
549 up half a tone.  The first version will print sharps and the notes
550 will remain on the same scale step, the second version will print
551 flats on the scale step above.
552
553 @lilypond[verbatim,quote,ragged-right]
554 mus = \relative c' { c d e f }
555 \new Staff {
556   \transpose c cis { \mus }
557   \transpose c des { \mus }
558 }
559 @end lilypond
560
561 @cindex transposing instruments
562
563 @code{\transpose} may also be used in a different way, to input
564 written notes for a transposing instrument.  The previous examples
565 show how to enter pitches in C (or @notation{concert pitch}) and
566 typeset them for a transposing instrument, but the opposite is
567 also possible if you for example have a set of instrumental parts
568 and want to print a conductor's score.  For example, when entering
569 music for a B-flat trumpet which begins on a notated E (concert
570 D), one would write:
571
572 @example
573 musicInBflat = @{ e4 @dots{} @}
574 \transpose c bes, \musicInBflat
575 @end example
576
577 @noindent
578 To print this music in F (e.g., rearranging to a French horn) you
579 could wrap the existing music with another @code{\transpose}:
580
581 @example
582 musicInBflat = @{ e4 @dots{} @}
583 \transpose f c' @{ \transpose c bes, \musicInBflat @}
584 @end example
585
586 @noindent
587 For more information about transposing instruments,
588 see @ref{Instrument transpositions}.
589
590
591 @commonprop
592
593 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
594 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
595
596
597 @seealso
598
599 Notation Reference: @ref{Instrument transpositions}.
600
601 Snippets: @lsrdir{Pitches}.
602
603 Internals Reference: @internalsref{TransposedMusic}.
604
605 @refbugs
606
607 If you want to use both @code{\transpose} and @code{\relative},
608 you must put @code{\transpose} outside of @code{\relative}, since
609 @code{\relative} will have no effect on music that appears inside
610 a @code{\transpose}.
611
612
613 @node Displaying pitches
614 @subsection Displaying pitches
615
616 This section discusses how to alter the output of pitches.
617
618 @menu
619 * Clef::                        
620 * Key signature::               
621 * Ottava brackets::             
622 * Instrument transpositions::   
623 * Automatic accidentals::       
624 * Ambitus::                     
625 @end menu
626
627
628 @node Clef
629 @unnumberedsubsubsec Clef
630
631 @funindex \clef
632
633 @cindex G clef
634 @cindex C clef
635 @cindex F clef
636 @cindex treble clef
637 @cindex violin clef
638 @cindex alto clef
639 @cindex tenor clef
640 @cindex bass clef
641 @cindex french clef
642 @cindex soprano clef
643 @cindex mezzosoprano clef
644 @cindex baritone clef
645 @cindex varbaritone clef
646 @cindex subbass clef
647
648 The clef is set with the @code{\clef} @var{clefname} command:
649
650 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
651 \clef treble
652 c2 c
653 \clef alto
654 c2 c
655 \clef tenor
656 c2 c
657 \clef bass
658 c2 c
659 @end lilypond
660
661 Supported clefs include:
662
663 @multitable @columnfractions .4 .6
664 @headitem Clef @tab Position
665 @item @code{treble, violin, G, G2} @tab
666 G clef (g') on 2nd line
667 @item @code{alto, C} @tab
668 C clef (c') on 3rd line
669 @item @code{tenor} @tab
670 C clef (c') on 4th line
671 @item @code{bass, F} @tab
672 F clef (f) on 4th line
673 @item @code{french} @tab
674 G clef (g') on 1st line, so-called French violin clef
675 @item @code{soprano} @tab
676 C clef (c') on 1st line
677 @item @code{mezzosoprano} @tab
678 C clef (c') on 2nd line
679 @item @code{baritone} @tab
680 C clef (c') on 5th line
681 @item @code{varbaritone} @tab
682 F clef (f) on 3rd line
683 @item @code{subbass} @tab
684 F clef (f) on 5th line
685 @item @code{percussion} @tab
686 percussion clef
687 @item @code{tab} @tab
688 tablature clef
689 @end multitable
690
691 Further supported clefs are described under @ref{Ancient clefs}.
692
693 By adding @code{_8} or @code{^8} to the clef name, the clef is
694 transposed one octave down or up, respectively, and @code{_15} and
695 @code{^15} transposes by two octaves.  The argument @var{clefname}
696 must be enclosed in quotes when it contains underscores or digits.
697 For example,
698
699 @cindex choral tenor clef
700
701 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
702 \clef "treble_8" c1
703 \clef "bass^15" c1
704 @end lilypond
705
706
707 @commonprop
708
709 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
710 {clefs-commonly-tweaked-properties.ly}
711
712
713 @seealso
714
715 Notation Reference: @ref{Ancient clefs}.
716
717 Snippets: @lsrdir{Pitches}.
718
719 Internals Reference: @internalsref{Clef}.
720
721
722 @node Key signature
723 @unnumberedsubsubsec Key signature
724
725 @cindex key signature
726 @funindex \key
727
728 @warning{New users are sometimes confused about accidentals and
729 key signatures.  In LilyPond, note names are the raw input; key
730 signatures and clefs determine how this raw input is displayed.
731 An unaltered note like@tie{}@code{c} means @q{C natural},
732 regardless of the key signature or clef.  For more information,
733 see @rlearning{Accidentals and key signatures}.}
734
735 The key signature indicates the tonality in which a piece is
736 played.  It is denoted by a set of alterations (flats or sharps)
737 at the start of the staff.  Setting or changing the key signature
738 is done with the @code{\key} command:
739
740 @example
741 \key @var{pitch} @var{mode}
742 @end example
743
744 @funindex \minor
745 @funindex \major
746 @funindex \minor
747 @funindex \ionian
748 @funindex \locrian
749 @funindex \aeolian
750 @funindex \mixolydian
751 @funindex \lydian
752 @funindex \phrygian
753 @funindex \dorian
754 @cindex church modes
755
756 Here, @var{mode} should be @code{\major} or @code{\minor} to get a
757 key signature of @var{pitch}-major or @var{pitch}-minor,
758 respectively.  You may also use the standard mode names, also
759 called @q{church modes}: @code{\ionian}, @code{\locrian},
760 @code{\aeolian}, @code{\mixolydian}, @code{\lydian},
761 @code{\phrygian}, and @code{\dorian}.
762
763 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
764 \key g \major
765 fis1
766 f
767 fis
768 @end lilypond
769
770
771 @commonprop
772
773 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
774 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
775
776 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
777 {non-traditional-key-signatures.ly}
778
779
780 @seealso
781
782 Music Glossary: @rglos{church mode}, @rglos{scordatura}.
783
784 Learning Manual: @rlearning{Accidentals and key signatures}.
785
786 Snippets: @lsrdir{Pitches}.
787
788 Internals Reference: @internalsref{KeyCancellation},
789 @internalsref{KeySignature}, @internalsref{Key_engraver}.
790
791
792 @node Ottava brackets
793 @unnumberedsubsubsec Ottava brackets
794
795 @cindex ottava
796 @cindex 15ma
797 @cindex 8va
798 @cindex 8ve
799 @cindex octavation
800
801 @notation{Ottava brackets} introduce an extra transposition of an
802 octave for the staff:
803
804 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
805 a'2 b
806 #(set-octavation 1)
807 a b
808 #(set-octavation 0)
809 a b
810 @end lilypond
811
812 The @code{set-octavation} function also takes -1 (for 8va bassa),
813 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
814
815
816 @commonprop
817
818 @ignore
819 Internally the function sets the properties @code{ottavation}
820 (e.g., to @code{"8va"} or @code{"8vb"}) and
821 @code{middleCPosition}.  To override the text of the bracket, set
822 @code{ottavation} after invoking @code{set-octavation}, i.e.,
823
824 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
825 #(set-octavation 1)
826 \set Staff.ottavation = #"8"
827 c'
828 @end lilypond
829 @end ignore
830
831 @c FIXME: add this
832 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
833 @c {}
834
835
836 @seealso
837
838 Music Glossary: @rglos{ottava}.
839
840 Snippets: @lsrdir{Pitches}.
841
842 Internals Reference: @internalsref{OttavaBracket}.
843
844
845 @refbugs
846
847 @c FIXME: This should have been fixed by Joe.
848 @c If it hasn't, we should mention the appropriate
849 @c workaround (there is a snippet in the LSR) -vv
850 @code{set-octavation} will get confused when clef changes happen
851 during an octavation bracket.
852
853
854 @node Instrument transpositions
855 @unnumberedsubsubsec Instrument transpositions
856
857 @cindex transposition, MIDI
858 @cindex transposition, instrument
859
860 When typesetting scores that involve transposing instruments, some
861 parts can be typeset in a different pitch than the
862 @notation{concert pitch}.  In these cases, the key of the
863 @notation{transposing instrument} should be specified; otherwise
864 the MIDI output and cues in other parts will produce incorrect
865 pitches.  For more information about quotations, see @ref{Quoting
866 other voices}.
867
868 @example
869 \transposition @var{pitch}
870 @end example
871
872 The pitch to use for @code{\transposition} should correspond to
873 the real sound heard when a@tie{}@code{c'} written on the staff is
874 played by the transposing instrument.  @code{\transposition}
875 should @emph{only} be used if the pitches are @emph{not} being
876 entered in concert pitch.
877
878 Here are a few notes for violin and B-flat clarinet where the
879 parts have been entered using the notes and key as they appear in
880 each part of the conductor's score.  The two instruments are
881 playing in unison.
882
883 @lilypond[verbatim,quote,ragged-right]
884 \new GrandStaff <<
885   \new Staff = "Vln" {
886     \relative c'' {
887       \set Staff.instrumentName = "Vln"
888       \set Staff.midiInstrument="violin"
889       % strictly speaking not necessary, but a good reminder
890       \transposition c'
891
892       \key c \major
893       g4( c8) r c r c4
894     }
895   }
896   \new Staff = "clarinet" {
897     \relative c'' {
898       \set Staff.instrumentName = \markup {Cl (B\flat)}
899       \set Staff.midiInstrument="clarinet"
900       \transposition bes
901
902       % not concert pitch
903       \key d \major
904       a4( d8) r d r d4
905     }
906   }
907 >>
908 @end lilypond
909
910 The @code{\transposition} may be changed during a piece.  For
911 example, a clarinetist may switch from an A clarinet to a B-flat
912 clarinet.
913
914 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
915 \set Staff.instrumentName = "Cl (A)"
916 \key a \major
917 \transposition a
918 c d e f
919 \fatText
920 r1^\markup{Switch to B\flat clarinet}
921
922 \key bes \major
923 \transposition bes
924 c2 g
925 @end lilypond
926
927
928 @seealso
929
930 Music Glossary: @rglos{concert pitch},
931 @rglos{transposing instrument}.
932
933 Notation Reference: @ref{Quoting other voices}, @ref{Transpose}.
934
935 Snippets: @lsrdir{Pitches}.
936
937
938 @node Automatic accidentals
939 @unnumberedsubsubsec Automatic accidentals
940 @cindex automatic accidentals
941
942 @funindex set-accidental-style
943
944 There are many different conventions on how to typeset
945 accidentals.  LilyPond provides a function to specify which such
946 accidental style to use.  This function is called as follows
947
948 @example
949 \new Staff <<
950   #(set-accidental-style 'voice)
951   @{ @dots{} @}
952 >>
953 @end example
954
955 The accidental style applies to the current @code{Staff} by
956 default (with the exception of the styles @code{piano} and
957 @code{piano-cautionary}, which are explained below).  Optionally,
958 the function can take a second argument which determines in which
959 scope the style should be changed.  For example, to use the same
960 style in all staves of the current @code{StaffGroup}, use
961
962 @example
963 #(set-accidental-style 'voice 'StaffGroup)
964 @end example
965
966 The following accidental styles are supported.  To demonstrate
967 each style, we use the following example:
968
969 @lilypond[verbatim,quote,ragged-right]
970 musicA = {
971   <<
972     \relative c' {
973       cis'8 fis, d'4 <a cis>8 f bis4 |
974       cis2. <c, g'>4 |
975     }
976     \\
977     \relative c' {
978       ais'2 cis, |
979       fis8 b a4 cis2 |
980     }
981   >>
982 }
983
984 musicB = {
985   \clef bass
986   \new Voice {
987     \voiceTwo \relative c' {
988       <fis, a cis>4
989       \change Staff = up
990       cis'
991       \change Staff = down
992       <fis, a>
993       \change Staff = up
994       dis' |
995       \change Staff = down
996       <fis, a cis>4 gis <f a d>2 |
997     }
998   }
999 }
1000
1001 \new PianoStaff {
1002   <<
1003     \context Staff = "up" {
1004       %%% change the next line as desired:
1005       #(set-accidental-style 'default)
1006       \musicA
1007     }
1008     \context Staff = "down" {
1009       %%% change the next line as desired:
1010       #(set-accidental-style 'default)
1011       \musicB
1012     }
1013   >>
1014 }
1015 @end lilypond
1016
1017 Note that the last lines of this example can be replaced by the
1018 following, as long as the same accidental style should be used in
1019 both staves.
1020 @example
1021 \new PianoStaff @{
1022   <<
1023     \context Staff = "up" @{
1024       %%% change the next line as desired:
1025       #(set-accidental-style 'default 'Score)
1026       \musicA
1027     @}
1028     \context Staff = "down" @{
1029       \musicB
1030     @}
1031   >>
1032 @}
1033 @end example
1034
1035
1036 @c NOTE: don't use verbatim in this table.
1037 @table @code
1038 @item default
1039 This is the default typesetting behavior.  It corresponds to
1040 eighteenth-century common practice: accidentals are remembered to
1041 the end of the measure in which they occur and only on their own
1042 octave.  Thus, in the example below, no natural signs are printed
1043 before the@tie{}@code{b} in the second measure or the
1044 last@tie{}@code{c}:
1045
1046 @lilypond[quote,ragged-right]
1047 musicA = {
1048   <<
1049     \relative c' {
1050       cis'8 fis, d'4 <a cis>8 f bis4 |
1051       cis2. <c, g'>4 |
1052     }
1053     \\
1054     \relative c' {
1055       ais'2 cis, |
1056       fis8 b a4 cis2 |
1057     }
1058   >>
1059 }
1060
1061 musicB = {
1062   \clef bass
1063   \new Voice {
1064     \voiceTwo \relative c' {
1065       <fis, a cis>4
1066       \change Staff = up
1067       cis'
1068       \change Staff = down
1069       <fis, a>
1070       \change Staff = up
1071       dis' |
1072       \change Staff = down
1073       <fis, a cis>4 gis <f a d>2 |
1074     }
1075   }
1076 }
1077
1078 \new PianoStaff {
1079   <<
1080     \context Staff = "up" {
1081       #(set-accidental-style 'default)
1082       \musicA
1083     }
1084     \context Staff = "down" {
1085       #(set-accidental-style 'default)
1086       \musicB
1087     }
1088   >>
1089 }
1090 @end lilypond
1091
1092 @item voice
1093 The normal behavior is to remember the accidentals on Staff-level.
1094 In this style, however, accidentals are typeset individually for
1095 each voice.  Apart from that, the rule is similar to
1096 @code{default}.
1097
1098 As a result, accidentals from one voice do not get canceled in
1099 other voices, which is often an unwanted result: in the following
1100 example, it is hard to determine whether the second@tie{}@code{a}
1101 should be played natural or sharp.  The @code{voice} option should
1102 therefore be used only if the voices are to be read solely by
1103 individual musicians.  If the staff is to be used by one musician
1104 (e.g., a conductor or in a piano score) then @code{modern} or
1105 @code{modern-cautionary} should be used instead.
1106
1107
1108 @lilypond[quote,ragged-right]
1109 musicA = {
1110   <<
1111     \relative c' {
1112       cis'8 fis, d'4 <a cis>8 f bis4 |
1113       cis2. <c, g'>4 |
1114     }
1115     \\
1116     \relative c' {
1117       ais'2 cis, |
1118       fis8 b a4 cis2 |
1119     }
1120   >>
1121 }
1122
1123 musicB = {
1124   \clef bass
1125   \new Voice {
1126     \voiceTwo \relative c' {
1127       <fis, a cis>4
1128       \change Staff = up
1129       cis'
1130       \change Staff = down
1131       <fis, a>
1132       \change Staff = up
1133       dis' |
1134       \change Staff = down
1135       <fis, a cis>4 gis <f a d>2 |
1136     }
1137   }
1138 }
1139
1140 \new PianoStaff {
1141   <<
1142     \context Staff = "up" {
1143       #(set-accidental-style 'voice)
1144       \musicA
1145     }
1146     \context Staff = "down" {
1147       #(set-accidental-style 'voice)
1148       \musicB
1149     }
1150   >>
1151 }
1152 @end lilypond
1153
1154 @item modern
1155 @funindex modern style accidentals
1156
1157 This rule corresponds to the common practice in the twentieth
1158 century.  It prints the same accidentals as @code{default}, with
1159 two exceptions which serve to avoid ambiguity: after temporary
1160 accidentals, cancellation marks are printed also in the following
1161 measure (for notes in the same octave) and, in the same measure,
1162 for notes in other octaves.  Hence the naturals before
1163 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1164 the upper staff:
1165
1166 @lilypond[quote,ragged-right]
1167 musicA = {
1168   <<
1169     \relative c' {
1170       cis'8 fis, d'4 <a cis>8 f bis4 |
1171       cis2. <c, g'>4 |
1172     }
1173     \\
1174     \relative c' {
1175       ais'2 cis, |
1176       fis8 b a4 cis2 |
1177     }
1178   >>
1179 }
1180
1181 musicB = {
1182   \clef bass
1183   \new Voice {
1184     \voiceTwo \relative c' {
1185       <fis, a cis>4
1186       \change Staff = up
1187       cis'
1188       \change Staff = down
1189       <fis, a>
1190       \change Staff = up
1191       dis' |
1192       \change Staff = down
1193       <fis, a cis>4 gis <f a d>2 |
1194     }
1195   }
1196 }
1197
1198 \new PianoStaff {
1199   <<
1200     \context Staff = "up" {
1201       #(set-accidental-style 'modern)
1202       \musicA
1203     }
1204     \context Staff = "down" {
1205       #(set-accidental-style 'modern)
1206       \musicB
1207     }
1208   >>
1209 }
1210 @end lilypond
1211
1212 @item modern-cautionary
1213 @funindex modern-cautionary
1214
1215 This rule is similar to @code{modern}, but the @q{extra}
1216 accidentals (the ones not typeset by @code{default}) are typeset
1217 as cautionary accidentals.  They are by default printed with
1218 parentheses, but they can also be printed in reduced size by
1219 defining the @code{cautionary-style} property of
1220 @code{AccidentalSuggestion}.
1221
1222
1223 @lilypond[quote,ragged-right]
1224 musicA = {
1225   <<
1226     \relative c' {
1227       cis'8 fis, d'4 <a cis>8 f bis4 |
1228       cis2. <c, g'>4 |
1229     }
1230     \\
1231     \relative c' {
1232       ais'2 cis, |
1233       fis8 b a4 cis2 |
1234     }
1235   >>
1236 }
1237
1238 musicB = {
1239   \clef bass
1240   \new Voice {
1241     \voiceTwo \relative c' {
1242       <fis, a cis>4
1243       \change Staff = up
1244       cis'
1245       \change Staff = down
1246       <fis, a>
1247       \change Staff = up
1248       dis' |
1249       \change Staff = down
1250       <fis, a cis>4 gis <f a d>2 |
1251     }
1252   }
1253 }
1254
1255 \new PianoStaff {
1256   <<
1257     \context Staff = "up" {
1258       #(set-accidental-style 'modern-cautionary)
1259       \musicA
1260     }
1261     \context Staff = "down" {
1262       #(set-accidental-style 'modern-cautionary)
1263       \musicB
1264     }
1265   >>
1266 }
1267 @end lilypond
1268
1269 @item modern-voice
1270 @funindex modern-voice
1271
1272 This rule is used for multivoice accidentals to be read both by
1273 musicians playing one voice and musicians playing all voices.
1274 Accidentals are typeset for each voice, but they @emph{are}
1275 canceled across voices in the same @code{Staff}.  Hence,
1276 the@tie{}@code{a} in the last measure is canceled because the
1277 previous cancellation was in a different voice, and
1278 the@tie{}@code{d} in the lower staff is canceled because of the
1279 accidental in a different voice in the previous measure:
1280
1281
1282 @lilypond[quote,ragged-right]
1283 musicA = {
1284   <<
1285     \relative c' {
1286       cis'8 fis, d'4 <a cis>8 f bis4 |
1287       cis2. <c, g'>4 |
1288     }
1289     \\
1290     \relative c' {
1291       ais'2 cis, |
1292       fis8 b a4 cis2 |
1293     }
1294   >>
1295 }
1296
1297 musicB = {
1298   \clef bass
1299   \new Voice {
1300     \voiceTwo \relative c' {
1301       <fis, a cis>4
1302       \change Staff = up
1303       cis'
1304       \change Staff = down
1305       <fis, a>
1306       \change Staff = up
1307       dis' |
1308       \change Staff = down
1309       <fis, a cis>4 gis <f a d>2 |
1310     }
1311   }
1312 }
1313
1314 \new PianoStaff {
1315   <<
1316     \context Staff = "up" {
1317       #(set-accidental-style 'modern-voice)
1318       \musicA
1319     }
1320     \context Staff = "down" {
1321       #(set-accidental-style 'modern-voice)
1322       \musicB
1323     }
1324   >>
1325 }
1326 @end lilypond
1327
1328 @funindex modern-voice-cautionary
1329 @item modern-voice-cautionary
1330
1331 This rule is the same as @code{modern-voice}, but with the extra
1332 accidentals (the ones not typeset by @code{voice}) typeset
1333 as cautionaries.  Even though all accidentals typeset by
1334 @code{default} @emph{are} typeset with this rule,
1335 some of them are typeset as cautionaries.
1336
1337 @lilypond[quote,ragged-right]
1338 musicA = {
1339   <<
1340     \relative c' {
1341       cis'8 fis, d'4 <a cis>8 f bis4 |
1342       cis2. <c, g'>4 |
1343     }
1344     \\
1345     \relative c' {
1346       ais'2 cis, |
1347       fis8 b a4 cis2 |
1348     }
1349   >>
1350 }
1351
1352 musicB = {
1353   \clef bass
1354   \new Voice {
1355     \voiceTwo \relative c' {
1356       <fis, a cis>4
1357       \change Staff = up
1358       cis'
1359       \change Staff = down
1360       <fis, a>
1361       \change Staff = up
1362       dis' |
1363       \change Staff = down
1364       <fis, a cis>4 gis <f a d>2 |
1365     }
1366   }
1367 }
1368
1369 \new PianoStaff {
1370   <<
1371     \context Staff = "up" {
1372       #(set-accidental-style 'modern-voice-cautionary)
1373       \musicA
1374     }
1375     \context Staff = "down" {
1376       #(set-accidental-style 'modern-voice-cautionary)
1377       \musicB
1378     }
1379   >>
1380 }
1381 @end lilypond
1382
1383 @item piano
1384 @funindex piano accidentals
1385
1386 This rule reflects twentieth-century practice for piano notation.
1387 Its behavior is very similar to @code{modern} style, but here
1388 accidentals also get canceled across the staves in the same
1389 GrandStaff or PianoStaff, hence all the cancellations of the final
1390 notes.
1391
1392 This accidental style applies to the current @code{GrandStaff} or
1393 @code{PianoStaff} by default.
1394
1395 @lilypond[quote,ragged-right]
1396 musicA = {
1397   <<
1398     \relative c' {
1399       cis'8 fis, d'4 <a cis>8 f bis4 |
1400       cis2. <c, g'>4 |
1401     }
1402     \\
1403     \relative c' {
1404       ais'2 cis, |
1405       fis8 b a4 cis2 |
1406     }
1407   >>
1408 }
1409
1410 musicB = {
1411   \clef bass
1412   \new Voice {
1413     \voiceTwo \relative c' {
1414       <fis, a cis>4
1415       \change Staff = up
1416       cis'
1417       \change Staff = down
1418       <fis, a>
1419       \change Staff = up
1420       dis' |
1421       \change Staff = down
1422       <fis, a cis>4 gis <f a d>2 |
1423     }
1424   }
1425 }
1426
1427 \new PianoStaff {
1428   <<
1429     \context Staff = "up" {
1430       #(set-accidental-style 'piano)
1431       \musicA
1432     }
1433     \context Staff = "down" {
1434       \musicB
1435     }
1436   >>
1437 }
1438 @end lilypond
1439
1440 @item piano-cautionary
1441 @funindex #(set-accidental-style 'piano-cautionary)
1442
1443 Same as @code{#(set-accidental-style 'piano)} but with the extra
1444 accidentals typeset as cautionaries.
1445
1446 @lilypond[quote,ragged-right]
1447 musicA = {
1448   <<
1449     \relative c' {
1450       cis'8 fis, d'4 <a cis>8 f bis4 |
1451       cis2. <c, g'>4 |
1452     }
1453     \\
1454     \relative c' {
1455       ais'2 cis, |
1456       fis8 b a4 cis2 |
1457     }
1458   >>
1459 }
1460
1461 musicB = {
1462   \clef bass
1463   \new Voice {
1464     \voiceTwo \relative c' {
1465       <fis, a cis>4
1466       \change Staff = up
1467       cis'
1468       \change Staff = down
1469       <fis, a>
1470       \change Staff = up
1471       dis' |
1472       \change Staff = down
1473       <fis, a cis>4 gis <f a d>2 |
1474     }
1475   }
1476 }
1477
1478 \new PianoStaff {
1479   <<
1480     \context Staff = "up" {
1481       #(set-accidental-style 'piano-cautionary)
1482       \musicA
1483     }
1484     \context Staff = "down" {
1485       \musicB
1486     }
1487   >>
1488 }
1489 @end lilypond
1490
1491 @item no-reset
1492 @funindex no-reset accidental style
1493
1494 This is the same as @code{default} but with accidentals lasting
1495 @q{forever} and not only within the same measure:
1496
1497 @lilypond[quote,ragged-right]
1498 musicA = {
1499   <<
1500     \relative c' {
1501       cis'8 fis, d'4 <a cis>8 f bis4 |
1502       cis2. <c, g'>4 |
1503     }
1504     \\
1505     \relative c' {
1506       ais'2 cis, |
1507       fis8 b a4 cis2 |
1508     }
1509   >>
1510 }
1511
1512 musicB = {
1513   \clef bass
1514   \new Voice {
1515     \voiceTwo \relative c' {
1516       <fis, a cis>4
1517       \change Staff = up
1518       cis'
1519       \change Staff = down
1520       <fis, a>
1521       \change Staff = up
1522       dis' |
1523       \change Staff = down
1524       <fis, a cis>4 gis <f a d>2 |
1525     }
1526   }
1527 }
1528
1529 \new PianoStaff {
1530   <<
1531     \context Staff = "up" {
1532       #(set-accidental-style 'no-reset)
1533       \musicA
1534     }
1535     \context Staff = "down" {
1536       #(set-accidental-style 'no-reset)
1537       \musicB
1538     }
1539   >>
1540 }
1541 @end lilypond
1542
1543 @item forget
1544 @funindex forget accidental style
1545
1546 This is the opposite of @code{no-reset}: Accidentals are not
1547 remembered at all -- and hence all accidentals are typeset
1548 relative to the key signature, regardless of what was before in
1549 the music:
1550
1551 @lilypond[quote,ragged-right]
1552 musicA = {
1553   <<
1554     \relative c' {
1555       cis'8 fis, d'4 <a cis>8 f bis4 |
1556       cis2. <c, g'>4 |
1557     }
1558     \\
1559     \relative c' {
1560       ais'2 cis, |
1561       fis8 b a4 cis2 |
1562     }
1563   >>
1564 }
1565
1566 musicB = {
1567   \clef bass
1568   \new Voice {
1569     \voiceTwo \relative c' {
1570       <fis, a cis>4
1571       \change Staff = up
1572       cis'
1573       \change Staff = down
1574       <fis, a>
1575       \change Staff = up
1576       dis' |
1577       \change Staff = down
1578       <fis, a cis>4 gis <f a d>2 |
1579     }
1580   }
1581 }
1582
1583 \new PianoStaff {
1584   <<
1585     \context Staff = "up" {
1586       #(set-accidental-style 'forget)
1587       \musicA
1588     }
1589     \context Staff = "down" {
1590       #(set-accidental-style 'forget)
1591       \musicB
1592     }
1593   >>
1594 }
1595 @end lilypond
1596 @end table
1597
1598 @commonprop
1599
1600 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1601 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
1602
1603
1604 @seealso
1605
1606 Snippets: @lsrdir{Pitches}.
1607
1608 Internals Reference: @internalsref{Accidental_engraver},
1609 @internalsref{Accidental}, @internalsref{AccidentalSuggestion},
1610 @internalsref{AccidentalPlacement}, @internalsref{GrandStaff} and
1611 @internalsref{PianoStaff}, @internalsref{Staff}.
1612
1613
1614 @refbugs
1615
1616 Simultaneous notes are considered to be entered in sequential
1617 mode.  This means that in a chord the accidentals are typeset as
1618 if the notes in the chord happen one at a time, in the order in
1619 which they appear in the input file.  This is a problem when
1620 accidentals in a chord depend on each other, which does not happen
1621 for the default accidental style.  The problem can be solved by
1622 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
1623 problematic notes.
1624
1625
1626 @node Ambitus
1627 @unnumberedsubsubsec Ambitus
1628 @cindex ambitus
1629
1630 The term @notation{ambitus} or @notation{ambit} denotes a range of
1631 pitches for a given voice in a part of music.  It may also denote
1632 the pitch range that a musical instrument is capable of playing.
1633 Ambits are printed on vocal parts so that performers can easily
1634 determine if it matches their capabilities.
1635
1636 Ambits are denoted at the beginning of a piece near the initial
1637 clef.  The range is graphically specified by two note heads that
1638 represent the minimum and maximum pitch.  Accidentals are only
1639 printed if they are not part of the key signature.
1640
1641 @lilypond[verbatim,quote,ragged-right]
1642 \layout {
1643   \context {
1644     \Voice
1645     \consists Ambitus_engraver
1646   }
1647 }
1648
1649 \relative c'' {
1650   aes c e2 cis,2
1651 }
1652 @end lilypond
1653
1654
1655 @commonprop
1656
1657 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1658 {adding-ambiti-per-voice.ly}
1659
1660 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1661 {ambiti-multiple-voices.ly}
1662
1663
1664 @seealso
1665
1666 Snippets: @lsrdir{Pitches}.
1667
1668 Internals Reference: @internalsref{Ambitus},
1669 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
1670 @internalsref{AmbitusAccidental}, @internalsref{Ambitus_engraver},
1671 @internalsref{Staff}, @internalsref{Voice}.
1672
1673
1674 @refbugs
1675
1676 There is no collision handling in the case of multiple per-voice
1677 ambitus.
1678
1679
1680 @node Note heads
1681 @subsection Note heads
1682
1683 @menu
1684 * Special note heads::          
1685 * Easy notation note heads::    
1686 * Shape note heads::            
1687 * Improvisation::               
1688 @end menu
1689
1690 @node Special note heads
1691 @unnumberedsubsubsec Special note heads
1692
1693 @cindex note heads, special
1694
1695 Different note heads are used by various instruments for various
1696 meanings -- crosses are used for @q{parlato} with vocalists,
1697 stopped notes on guitar; diamonds are used for harmonics on string
1698 instruments, etc.  There is a shorthand (@code{\harmonic}) for
1699 diamond shapes; the other note head styles are produced by
1700 tweaking the property:
1701
1702 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
1703 c4 d
1704 \override NoteHead #'style = #'cross
1705 e f
1706 \revert NoteHead #'style
1707 e d <c f\harmonic> <d a'\harmonic>
1708 @end lilypond
1709
1710 @noindent
1711 To see all note head styles, please see @ref{Note head styles}.
1712
1713
1714 @seealso
1715
1716 Snippets: @lsrdir{Pitches}.
1717
1718 Notation Reference: @ref{Note head styles}.
1719
1720 Internals Reference: @internalsref{NoteHead},
1721 @internalsref{LedgerLineSpanner}.
1722
1723
1724 @node Easy notation note heads
1725 @unnumberedsubsubsec Easy notation note heads
1726
1727 @cindex note heads, practice
1728 @cindex note heads, easy notation
1729 @cindex easy notation
1730 @cindex Hal Leonard
1731
1732 The @q{easy play} note head includes a note name inside the head.
1733 It is used in music for beginners
1734
1735 @lilypond[verbatim,quote,ragged-right]
1736 #(set-global-staff-size 26)
1737 \relative c' {
1738   \setEasyHeads
1739   c2 e4 f
1740   g1
1741 }
1742 @end lilypond
1743
1744 The command @code{\setEasyHeads} overrides settings for the
1745 @code{NoteHead} object.  To make the letters readable, it
1746 has to be printed in a large font size.  To print with a larger
1747 font, see @ref{Setting the staff size}.
1748
1749 @refcommands
1750
1751 @funindex \setEasyHeads
1752 @code{\setEasyHeads}
1753
1754 @seealso
1755
1756 Notation Reference: @ref{Setting the staff size}.
1757
1758 Snippets: @lsrdir{Pitches},
1759
1760 Internals Reference: @internalsref{NoteHead}.
1761
1762
1763 @node Shape note heads
1764 @unnumberedsubsubsec Shape note heads
1765
1766 @cindex note heads, shape
1767 @funindex \key
1768 @funindex shapeNoteStyles
1769 @funindex \aikenHeads
1770 @funindex \sacredHarpHeads
1771
1772 In shape note head notation, the shape of the note head
1773 corresponds to the harmonic function of a note in the scale.  This
1774 notation was popular in nineteenth-century American song books.
1775
1776 Shape note heads can be produced by setting @code{\aikenHeads} or
1777 @code{\sacredHarpHeads}, depending on the style desired.
1778
1779 @lilypond[verbatim,fragment,quote,ragged-right,relative=1]
1780 \aikenHeads
1781 c8 d4 e8 a2 g1
1782 \sacredHarpHeads
1783 c,8 d4 e8 a2 g1
1784 @end lilypond
1785
1786 Shapes are typeset according to the step in the scale, where
1787 the base of the scale is determined by the @code{\key} command.
1788
1789 @commonprop
1790
1791 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1792 {applying-noteheads-styles-depending-on-the-step-of-the-scale.ly}
1793
1794
1795 @seealso
1796
1797 Snippets: @lsrdir{Pitches}.
1798
1799
1800 @node Improvisation
1801 @unnumberedsubsubsec Improvisation
1802
1803 @cindex improvisation
1804 @cindex slashed note heads
1805 @cindex note heads, improvisation
1806 @cindex note heads, slashed
1807
1808 Improvisation is sometimes denoted with slashed note heads, where
1809 the performer may choose any pitch but should play the specified
1810 rhythm.  Such note heads can be created:
1811
1812 @lilypond[verbatim,quote,ragged-right]
1813 \new Voice \with {
1814   \consists Pitch_squash_engraver
1815 } \transpose c c' {
1816   e8 e g a a16( bes) a8 g
1817   \improvisationOn
1818   e8
1819   ~e2~e8 f4 fis8
1820   ~fis2
1821   \improvisationOff
1822   a16(bes) a8 g e
1823 }
1824 @end lilypond
1825
1826 @seealso
1827
1828 Snippets: @lsrdir{Pitches}.
1829
1830 Internals Reference: @internalsref{Pitch_squash_engraver},
1831 @internalsref{Voice}.
1832
1833