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