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