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