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