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