]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/notation/pitches.itely
Merge branch 'lilypond/translation' of ssh://git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / Documentation / notation / 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 @c \version "2.12.0"
10
11
12 @node Pitches
13 @section Pitches
14
15 @lilypondfile[quote]{pitches-headword.ly}
16
17 This section discusses how to specify the pitch of notes.  There
18 are three steps to this process: input, modification, and output.
19
20 @menu
21 * Writing pitches::
22 * Changing multiple pitches::
23 * Displaying pitches::
24 * Note heads::
25 @end menu
26
27
28 @node Writing pitches
29 @subsection Writing pitches
30
31 This section discusses how to input pitches.  There are two
32 different ways to place notes in octaves: absolute and relative
33 mode.  In most cases, relative mode will be more convenient.
34
35 @menu
36 * Absolute octave entry::
37 * Relative octave entry::
38 * Accidentals::
39 * Note names in other languages::
40 * Non-Western note names and accidentals::
41 @end menu
42
43
44 @node Absolute octave entry
45 @unnumberedsubsubsec Absolute octave entry
46
47 @cindex pitch names
48 @cindex pitches
49 @cindex absolute
50 @cindex absolute octave specification
51 @cindex octave specification, absolute
52 @cindex absolute octave entry
53 @cindex octave entry, absolute
54
55 A pitch name is specified using lowercase letters@tie{}@code{a}
56 through@tie{}@code{g}.  The note names @code{c} to @code{b} are
57 engraved in the octave below middle C.
58
59 @c don't use c' here.
60 @lilypond[verbatim,quote,fragment]
61 \clef bass
62 c d e f
63 g a b c
64 d e f g
65 @end lilypond
66
67 @cindex octave changing mark
68
69 @funindex '
70 @funindex ,
71
72 Other octaves may be specified with a single quote@tie{}(@code{'})
73 or comma@tie{}(@code{,}) character.  Each@tie{}@code{'} raises the
74 pitch by one octave; each@tie{}@code{,} lowers the pitch by an
75 octave.
76
77 @lilypond[verbatim,quote,fragment]
78 \clef treble
79 c' c'' e' g
80 d'' d' d c
81 \clef bass
82 c, c,, e, g
83 d,, d, d c
84 @end lilypond
85
86
87 @seealso
88 Music Glossary:
89 @rglos{Pitch names}.
90
91 Snippets:
92 @rlsr{Pitches}.
93
94
95 @node Relative octave entry
96 @unnumberedsubsubsec Relative octave entry
97
98 @cindex relative
99 @cindex relative octave entry
100 @cindex octave entry, relative
101 @cindex relative octave specification
102 @cindex ocatve specification, relative
103
104 @funindex relative
105 @funindex \relative
106
107 When octaves are specified in absolute mode it is easy to
108 accidentally put a pitch in the wrong octave.  Relative octave
109 mode reduces these errors since most of the time it is not
110 necessary to indicate any octaves at all.  Furthermore, in
111 absolute mode a single mistake may be difficult to spot, while in
112 relative mode a single error puts the rest of the piece off by one
113 octave.
114
115 @example
116 \relative @var{startpitch} @var{musicexpr}
117 @end example
118
119 In relative mode, each note is assumed to be as close to the
120 previous note as possible.  This means that the octave of each
121 pitch inside @var{musicexpr} is calculated as follows:
122
123 @itemize
124 @item
125 If no octave changing mark is used on a pitch, its octave is
126 calculated so that the interval with the previous note is less
127 than a fifth.  This interval is determined without considering
128 accidentals.
129
130 @item
131 An octave changing mark@tie{}@code{'} or@tie{}@code{,} can be
132 added to respectively raise or lower a pitch by an extra octave,
133 relative to the pitch calculated without an octave mark.
134
135 @item
136 Multiple octave changing marks can be used.  For example,
137 @code{''}@tie{}and@tie{}@code{,,} will alter the pitch by two
138 octaves.
139
140 @item
141 The pitch of the first note is relative to
142 @code{@var{startpitch}}.  @var{startpitch} is specified in
143 absolute octave mode, and it is recommended that it be a octave of
144 @code{c}.
145
146 @end itemize
147
148 Here is the relative mode shown in action:
149
150 @lilypond[verbatim,quote]
151 \relative c {
152   \clef bass
153   c d e f
154   g a b c
155   d e f g
156 }
157 @end lilypond
158
159 Octave changing marks are used for intervals greater than a
160 fourth:
161
162 @lilypond[verbatim,quote]
163 \relative c'' {
164   c g c f,
165   c' a, e'' c
166 }
167 @end lilypond
168
169 A note sequence without a single octave mark can nevertheless span
170 large intervals:
171
172 @lilypond[verbatim,quote]
173 \relative c {
174   c f b e
175   a d g c
176 }
177 @end lilypond
178
179 When @code{\relative} blocks are nested, the innermost
180 @code{\relative} block applies.
181
182 @lilypond[verbatim,quote]
183 \relative c' {
184   c d e f
185   \relative c'' {
186     c d e f
187   }
188 }
189 @end lilypond
190
191 @code{\relative} has no effect on @code{\chordmode} blocks.
192
193 @lilypond[verbatim,quote]
194 \new Staff {
195   \relative c''' {
196     \chordmode { c1 }
197   }
198   \chordmode { c1 }
199 }
200 @end lilypond
201
202 @code{\relative} is not allowed inside of @code{\chordmode} blocks.
203
204 Music inside a @code{\transpose} block is absolute unless a
205 @code{\relative} is included.
206
207 @lilypond[verbatim,quote]
208 \relative c' {
209   d e
210   \transpose f g {
211     d e
212     \relative c' {
213       d e
214     }
215   }
216 }
217 @end lilypond
218
219
220 @cindex chords and relative octave entry
221 @cindex relative octave entry and chords
222
223 If the preceding item is a chord, the first note of the chord is
224 used as the reference point for the octave placement of a
225 following note or chord.  Inside chords, the next note is always
226 relative to the preceding one.  Examine the next example
227 carefully, paying attention to the @code{c} notes.
228
229 @lilypond[verbatim,quote]
230 \relative c' {
231   c
232   <c e g>
233   <c' e g'>
234   <c, e, g''>
235 }
236 @end lilypond
237
238 As explained above, the octave of pitches is calculated only with
239 the note names, regardless of any alterations.  Therefore, an
240 E-double-sharp following a B will be placed higher, while an
241 F-double-flat will be placed lower.  In other words, a
242 double-augmented fourth is considered a smaller interval than a
243 double-diminished fifth, regardless of the number of semitones
244 that each interval contains.
245
246 @lilypond[verbatim,quote]
247 \relative c'' {
248   c2 fis
249   c2 ges
250   b2 eisis
251   b2 feses
252 }
253 @end lilypond
254
255
256 @seealso
257 Music Glossary:
258 @rglos{fifth},
259 @rglos{interval},
260 @rglos{Pitch names}.
261
262 Notation Reference:
263 @ref{Octave checks}.
264
265 Snippets:
266 @rlsr{Pitches}.
267
268 Internals Reference:
269 @rinternals{RelativeOctaveMusic}.
270
271
272 @cindex relative octave entry and transposition
273 @cindex transposition and relative octave entry
274
275 @funindex \transpose
276 @funindex transpose
277 @funindex \chordmode
278 @funindex chordmode
279 @funindex \relative
280 @funindex relative
281
282
283 @c DEPRECATED
284 If no @var{startpitch} is specified for @code{\relative},
285 then@tie{}@code{c'} is assumed.  However, this is a deprecated
286 option and may disappear in future versions, so its use is
287 discouraged.
288
289
290
291 @node Accidentals
292 @unnumberedsubsubsec Accidentals
293
294 @cindex accidental
295 @cindex key signature
296 @cindex clef
297
298 @c duplicated in Key signature and Accidentals
299 @warning{New users are sometimes confused about accidentals and
300 key signatures.  In LilyPond, note names are the raw input; key
301 signatures and clefs determine how this raw input is displayed.
302 An unaltered note like@tie{}@code{c} means @q{C natural},
303 regardless of the key signature or clef.  For more information,
304 see @rlearning{Accidentals and key signatures}.}
305
306 @cindex note names, Dutch
307 @cindex note names, default
308 @cindex default note names
309 @cindex sharp
310 @cindex flat
311 @cindex double sharp
312 @cindex sharp, double
313 @cindex double flat
314 @cindex flat, double
315 @cindex natural sign
316 @cindex natural pitch
317
318 A @notation{sharp} pitch is made by adding @code{is} to the note
319 name, and a @notation{flat} pitch by adding @code{es}.  As you
320 might expect, a @notation{double sharp} or @notation{double flat}
321 is made by adding @code{isis} or @code{eses}.  This syntax is
322 derived from Dutch note naming conventions.  To use other names
323 for accidentals, see @ref{Note names in other languages}.
324
325 @lilypond[verbatim,quote,relative=2]
326 ais1 aes aisis aeses
327 @end lilypond
328
329 A natural will cancel the effect of an accidental or key
330 signature.  However, naturals are not encoded into the note name
331 syntax with a suffix; a natural pitch is shown as a simple note
332 name:
333
334 @lilypond[verbatim,quote,relative=2]
335 a4 aes a2
336 @end lilypond
337
338 @cindex quarter tones
339 @cindex semi-flats
340 @cindex semi-sharps
341
342 Quarter tones may be added; the following is a series of Cs with
343 increasing pitches:
344
345 @lilypond[verbatim,quote,relative=2]
346 ceseh1 ces ceh c cih cis cisih
347 @end lilypond
348
349
350
351 @cindex accidental, reminder
352 @cindex accidental, cautionary
353 @cindex accidental, parenthesized
354 @cindex reminder accidental
355 @cindex cautionary accidental
356 @cindex parenthesized accidental
357
358 @funindex ?
359 @funindex !
360
361
362 Normally accidentals are printed automatically, but you may also
363 print them manually.  A reminder accidental can be forced by
364 adding an exclamation mark@tie{}@code{!} after the pitch.  A
365 cautionary accidental (i.e., an accidental within parentheses) can
366 be obtained by adding the question mark@tie{}@code{?} after the
367 pitch.  These extra accidentals can also be used to produce
368 natural signs.
369
370 @lilypond[verbatim,quote,relative=2]
371 cis cis cis! cis? c c c! c?
372 @end lilypond
373
374 @cindex accidental on tied note
375 @cindex tied note, accidental
376
377 Accidentals on tied notes are only printed at the beginning of a
378 new system:
379
380 @lilypond[verbatim,quote,relative=2]
381 cis1 ~ cis ~
382 \break
383 cis
384 @end lilypond
385
386
387 @snippets
388
389 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
390 {preventing-extra-naturals-from-being-automatically-added.ly}
391
392
393 @seealso
394 Music Glossary:
395 @rglos{sharp},
396 @rglos{flat},
397 @rglos{double sharp},
398 @rglos{double flat},
399 @rglos{Pitch names},
400 @rglos{quarter tone}.
401
402 Learning Manual:
403 @rlearning{Accidentals and key signatures}.
404
405 Notation Reference:
406 @ref{Automatic accidentals},
407 @ref{Annotational accidentals (musica ficta)},
408 @ref{Note names in other languages}.
409
410 Snippets:
411 @rlsr{Pitches}.
412
413 Internals Reference:
414 @rinternals{Accidental_engraver},
415 @rinternals{Accidental},
416 @rinternals{AccidentalCautionary},
417 @rinternals{accidental-interface}.
418
419
420 @cindex accidental, quarter-tone
421 @cindex quarter-tone accidental
422
423 @knownissues
424
425 There are no generally accepted standards for denoting
426 quarter-tone accidentals, so LilyPond's symbol does not conform to
427 any standard.
428
429
430
431 @node Note names in other languages
432 @unnumberedsubsubsec Note names in other languages
433
434 @cindex note names, other languages
435 @cindex pitch names, other languages
436 @cindex language, note names in other
437 @cindex language, pitch names in other
438
439 There are predefined sets of note and accidental names for various
440 other languages.  To use them, include the language-specific init
441 file listed below.  For example, to use English note names, add
442 @code{@w{\include "english.ly"}} to the input file.
443
444 @warning{Because some other include files (such as @code{@w{predefined-fretboards.ly}})
445 use default (Nederlands) note names, the @code{@bs{}include}
446 command for the language file should be placed after all other
447 LilyPond distribution files.}
448
449 The available language files and the note names they define are:
450
451 @quotation
452 @multitable {@file{nederlands.ly}} {do re mi fa sol la sib si}
453 @headitem Language File
454   @tab Note Names
455 @item @file{nederlands.ly}
456   @tab c d e f g a bes b
457 @item @file{arabic.ly}
458   @tab do re mi fa sol la sib si
459 @item @file{catalan.ly}
460   @tab do re mi fa sol la sib si
461 @item @file{deutsch.ly}
462   @tab c d e f g a b h
463 @item @file{english.ly}
464   @tab c d e f g a bf b
465 @item @file{espanol.ly}
466   @tab do re mi fa sol la sib si
467 @item @file{italiano.ly}
468   @tab do re mi fa sol la sib si
469 @item @file{norsk.ly}
470   @tab c d e f g a b h
471 @item @file{portugues.ly}
472   @tab do re mi fa sol la sib si
473 @item @file{suomi.ly}
474   @tab c d e f g a b h
475 @item @file{svenska.ly}
476   @tab c d e f g a b h
477 @item @file{vlaams.ly}
478   @tab do re mi fa sol la sib si
479 @end multitable
480 @end quotation
481
482 @noindent
483 and the accidental suffixes they define are:
484
485 @quotation
486 @multitable {@file{nederlands.ly}} {-s/-sharp} {-ess/-es} {-ss/-x/-sharpsharp} {-essess/-eses}
487 @headitem Language File
488   @tab sharp @tab flat @tab double sharp @tab double flat
489 @item @file{nederlands.ly}
490   @tab -is @tab -es @tab -isis @tab -eses
491 @item @file{arabic.ly}
492   @tab -d @tab -b @tab -dd @tab -bb
493 @item @file{catalan.ly}
494   @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
495 @item @file{deutsch.ly}
496   @tab -is @tab -es @tab -isis @tab -eses
497 @item @file{english.ly}
498   @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
499     @tab -ff/-flatflat
500 @item @file{espanol.ly}
501   @tab -s @tab -b @tab -ss/-x @tab -bb
502 @item @file{italiano.ly}
503   @tab -d @tab -b @tab -dd @tab -bb
504 @item @file{norsk.ly}
505   @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
506     @tab -essess/-eses
507 @item @file{portugues.ly}
508   @tab -s @tab -b @tab -ss @tab -bb
509 @item @file{suomi.ly}
510   @tab -is @tab -es @tab -isis @tab -eses
511 @item @file{svenska.ly}
512   @tab -iss @tab -ess @tab -ississ @tab -essess
513 @item @file{vlaams.ly}
514   @tab -k @tab -b @tab -kk @tab -bb
515 @end multitable
516 @end quotation
517
518 In Dutch, @code{aes} is contracted to @code{as}, but both forms
519 are accepted in LilyPond.  Similarly, both @code{es} and
520 @code{ees} are accepted.  This also applies to
521 @code{aeses}@tie{}/@tie{}@code{ases} and
522 @code{eeses}@tie{}/@tie{}@code{eses}.  Sometimes only these
523 contracted names are defined in the corresponding language files.
524
525 @lilypond[verbatim,quote,relative=2]
526 a2 as e es a ases e eses
527 @end lilypond
528
529
530 @cindex microtones
531 @cindex semi-sharp
532 @cindex semi-flat
533 @cindex sesqui-sharp
534 @cindex sesqui-flat
535
536 Some music uses microtones whose alterations are fractions of a
537 @q{normal} sharp or flat.  The note names for quarter-tones
538 defined in the various language files are listed in the following
539 table.  Here the prefixes @notation{semi-} and @notation{sesqui-}
540 mean @q{half} and @q{one and a half}, respectively.  For the other
541 languages, no special names have been defined yet.
542
543 @quotation
544 @multitable {@file{nederlands.ly}} {@b{semi-sharp}} {@b{semi-flat}} {@b{sesqui-sharp}} {@b{sesqui-flat}}
545 @headitem Language File
546   @tab semi-sharp @tab semi-flat @tab sesqui-sharp @tab sesqui-flat
547
548 @item @file{nederlands.ly}
549   @tab -ih @tab -eh @tab -isih @tab -eseh
550 @item @file{arabic.ly}
551   @tab -sd @tab -sb @tab -dsd @tab -bsb
552 @item @file{deutsch.ly}
553   @tab -ih @tab -eh @tab -isih @tab -eseh
554 @item @file{english.ly}
555   @tab -qs @tab -qf @tab -tqs @tab -tqf
556 @item @file{espanol.ly}
557   @tab -cs @tab -cb @tab -tcs @tab -tcb
558 @item @file{italiano.ly}
559   @tab -sd @tab -sb @tab -dsd @tab -bsb
560 @item @file{portugues.ly}
561   @tab -sqt @tab -bqt @tab -stqt @tab -btqt
562 @end multitable
563 @end quotation
564
565
566 @seealso
567 Music Glossary:
568 @rglos{Pitch names}.
569
570 Snippets:
571 @rlsr{Pitches}.
572
573
574 @node Non-Western note names and accidentals
575 @unnumberedsubsubsec Non-Western note names and accidentals
576
577 Many non-Western musics (and some Western folk and
578 traditional musics) employ alternative or extended tuning
579 systems that do not fit readily into standard classical
580 notation.
581
582 In some cases standard notation is still used, with the
583 pitch differences being implicit.  For example, Arabic
584 music is notated with standard semitone and quarter-tone
585 accidentals, with the precise pitch alterations being
586 determined by context.  Others require extended or unique
587 notations.
588
589 @notation{Turkish classical music}, or Ottoman music,
590 employs melodic forms known as @notation{makamlar}, whose
591 intervals are based on 1/9 divisions of the whole tone.
592 From a modern notational point of view, it is convenient
593 to use the standard Western staff notes (c, d, e, ...)
594 with special accidentals unique to Turkish music.  These
595 accidentals are defined in @file{makam.ly} (to locate this
596 file on your system, see
597 @rlearning{Other sources of information}).  The following
598 table gives their names, the accidental suffix that must
599 be added to notes, and their pitch alteration as a
600 fraction of one whole tone.
601
602 @c TODO: can we include the actual accidentals in this table?
603 @quotation
604 @multitable {@b{büyük mücenneb (sharp)}} {@b{suffix}} {@b{pitch alteration}}
605 @headitem Accidental name
606   @tab suffix @tab pitch alteration
607
608 @item büyük mücenneb (sharp)
609   @tab -bm @tab +8/9
610 @item kücük mücenneb (sharp)
611   @tab -k @tab +5/9
612 @item bakiye (sharp)
613   @tab -b @tab +4/9
614 @item koma (sharp)
615   @tab -c @tab +1/9
616
617 @item koma (flat)
618   @tab -fc @tab -1/9
619 @item bakiye (flat)
620   @tab -fb @tab -4/9
621 @item kücük mücenneb (flat)
622   @tab -fk @tab -5/9
623 @item büyük mücenneb (flat)
624   @tab -fbm @tab -8/9
625 @end multitable
626 @end quotation
627
628 For further information on Turkish classical music and
629 makamlar, see @ref{Turkish classical music}.
630
631
632 @snippets
633
634 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
635 {makam-example.ly}
636
637
638 @node Changing multiple pitches
639 @subsection Changing multiple pitches
640
641 This section discusses how to modify pitches.
642
643 @menu
644 * Octave checks::
645 * Transpose::
646 @end menu
647
648 @node Octave checks
649 @unnumberedsubsubsec Octave checks
650
651 @cindex octave correction
652 @cindex octave check
653 @cindex control pitch
654
655 @funindex =
656 @funindex \octaveCheck
657 @funindex octaveCheck
658 @funindex controlpitch
659
660 In relative mode, it is easy to forget an octave changing mark.
661 Octave checks make such errors easier to find by displaying a
662 warning and correcting the octave if a note is found in an
663 unexpected octave.
664
665 To check the octave of a note, specify the absolute octave after
666 the @code{=}@tie{}symbol.  This example will generate a warning
667 (and change the pitch) because the second note is the absolute
668 octave @code{d''} instead of @code{d'} as indicated by the octave
669 correction.
670
671 @lilypond[verbatim,quote]
672 \relative c'' {
673   c2 d='4 d
674   e2 f
675 }
676 @end lilypond
677
678 The octave of notes may also be checked with the
679 @code{\octaveCheck}@tie{}@var{controlpitch} command.
680 @var{controlpitch} is specified in absolute mode.  This checks
681 that the interval between the previous note and the
682 @var{controlpitch} is within a fourth (i.e., the normal
683 calculation of relative mode).  If this check fails, a warning is
684 printed, but the previous note is not changed.  Future notes are
685 relative to the @var{controlpitch}.
686
687 @lilypond[verbatim,quote]
688 \relative c'' {
689   c2 d
690   \octaveCheck c'
691   e2 f
692 }
693 @end lilypond
694
695 Compare the two bars below.  The first and third @code{\octaveCheck}
696 checks fail, but the second one does not fail.
697
698 @lilypond[verbatim,quote]
699 \relative c'' {
700   c4 f g f
701
702   c4
703   \octaveCheck c'
704   f
705   \octaveCheck c'
706   g
707   \octaveCheck c'
708   f
709 }
710 @end lilypond
711
712
713 @seealso
714 Snippets:
715 @rlsr{Pitches}.
716
717 Internals Reference:
718 @rinternals{RelativeOctaveCheck}.
719
720
721 @node Transpose
722 @unnumberedsubsubsec Transpose
723
724 @cindex transpose
725 @cindex transposing
726 @cindex transposition
727 @cindex transposition of pitches
728 @cindex transposition of notes
729 @cindex pitches, transposition of
730 @cindex notes, transposition of
731
732 @funindex \transpose
733 @funindex transpose
734
735 A music expression can be transposed with @code{\transpose}.  The
736 syntax is
737
738 @example
739 \transpose @var{frompitch} @var{topitch} @var{musicexpr}
740 @end example
741
742 @noindent
743 This means that @var{musicexpr} is transposed by the interval
744 between the pitches @var{frompitch} and @var{topitch}: any note
745 with pitch @var{frompitch} is changed to @var{topitch} and any
746 other note is transposed by the same interval.  Both pitches are
747 entered in absolute mode.
748
749 @warning{Music inside a @code{@bs{}transpose} block is absolute
750 unless a @code{@bs{}relative} is included in the block.}
751
752 Consider a piece written in the key of D-major.  It can be
753 transposed up to E-major; note that the key signature is
754 automatically transposed as well.
755
756 @lilypond[verbatim,quote]
757 \transpose d e {
758   \relative c' {
759     \key d \major
760     d4 fis a d
761   }
762 }
763 @end lilypond
764
765 @cindex transposing instruments
766 @cindex instruments, transposing
767
768 If a part written in C (normal @notation{concert pitch}) is to be
769 played on the A clarinet (for which an A is notated as a C and
770 thus sounds a minor third lower than notated), the appropriate
771 part will be produced with:
772
773 @lilypond[verbatim,quote]
774 \transpose a c' {
775   \relative c' {
776     \key c \major
777     c4 d e g
778   }
779 }
780 @end lilypond
781
782 @noindent
783 Note that we specify @w{@code{\key c \major}} explicitly.  If we
784 do not specify a key signature, the notes will be transposed but
785 no key signature will be printed.
786
787 @code{\transpose} distinguishes between enharmonic pitches: both
788 @w{@code{\transpose c cis}} or @w{@code{\transpose c des}} will
789 transpose up a semitone.  The first version will print sharps and
790 the notes will remain on the same scale step, the second version
791 will print flats on the scale step above.
792
793 @lilypond[verbatim,quote]
794 music = \relative c' { c d e f }
795 \new Staff {
796   \transpose c cis { \music }
797   \transpose c des { \music }
798 }
799 @end lilypond
800
801
802 @code{\transpose} may also be used in a different way, to input
803 written notes for a transposing instrument.  The previous examples
804 show how to enter pitches in C (or @notation{concert pitch}) and
805 typeset them for a transposing instrument, but the opposite is
806 also possible if you for example have a set of instrumental parts
807 and want to print a conductor's score.  For example, when entering
808 music for a B-flat trumpet that begins on a notated E (concert D),
809 one would write:
810
811 @example
812 musicInBflat = @{ e4 @dots{} @}
813 \transpose c bes, \musicInBflat
814 @end example
815
816 @noindent
817 To print this music in F (e.g., rearranging to a French horn) you
818 could wrap the existing music with another @code{\transpose}:
819
820 @example
821 musicInBflat = @{ e4 @dots{} @}
822 \transpose f c' @{ \transpose c bes, \musicInBflat @}
823 @end example
824
825 @noindent
826 For more information about transposing instruments,
827 see @ref{Instrument transpositions}.
828
829
830 @snippets
831
832 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
833 {transposing-pitches-with-minimum-accidentals-smart-transpose.ly}
834
835
836 @seealso
837 Notation Reference:
838 @ref{Relative octave entry},
839 @ref{Instrument transpositions}.
840
841 Snippets:
842 @rlsr{Pitches}.
843
844 Internals Reference:
845 @rinternals{TransposedMusic}.
846
847
848 @funindex \transpose
849 @funindex transpose
850 @funindex \chordmode
851 @funindex chordmode
852 @funindex \relative
853 @funindex relative
854
855 @knownissues
856
857 The relative conversion will not affect @code{\transpose},
858 @code{\chordmode} or @code{\relative} sections in its argument.
859 To use relative mode within transposed music, an additional
860 @code{\relative} must be placed inside @code{\transpose}.
861
862 @node Displaying pitches
863 @subsection Displaying pitches
864
865 This section discusses how to alter the output of pitches.
866
867 @menu
868 * Clef::
869 * Key signature::
870 * Ottava brackets::
871 * Instrument transpositions::
872 * Automatic accidentals::
873 * Ambitus::
874 @end menu
875
876
877 @node Clef
878 @unnumberedsubsubsec Clef
879
880 @cindex G clef
881 @cindex C clef
882 @cindex F clef
883 @cindex treble clef
884 @cindex violin clef
885 @cindex alto clef
886 @cindex tenor clef
887 @cindex bass clef
888 @cindex french clef
889 @cindex soprano clef
890 @cindex mezzosoprano clef
891 @cindex baritone clef
892 @cindex varbaritone clef
893 @cindex subbass clef
894 @cindex clef
895 @cindex ancient clef
896 @cindex clef, ancient
897 @cindex clef, G
898 @cindex clef, C
899 @cindex clef, F
900 @cindex clef, treble
901 @cindex clef, violin
902 @cindex clef, alto
903 @cindex clef, tenor
904 @cindex clef, bass
905 @cindex clef, french
906 @cindex clef, soprano
907 @cindex clef, mezzosoprano
908 @cindex clef, baritone
909 @cindex clef, varbaritone
910 @cindex subbass clef, subbass
911
912 @funindex \clef
913 @funindex clef
914
915 The clef may be altered.  Middle C is shown in every example.
916
917 @lilypond[verbatim,quote,relative=1]
918 \clef treble
919 c2 c
920 \clef alto
921 c2 c
922 \clef tenor
923 c2 c
924 \clef bass
925 c2 c
926 @end lilypond
927
928 Other clefs include:
929
930 @lilypond[verbatim,quote,relative=1]
931 \clef french
932 c2 c
933 \clef soprano
934 c2 c
935 \clef mezzosoprano
936 c2 c
937 \clef baritone
938 c2 c
939
940 \break
941
942 \clef varbaritone
943 c2 c
944 \clef subbass
945 c2 c
946 \clef percussion
947 c2 c
948 \clef tab
949 c2 c
950
951 \break
952
953 \clef G
954 c2 c
955 \clef F
956 c2 c
957 \clef C
958 c2 c
959
960 @end lilypond
961
962 Further supported clefs are described under @ref{Mensural clefs}
963 and @ref{Gregorian clefs}.
964
965 @cindex transposing clefs
966 @cindex clef, transposing
967 @cindex octave transposition
968 @cindex choral tenor clef
969 @cindex tenor clef, choral
970
971 By adding@tie{}@code{_8} or@tie{}@code{^8} to the clef name, the
972 clef is transposed one octave down or up, respectively,
973 and@tie{}@code{_15} and@tie{}@code{^15} transpose by two octaves.
974 The clef name must be enclosed in quotes when it contains
975 underscores or digits.
976
977 @lilypond[verbatim,quote,relative=2]
978 \clef treble
979 c2 c
980 \clef "treble_8"
981 c2 c
982 \clef "bass^15"
983 c2 c
984 @end lilypond
985
986
987 @snippets
988
989 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
990 {tweaking-clef-properties.ly}
991
992
993 @seealso
994 Notation Reference:
995 @ref{Mensural clefs},
996 @ref{Gregorian clefs}.
997
998 Snippets:
999 @rlsr{Pitches}.
1000
1001 Internals Reference:
1002 @rinternals{Clef_engraver},
1003 @rinternals{Clef},
1004 @rinternals{OctavateEight},
1005 @rinternals{clef-interface}.
1006
1007
1008 @node Key signature
1009 @unnumberedsubsubsec Key signature
1010
1011 @cindex key signature
1012
1013 @funindex \key
1014 @funindex key
1015
1016 @c duplicated in Key signature and Accidentals
1017 @warning{New users are sometimes confused about accidentals and
1018 key signatures.  In LilyPond, note names are the raw input; key
1019 signatures and clefs determine how this raw input is displayed.
1020 An unaltered note like@tie{}@code{c} means @q{C natural},
1021 regardless of the key signature or clef.  For more information,
1022 see @rlearning{Accidentals and key signatures}.}
1023
1024 The key signature indicates the tonality in which a piece is
1025 played.  It is denoted by a set of alterations (flats or sharps)
1026 at the start of the staff.  The key signature may be altered:
1027
1028 @example
1029 \key @var{pitch} @var{mode}
1030 @end example
1031
1032 @funindex \major
1033 @funindex major
1034 @funindex \minor
1035 @funindex minor
1036 @funindex \ionian
1037 @funindex ionian
1038 @funindex \locrian
1039 @funindex locrian
1040 @funindex \aeolian
1041 @funindex aeolian
1042 @funindex \mixolydian
1043 @funindex mixolydian
1044 @funindex \lydian
1045 @funindex lydian
1046 @funindex \phrygian
1047 @funindex phrygian
1048 @funindex \dorian
1049 @funindex dorian
1050
1051 @cindex church modes
1052 @cindex modes
1053 @cindex major
1054 @cindex minor
1055 @cindex ionian
1056 @cindex locrian
1057 @cindex aeolian
1058 @cindex mixolydian
1059 @cindex lydian
1060 @cindex phrygian
1061 @cindex dorian
1062
1063 @noindent
1064 Here, @var{mode} should be @code{\major} or @code{\minor} to get a
1065 key signature of @var{pitch}-major or @var{pitch}-minor,
1066 respectively.  You may also use the standard mode names, also
1067 called @notation{church modes}: @code{\ionian}, @code{\dorian},
1068 @code{\phrygian}, @code{\lydian}, @code{\mixolydian},
1069 @code{\aeolian}, and @code{\locrian}.
1070
1071 @lilypond[verbatim,quote,relative=2]
1072 \key g \major
1073 fis1
1074 f
1075 fis
1076 @end lilypond
1077
1078
1079 @snippets
1080
1081 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1082 {preventing-natural-signs-from-being-printed-when-the-key-signature-changes.ly}
1083
1084 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1085 {non-traditional-key-signatures.ly}
1086
1087
1088 @seealso
1089 Music Glossary:
1090 @rglos{church mode},
1091 @rglos{scordatura}.
1092
1093 Learning Manual:
1094 @rlearning{Accidentals and key signatures}.
1095
1096 Snippets:
1097 @rlsr{Pitches}.
1098
1099 Internals Reference:
1100 @rinternals{KeyChangeEvent},
1101 @rinternals{Key_engraver},
1102 @rinternals{Key_performer},
1103 @rinternals{KeyCancellation},
1104 @rinternals{KeySignature},
1105 @rinternals{key-cancellation-interface},
1106 @rinternals{key-signature-interface}.
1107
1108
1109 @node Ottava brackets
1110 @unnumberedsubsubsec Ottava brackets
1111
1112 @cindex ottava
1113 @cindex 15ma
1114 @cindex 8va
1115 @cindex 8ve
1116 @cindex octavation
1117
1118 @funindex set-octavation
1119 @funindex \ottava
1120 @funindex ottava
1121
1122 @notation{Ottava brackets} introduce an extra transposition of an
1123 octave for the staff:
1124
1125 @lilypond[verbatim,quote,relative=2]
1126 a'2 b
1127 \ottava #1
1128 a b
1129 \ottava #0
1130 a b
1131 @end lilypond
1132
1133 The @code{ottava} function also takes -1 (for 8va bassa),
1134 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
1135
1136
1137 @snippets
1138
1139 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
1140 {ottava-text.ly}
1141
1142
1143 @seealso
1144 Music Glossary:
1145 @rglos{octavation}.
1146
1147 Snippets:
1148 @rlsr{Pitches}.
1149
1150 Internals Reference:
1151 @rinternals{Ottava_spanner_engraver},
1152 @rinternals{OttavaBracket},
1153 @rinternals{ottava-bracket-interface}.
1154
1155
1156 @node Instrument transpositions
1157 @unnumberedsubsubsec Instrument transpositions
1158
1159 @cindex transposition, MIDI
1160 @cindex transposition, instrument
1161 @cindex transposing instrument
1162 @cindex MIDI
1163 @cindex MIDI transposition
1164
1165 @funindex \transposition
1166 @funindex transposition
1167
1168 When typesetting scores that involve transposing instruments, some
1169 parts can be typeset in a different pitch than the
1170 @notation{concert pitch}.  In these cases, the key of the
1171 @notation{transposing instrument} should be specified; otherwise
1172 the MIDI output and cues in other parts will produce incorrect
1173 pitches.  For more information about quotations, see
1174 @ref{Quoting other voices}.
1175
1176 @example
1177 \transposition @var{pitch}
1178 @end example
1179
1180 The pitch to use for @code{\transposition} should correspond to
1181 the real sound heard when a@tie{}@code{c'} written on the staff is
1182 played by the transposing instrument.  This pitch is entered in
1183 absolute mode, so an instrument that produces a real sound which
1184 is one tone higher than the printed music should use
1185 @w{@code{\transposition d'}}.  @code{\transposition} should
1186 @emph{only} be used if the pitches are @emph{not} being entered in
1187 concert pitch.
1188
1189 Here are a few notes for violin and B-flat clarinet where the
1190 parts have been entered using the notes and key as they appear in
1191 each part of the conductor's score.  The two instruments are
1192 playing in unison.
1193
1194 @lilypond[verbatim,quote]
1195 \new GrandStaff <<
1196   \new Staff = "violin" {
1197     \relative c'' {
1198       \set Staff.instrumentName = #"Vln"
1199       \set Staff.midiInstrument = #"violin"
1200       % not strictly necessary, but a good reminder
1201       \transposition c'
1202
1203       \key c \major
1204       g4( c8) r c r c4
1205     }
1206   }
1207   \new Staff = "clarinet" {
1208     \relative c'' {
1209       \set Staff.instrumentName = \markup { Cl (B\flat) }
1210       \set Staff.midiInstrument = #"clarinet"
1211       \transposition bes
1212
1213       \key d \major
1214       a4( d8) r d r d4
1215     }
1216   }
1217 >>
1218 @end lilypond
1219
1220 The @code{\transposition} may be changed during a piece.  For
1221 example, a clarinetist may switch from an A clarinet to a B-flat
1222 clarinet.
1223
1224 @lilypond[verbatim,quote,relative=2]
1225 \set Staff.instrumentName = #"Cl (A)"
1226 \key a \major
1227 \transposition a
1228 c d e f
1229 \textLengthOn
1230 s1*0^\markup { Switch to B\flat clarinet }
1231 R1
1232
1233 \key bes \major
1234 \transposition bes
1235 c2 g
1236 @end lilypond
1237
1238
1239 @seealso
1240 Music Glossary:
1241 @rglos{concert pitch},
1242 @rglos{transposing instrument}.
1243
1244 Notation Reference:
1245 @ref{Quoting other voices},
1246 @ref{Transpose}.
1247
1248 Snippets:
1249 @rlsr{Pitches}.
1250
1251
1252 @node Automatic accidentals
1253 @unnumberedsubsubsec Automatic accidentals
1254
1255 @cindex accidental style
1256 @cindex accidental style, default
1257 @cindex accidentals
1258 @cindex accidentals, automatic
1259 @cindex automatic accidentals
1260 @cindex default accidental style
1261
1262 @funindex set-accidental-style
1263 @funindex voice
1264 @funindex default
1265
1266 There are many different conventions on how to typeset
1267 accidentals.  LilyPond provides a function to specify which
1268 accidental style to use.  This function is called as follows:
1269
1270 @example
1271 \new Staff <<
1272   #(set-accidental-style 'voice)
1273   @{ @dots{} @}
1274 >>
1275 @end example
1276
1277 The accidental style applies to the current @code{Staff} by
1278 default (with the exception of the styles @code{piano} and
1279 @code{piano-cautionary}, which are explained below).  Optionally,
1280 the function can take a second argument that determines in which
1281 scope the style should be changed.  For example, to use the same
1282 style in all staves of the current @code{StaffGroup}, use:
1283
1284 @example
1285 #(set-accidental-style 'voice 'StaffGroup)
1286 @end example
1287
1288 The following accidental styles are supported.  To demonstrate
1289 each style, we use the following example:
1290
1291
1292 @lilypond[verbatim,quote]
1293 musicA = {
1294   <<
1295     \relative c' {
1296       cis'8 fis, d'4 <a cis>8 f bis4 |
1297       cis2. <c, g'>4 |
1298     }
1299     \\
1300     \relative c' {
1301       ais'2 cis, |
1302       fis8 b a4 cis2 |
1303     }
1304   >>
1305 }
1306
1307 musicB = {
1308   \clef bass
1309   \new Voice {
1310     \voiceTwo \relative c' {
1311       <fis, a cis>8 <fis a cis>
1312       \change Staff = up
1313       cis' cis
1314       \change Staff = down
1315       <fis, a> <fis a>
1316       \showStaffSwitch
1317       \change Staff = up
1318       dis'4 |
1319       \change Staff = down
1320       <fis, a cis>4 gis <f a d>2 |
1321     }
1322   }
1323 }
1324
1325 \new PianoStaff {
1326   <<
1327     \context Staff = "up" {
1328       #(set-accidental-style 'default)
1329       \musicA
1330     }
1331     \context Staff = "down" {
1332       #(set-accidental-style 'default)
1333       \musicB
1334     }
1335   >>
1336 }
1337 @end lilypond
1338
1339 Note that the last lines of this example can be replaced by the
1340 following, as long as the same accidental style should be used in
1341 both staves.
1342
1343 @example
1344 \new PianoStaff @{
1345   <<
1346     \context Staff = "up" @{
1347       %%% change the next line as desired:
1348       #(set-accidental-style 'default 'Score)
1349       \musicA
1350     @}
1351     \context Staff = "down" @{
1352       \musicB
1353     @}
1354   >>
1355 @}
1356 @end example
1357
1358
1359 @c don't use verbatim in this table.
1360 @table @code
1361 @item default
1362
1363 @cindex default accidental style
1364 @cindex accidental style, default
1365
1366 @funindex default
1367
1368 This is the default typesetting behavior.  It corresponds to
1369 eighteenth-century common practice: accidentals are remembered to
1370 the end of the measure in which they occur and only in their own
1371 octave.  Thus, in the example below, no natural signs are printed
1372 before the@tie{}@code{b} in the second measure or the
1373 last@tie{}@code{c}:
1374
1375 @lilypond[quote]
1376 musicA = {
1377   <<
1378     \relative c' {
1379       cis'8 fis, d'4 <a cis>8 f bis4 |
1380       cis2. <c, g'>4 |
1381     }
1382     \\
1383     \relative c' {
1384       ais'2 cis, |
1385       fis8 b a4 cis2 |
1386     }
1387   >>
1388 }
1389
1390 musicB = {
1391   \clef bass
1392   \new Voice {
1393     \voiceTwo \relative c' {
1394       <fis, a cis>8 <fis a cis>
1395       \change Staff = up
1396       cis' cis
1397       \change Staff = down
1398       <fis, a> <fis a>
1399       \showStaffSwitch
1400       \change Staff = up
1401       dis'4 |
1402       \change Staff = down
1403       <fis, a cis>4 gis <f a d>2 |
1404     }
1405   }
1406 }
1407
1408 \new PianoStaff {
1409   <<
1410     \context Staff = "up" {
1411       #(set-accidental-style 'default)
1412       \musicA
1413     }
1414     \context Staff = "down" {
1415       #(set-accidental-style 'default)
1416       \musicB
1417     }
1418   >>
1419 }
1420 @end lilypond
1421
1422 @item voice
1423
1424 @cindex accidental style, voice
1425 @cindex voice accidental style
1426 @cindex accidental style, modern
1427 @cindex modern accidental style
1428 @cindex accidental style, modern-cautionary
1429 @cindex modern-cautionary accidental style
1430
1431 @funindex voice
1432
1433 The normal behavior is to remember the accidentals at
1434 @code{Staff}-level.  In this style, however, accidentals are
1435 typeset individually for each voice.  Apart from that, the rule is
1436 similar to @code{default}.
1437
1438 As a result, accidentals from one voice do not get canceled in
1439 other voices, which is often an unwanted result: in the following
1440 example, it is hard to determine whether the second@tie{}@code{a}
1441 should be played natural or sharp.  The @code{voice} option should
1442 therefore be used only if the voices are to be read solely by
1443 individual musicians.  If the staff is to be used by one musician
1444 (e.g., a conductor or in a piano score) then @code{modern} or
1445 @code{modern-cautionary} should be used instead.
1446
1447
1448 @lilypond[quote]
1449 musicA = {
1450   <<
1451     \relative c' {
1452       cis'8 fis, d'4 <a cis>8 f bis4 |
1453       cis2. <c, g'>4 |
1454     }
1455     \\
1456     \relative c' {
1457       ais'2 cis, |
1458       fis8 b a4 cis2 |
1459     }
1460   >>
1461 }
1462
1463 musicB = {
1464   \clef bass
1465   \new Voice {
1466     \voiceTwo \relative c' {
1467       <fis, a cis>8 <fis a cis>
1468       \change Staff = up
1469       cis' cis
1470       \change Staff = down
1471       <fis, a> <fis a>
1472       \showStaffSwitch
1473       \change Staff = up
1474       dis'4 |
1475       \change Staff = down
1476       <fis, a cis>4 gis <f a d>2 |
1477     }
1478   }
1479 }
1480
1481 \new PianoStaff {
1482   <<
1483     \context Staff = "up" {
1484       #(set-accidental-style 'voice)
1485       \musicA
1486     }
1487     \context Staff = "down" {
1488       #(set-accidental-style 'voice)
1489       \musicB
1490     }
1491   >>
1492 }
1493 @end lilypond
1494
1495 @item modern
1496
1497 @cindex accidentals, modern style
1498 @cindex modern style accidentals
1499
1500 @funindex modern
1501
1502 This rule corresponds to the common practice in the twentieth
1503 century.  It prints the same accidentals as @code{default}, with
1504 two exceptions that serve to avoid ambiguity: after temporary
1505 accidentals, cancellation marks are printed also in the following
1506 measure (for notes in the same octave) and, in the same measure,
1507 for notes in other octaves.  Hence the naturals before
1508 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1509 the upper staff:
1510
1511 @lilypond[quote]
1512 musicA = {
1513   <<
1514     \relative c' {
1515       cis'8 fis, d'4 <a cis>8 f bis4 |
1516       cis2. <c, g'>4 |
1517     }
1518     \\
1519     \relative c' {
1520       ais'2 cis, |
1521       fis8 b a4 cis2 |
1522     }
1523   >>
1524 }
1525
1526 musicB = {
1527   \clef bass
1528   \new Voice {
1529     \voiceTwo \relative c' {
1530       <fis, a cis>8 <fis a cis>
1531       \change Staff = up
1532       cis' cis
1533       \change Staff = down
1534       <fis, a> <fis a>
1535       \showStaffSwitch
1536       \change Staff = up
1537       dis'4 |
1538       \change Staff = down
1539       <fis, a cis>4 gis <f a d>2 |
1540     }
1541   }
1542 }
1543
1544 \new PianoStaff {
1545   <<
1546     \context Staff = "up" {
1547       #(set-accidental-style 'modern)
1548       \musicA
1549     }
1550     \context Staff = "down" {
1551       #(set-accidental-style 'modern)
1552       \musicB
1553     }
1554   >>
1555 }
1556 @end lilypond
1557
1558 @item modern-cautionary
1559
1560 @cindex accidentals, modern cautionary style
1561 @cindex modern accidental style
1562 @cindex modern cautionary accidental style
1563 @cindex modern style accidentals
1564 @cindex modern style cautionary accidentals
1565
1566 @funindex modern-cautionary
1567
1568 This rule is similar to @code{modern}, but the @q{extra}
1569 accidentals (the ones not typeset by @code{default}) are typeset
1570 as cautionary accidentals.  They are by default printed with
1571 parentheses, but they can also be printed in reduced size by
1572 defining the @code{cautionary-style} property of
1573 @code{AccidentalSuggestion}.
1574
1575 @lilypond[quote]
1576 musicA = {
1577   <<
1578     \relative c' {
1579       cis'8 fis, d'4 <a cis>8 f bis4 |
1580       cis2. <c, g'>4 |
1581     }
1582     \\
1583     \relative c' {
1584       ais'2 cis, |
1585       fis8 b a4 cis2 |
1586     }
1587   >>
1588 }
1589
1590 musicB = {
1591   \clef bass
1592   \new Voice {
1593     \voiceTwo \relative c' {
1594       <fis, a cis>8 <fis a cis>
1595       \change Staff = up
1596       cis' cis
1597       \change Staff = down
1598       <fis, a> <fis a>
1599       \showStaffSwitch
1600       \change Staff = up
1601       dis'4 |
1602       \change Staff = down
1603       <fis, a cis>4 gis <f a d>2 |
1604     }
1605   }
1606 }
1607
1608 \new PianoStaff {
1609   <<
1610     \context Staff = "up" {
1611       #(set-accidental-style 'modern-cautionary)
1612       \musicA
1613     }
1614     \context Staff = "down" {
1615       #(set-accidental-style 'modern-cautionary)
1616       \musicB
1617     }
1618   >>
1619 }
1620 @end lilypond
1621
1622 @item modern-voice
1623
1624 @cindex accidental style, modern
1625 @cindex accidentals, modern
1626 @cindex accidentals, multivoice
1627 @cindex modern accidental style
1628 @cindex modern accidentals
1629 @cindex multivoice accidentals
1630
1631 @funindex modern-voice
1632
1633 This rule is used for multivoice accidentals to be read both by
1634 musicians playing one voice and musicians playing all voices.
1635 Accidentals are typeset for each voice, but they @emph{are}
1636 canceled across voices in the same @code{Staff}.  Hence,
1637 the@tie{}@code{a} in the last measure is canceled because the
1638 previous cancellation was in a different voice, and
1639 the@tie{}@code{d} in the lower staff is canceled because of the
1640 accidental in a different voice in the previous measure:
1641
1642 @lilypond[quote]
1643 musicA = {
1644   <<
1645     \relative c' {
1646       cis'8 fis, d'4 <a cis>8 f bis4 |
1647       cis2. <c, g'>4 |
1648     }
1649     \\
1650     \relative c' {
1651       ais'2 cis, |
1652       fis8 b a4 cis2 |
1653     }
1654   >>
1655 }
1656
1657 musicB = {
1658   \clef bass
1659   \new Voice {
1660     \voiceTwo \relative c' {
1661       <fis, a cis>8 <fis a cis>
1662       \change Staff = up
1663       cis' cis
1664       \change Staff = down
1665       <fis, a> <fis a>
1666       \showStaffSwitch
1667       \change Staff = up
1668       dis'4 |
1669       \change Staff = down
1670       <fis, a cis>4 gis <f a d>2 |
1671     }
1672   }
1673 }
1674
1675 \new PianoStaff {
1676   <<
1677     \context Staff = "up" {
1678       #(set-accidental-style 'modern-voice)
1679       \musicA
1680     }
1681     \context Staff = "down" {
1682       #(set-accidental-style 'modern-voice)
1683       \musicB
1684     }
1685   >>
1686 }
1687 @end lilypond
1688
1689 @cindex accidental style, cautionary, modern voice
1690 @cindex accidental style, modern voice cautionary
1691 @cindex accidental style, voice, modern cautionary
1692
1693 @funindex modern-voice-cautionary
1694
1695 @item modern-voice-cautionary
1696
1697 This rule is the same as @code{modern-voice}, but with the extra
1698 accidentals (the ones not typeset by @code{voice}) typeset as
1699 cautionaries.  Even though all accidentals typeset by
1700 @code{default} @emph{are} typeset with this rule, some of them are
1701 typeset as cautionaries.
1702
1703 @lilypond[quote]
1704 musicA = {
1705   <<
1706     \relative c' {
1707       cis'8 fis, d'4 <a cis>8 f bis4 |
1708       cis2. <c, g'>4 |
1709     }
1710     \\
1711     \relative c' {
1712       ais'2 cis, |
1713       fis8 b a4 cis2 |
1714     }
1715   >>
1716 }
1717
1718 musicB = {
1719   \clef bass
1720   \new Voice {
1721     \voiceTwo \relative c' {
1722       <fis, a cis>8 <fis a cis>
1723       \change Staff = up
1724       cis' cis
1725       \change Staff = down
1726       <fis, a> <fis a>
1727       \showStaffSwitch
1728       \change Staff = up
1729       dis'4 |
1730       \change Staff = down
1731       <fis, a cis>4 gis <f a d>2 |
1732     }
1733   }
1734 }
1735
1736 \new PianoStaff {
1737   <<
1738     \context Staff = "up" {
1739       #(set-accidental-style 'modern-voice-cautionary)
1740       \musicA
1741     }
1742     \context Staff = "down" {
1743       #(set-accidental-style 'modern-voice-cautionary)
1744       \musicB
1745     }
1746   >>
1747 }
1748 @end lilypond
1749
1750 @item piano
1751
1752 @cindex accidental style, piano
1753 @cindex accidentals, piano
1754 @cindex piano accidental style
1755 @cindex piano accidentals
1756
1757 @funindex piano
1758
1759 This rule reflects twentieth-century practice for piano notation.
1760 Its behavior is very similar to @code{modern} style, but here
1761 accidentals also get canceled across the staves in the same
1762 @code{GrandStaff} or @code{PianoStaff}, hence all the
1763 cancellations of the final notes.
1764
1765 This accidental style applies to the current @code{GrandStaff} or
1766 @code{PianoStaff} by default.
1767
1768 @lilypond[quote]
1769 musicA = {
1770   <<
1771     \relative c' {
1772       cis'8 fis, d'4 <a cis>8 f bis4 |
1773       cis2. <c, g'>4 |
1774     }
1775     \\
1776     \relative c' {
1777       ais'2 cis, |
1778       fis8 b a4 cis2 |
1779     }
1780   >>
1781 }
1782
1783 musicB = {
1784   \clef bass
1785   \new Voice {
1786     \voiceTwo \relative c' {
1787       <fis, a cis>8 <fis a cis>
1788       \change Staff = up
1789       cis' cis
1790       \change Staff = down
1791       <fis, a> <fis a>
1792       \showStaffSwitch
1793       \change Staff = up
1794       dis'4 |
1795       \change Staff = down
1796       <fis, a cis>4 gis <f a d>2 |
1797     }
1798   }
1799 }
1800
1801 \new PianoStaff {
1802   <<
1803     \context Staff = "up" {
1804       #(set-accidental-style 'piano)
1805       \musicA
1806     }
1807     \context Staff = "down" {
1808       \musicB
1809     }
1810   >>
1811 }
1812 @end lilypond
1813
1814 @item piano-cautionary
1815
1816 @cindex accidentals, piano cautionary
1817 @cindex cautionary accidentals, piano
1818 @cindex piano cautionary accidentals
1819 @cindex accidental style, piano cautionary
1820 @cindex cautionary accidental style, piano
1821 @cindex piano cautionary accidental style
1822
1823 @funindex piano-cautionary
1824
1825 This is the same as @code{piano} but with the extra accidentals
1826 typeset as cautionaries.
1827
1828 @lilypond[quote]
1829 musicA = {
1830   <<
1831     \relative c' {
1832       cis'8 fis, d'4 <a cis>8 f bis4 |
1833       cis2. <c, g'>4 |
1834     }
1835     \\
1836     \relative c' {
1837       ais'2 cis, |
1838       fis8 b a4 cis2 |
1839     }
1840   >>
1841 }
1842
1843 musicB = {
1844   \clef bass
1845   \new Voice {
1846     \voiceTwo \relative c' {
1847       <fis, a cis>8 <fis a cis>
1848       \change Staff = up
1849       cis' cis
1850       \change Staff = down
1851       <fis, a> <fis a>
1852       \showStaffSwitch
1853       \change Staff = up
1854       dis'4 |
1855       \change Staff = down
1856       <fis, a cis>4 gis <f a d>2 |
1857     }
1858   }
1859 }
1860
1861 \new PianoStaff {
1862   <<
1863     \context Staff = "up" {
1864       #(set-accidental-style 'piano-cautionary)
1865       \musicA
1866     }
1867     \context Staff = "down" {
1868       \musicB
1869     }
1870   >>
1871 }
1872 @end lilypond
1873
1874
1875 @item neo-modern
1876
1877 @cindex neo-modern accidental style
1878 @cindex accidental style, neo-modern
1879
1880 @funindex neo-modern
1881
1882 This rule reproduces a common practice in contemporary music:
1883 accidentals are printed like with @code{modern}, but they are printed
1884 again if the same note appears later in the same measure -- except
1885 if the note is immediately repeated.
1886
1887 @lilypond[quote]
1888 musicA = {
1889   <<
1890     \relative c' {
1891       cis'8 fis, d'4 <a cis>8 f bis4 |
1892       cis2. <c, g'>4 |
1893     }
1894     \\
1895     \relative c' {
1896       ais'2 cis, |
1897       fis8 b a4 cis2 |
1898     }
1899   >>
1900 }
1901
1902 musicB = {
1903   \clef bass
1904   \new Voice {
1905     \voiceTwo \relative c' {
1906       <fis, a cis>8 <fis a cis>
1907       \change Staff = up
1908       cis' cis
1909       \change Staff = down
1910       <fis, a> <fis a>
1911       \showStaffSwitch
1912       \change Staff = up
1913       dis'4 |
1914       \change Staff = down
1915       <fis, a cis>4 gis <f a d>2 |
1916     }
1917   }
1918 }
1919
1920 \new PianoStaff {
1921   <<
1922     \context Staff = "up" {
1923       #(set-accidental-style 'neo-modern)
1924       \musicA
1925     }
1926     \context Staff = "down" {
1927       #(set-accidental-style 'neo-modern)
1928       \musicB
1929     }
1930   >>
1931 }
1932 @end lilypond
1933
1934 @item neo-modern-cautionary
1935
1936 @cindex neo-modern-cautionary accidental style
1937 @cindex accidental style, neo-modern-cautionary
1938
1939 @funindex neo-modern-cautionary
1940
1941 This rule is similar to @code{neo-modern}, but the extra
1942 accidentals are printed as cautionary accidentals.
1943
1944 @lilypond[quote]
1945 musicA = {
1946   <<
1947     \relative c' {
1948       cis'8 fis, d'4 <a cis>8 f bis4 |
1949       cis2. <c, g'>4 |
1950     }
1951     \\
1952     \relative c' {
1953       ais'2 cis, |
1954       fis8 b a4 cis2 |
1955     }
1956   >>
1957 }
1958
1959 musicB = {
1960   \clef bass
1961   \new Voice {
1962     \voiceTwo \relative c' {
1963       <fis, a cis>8 <fis a cis>
1964       \change Staff = up
1965       cis' cis
1966       \change Staff = down
1967       <fis, a> <fis a>
1968       \showStaffSwitch
1969       \change Staff = up
1970       dis'4 |
1971       \change Staff = down
1972       <fis, a cis>4 gis <f a d>2 |
1973     }
1974   }
1975 }
1976
1977 \new PianoStaff {
1978   <<
1979     \context Staff = "up" {
1980       #(set-accidental-style 'neo-modern-cautionary)
1981       \musicA
1982     }
1983     \context Staff = "down" {
1984       #(set-accidental-style 'neo-modern-cautionary)
1985       \musicB
1986     }
1987   >>
1988 }
1989 @end lilypond
1990
1991
1992 @item neo-modern-voice
1993
1994 @cindex neo-modern-voice accidental style
1995 @cindex accidental style, neo-modern-voice
1996
1997 @funindex neo-modern-voice
1998
1999 This rule is used for multivoice accidentals to be read both by
2000 musicians playing one voice and musicians playing all voices.
2001 Accidentals are typeset for each voice as with @code{neo-modern},
2002 but they are canceled across voices in the same @code{Staff}.
2003
2004 @lilypond[quote]
2005 musicA = {
2006   <<
2007     \relative c' {
2008       cis'8 fis, d'4 <a cis>8 f bis4 |
2009       cis2. <c, g'>4 |
2010     }
2011     \\
2012     \relative c' {
2013       ais'2 cis, |
2014       fis8 b a4 cis2 |
2015     }
2016   >>
2017 }
2018
2019 musicB = {
2020   \clef bass
2021   \new Voice {
2022     \voiceTwo \relative c' {
2023       <fis, a cis>8 <fis a cis>
2024       \change Staff = up
2025       cis' cis
2026       \change Staff = down
2027       <fis, a> <fis a>
2028       \showStaffSwitch
2029       \change Staff = up
2030       dis'4 |
2031       \change Staff = down
2032       <fis, a cis>4 gis <f a d>2 |
2033     }
2034   }
2035 }
2036
2037 \new PianoStaff {
2038   <<
2039     \context Staff = "up" {
2040       #(set-accidental-style 'neo-modern-voice)
2041       \musicA
2042     }
2043     \context Staff = "down" {
2044       #(set-accidental-style 'neo-modern-voice)
2045       \musicB
2046     }
2047   >>
2048 }
2049 @end lilypond
2050
2051 @item neo-modern-voice-cautionary
2052
2053 @cindex neo-modern-voice-cautionary accidental style
2054 @cindex accidental style, neo-modern-voice-cautionary
2055
2056 @funindex neo-modern-voice-cautionary
2057
2058 This rule is similar to @code{neo-modern-voice}, but the extra
2059 accidentals are printed as cautionary accidentals.
2060
2061 @lilypond[quote]
2062 musicA = {
2063   <<
2064     \relative c' {
2065       cis'8 fis, d'4 <a cis>8 f bis4 |
2066       cis2. <c, g'>4 |
2067     }
2068     \\
2069     \relative c' {
2070       ais'2 cis, |
2071       fis8 b a4 cis2 |
2072     }
2073   >>
2074 }
2075
2076 musicB = {
2077   \clef bass
2078   \new Voice {
2079     \voiceTwo \relative c' {
2080       <fis, a cis>8 <fis a cis>
2081       \change Staff = up
2082       cis' cis
2083       \change Staff = down
2084       <fis, a> <fis a>
2085       \showStaffSwitch
2086       \change Staff = up
2087       dis'4 |
2088       \change Staff = down
2089       <fis, a cis>4 gis <f a d>2 |
2090     }
2091   }
2092 }
2093
2094 \new PianoStaff {
2095   <<
2096     \context Staff = "up" {
2097       #(set-accidental-style 'neo-modern-voice-cautionary)
2098       \musicA
2099     }
2100     \context Staff = "down" {
2101       #(set-accidental-style 'neo-modern-voice-cautionary)
2102       \musicB
2103     }
2104   >>
2105 }
2106 @end lilypond
2107
2108 @item dodecaphonic
2109
2110 @cindex dodecaphonic accidental style
2111 @cindex dodecaphonic style, neo-modern
2112
2113 @funindex dodecaphonic
2114
2115 This rule reflects a practice introduced by composers at
2116 the beginning of the 20th century, in an attempt to
2117 abolish the hierarchy between natural and non-natural notes.
2118 With this style, @emph{every} note gets an accidental sign,
2119 including natural signs.
2120
2121 @lilypond[quote]
2122 musicA = {
2123   <<
2124     \relative c' {
2125       cis'8 fis, d'4 <a cis>8 f bis4 |
2126       cis2. <c, g'>4 |
2127     }
2128     \\
2129     \relative c' {
2130       ais'2 cis, |
2131       fis8 b a4 cis2 |
2132     }
2133   >>
2134 }
2135
2136 musicB = {
2137   \clef bass
2138   \new Voice {
2139     \voiceTwo \relative c' {
2140       <fis, a cis>8 <fis a cis>
2141       \change Staff = up
2142       cis' cis
2143       \change Staff = down
2144       <fis, a> <fis a>
2145       \showStaffSwitch
2146       \change Staff = up
2147       dis'4 |
2148       \change Staff = down
2149       <fis, a cis>4 gis <f a d>2 |
2150     }
2151   }
2152 }
2153
2154 \new PianoStaff {
2155   <<
2156     \context Staff = "up" {
2157       #(set-accidental-style 'dodecaphonic)
2158       \musicA
2159     }
2160     \context Staff = "down" {
2161       #(set-accidental-style 'dodecaphonic)
2162       \musicB
2163     }
2164   >>
2165 }
2166 @end lilypond
2167
2168
2169 @item teaching
2170
2171 @cindex teaching accidental style
2172 @cindex accidental style, teaching
2173
2174 @funindex teaching
2175
2176 This rule is intended for students, and makes it easy to create
2177 scale sheets with automagically created cautionary accidentals.
2178 Accidentals are printed like with @code{modern}, but cautionary
2179 accidentals are added for all sharp or flat tones specified by the
2180 key signature, except if the note is immediately repeated.
2181
2182 @lilypond[quote]
2183 musicA = {
2184   <<
2185     \relative c' {
2186       cis'8 fis, d'4 <a cis>8 f bis4 |
2187       cis2. <c, g'>4 |
2188     }
2189     \\
2190     \relative c' {
2191       ais'2 cis, |
2192       fis8 b a4 cis2 |
2193     }
2194   >>
2195 }
2196
2197 musicB = {
2198   \clef bass
2199   \new Voice {
2200     \voiceTwo \relative c' {
2201       <fis, a cis>8 <fis a cis>
2202       \change Staff = up
2203       cis' cis
2204       \change Staff = down
2205       <fis, a> <fis a>
2206       \showStaffSwitch
2207       \change Staff = up
2208       dis'4 |
2209       \change Staff = down
2210       <fis, a cis>4 gis <f a d>2 |
2211     }
2212   }
2213 }
2214
2215 \new PianoStaff {
2216   <<
2217     \context Staff = "up" {
2218       \key fis \minor
2219       #(set-accidental-style 'teaching)
2220       \musicA
2221     }
2222     \context Staff = "down" {
2223       \key fis \minor
2224       #(set-accidental-style 'teaching)
2225       \musicB
2226     }
2227   >>
2228 }
2229 @end lilypond
2230
2231
2232
2233 @item no-reset
2234
2235 @cindex accidental style, no reset
2236 @cindex no reset accidental style
2237
2238 @funindex no-reset
2239
2240 This is the same as @code{default} but with accidentals lasting
2241 @q{forever} and not only within the same measure:
2242
2243 @lilypond[quote]
2244 musicA = {
2245   <<
2246     \relative c' {
2247       cis'8 fis, d'4 <a cis>8 f bis4 |
2248       cis2. <c, g'>4 |
2249     }
2250     \\
2251     \relative c' {
2252       ais'2 cis, |
2253       fis8 b a4 cis2 |
2254     }
2255   >>
2256 }
2257
2258 musicB = {
2259   \clef bass
2260   \new Voice {
2261     \voiceTwo \relative c' {
2262       <fis, a cis>8 <fis a cis>
2263       \change Staff = up
2264       cis' cis
2265       \change Staff = down
2266       <fis, a> <fis a>
2267       \showStaffSwitch
2268       \change Staff = up
2269       dis'4 |
2270       \change Staff = down
2271       <fis, a cis>4 gis <f a d>2 |
2272     }
2273   }
2274 }
2275
2276 \new PianoStaff {
2277   <<
2278     \context Staff = "up" {
2279       #(set-accidental-style 'no-reset)
2280       \musicA
2281     }
2282     \context Staff = "down" {
2283       #(set-accidental-style 'no-reset)
2284       \musicB
2285     }
2286   >>
2287 }
2288 @end lilypond
2289
2290 @item forget
2291
2292 @cindex forget accidental style
2293 @cindex accidental style, forget
2294
2295 @funindex forget
2296
2297 This is the opposite of @code{no-reset}: Accidentals are not
2298 remembered at all -- and hence all accidentals are typeset
2299 relative to the key signature, regardless of what came before in
2300 the music.  Unlike @code{dodecaphonic}, this rule never prints
2301 any naturals.
2302
2303 @lilypond[quote]
2304 musicA = {
2305   <<
2306     \relative c' {
2307       cis'8 fis, d'4 <a cis>8 f bis4 |
2308       cis2. <c, g'>4 |
2309     }
2310     \\
2311     \relative c' {
2312       ais'2 cis, |
2313       fis8 b a4 cis2 |
2314     }
2315   >>
2316 }
2317
2318 musicB = {
2319   \clef bass
2320   \new Voice {
2321     \voiceTwo \relative c' {
2322       <fis, a cis>8 <fis a cis>
2323       \change Staff = up
2324       cis' cis
2325       \change Staff = down
2326       <fis, a> <fis a>
2327       \showStaffSwitch
2328       \change Staff = up
2329       dis'4 |
2330       \change Staff = down
2331       <fis, a cis>4 gis <f a d>2 |
2332     }
2333   }
2334 }
2335
2336 \new PianoStaff {
2337   <<
2338     \context Staff = "up" {
2339       #(set-accidental-style 'forget)
2340       \musicA
2341     }
2342     \context Staff = "down" {
2343       #(set-accidental-style 'forget)
2344       \musicB
2345     }
2346   >>
2347 }
2348 @end lilypond
2349 @end table
2350
2351 @snippets
2352
2353 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2354 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
2355
2356
2357 @seealso
2358 Snippets:
2359 @rlsr{Pitches}.
2360
2361 Internals Reference:
2362 @rinternals{Accidental},
2363 @rinternals{Accidental_engraver},
2364 @rinternals{GrandStaff},
2365 @rinternals{PianoStaff},
2366 @rinternals{Staff},
2367 @rinternals{AccidentalSuggestion},
2368 @rinternals{AccidentalPlacement},
2369 @rinternals{accidental-suggestion-interface}.
2370
2371
2372 @cindex accidentals and simultaneous notes
2373 @cindex simultaneous notes and accidentals
2374 @cindex accidentals in chords
2375 @cindex chords, accidentals in
2376
2377 @knownissues
2378
2379 Simultaneous notes are considered to be entered in sequential
2380 mode.  This means that in a chord the accidentals are typeset as
2381 if the notes in the chord happen one at a time, in the order in
2382 which they appear in the input file.  This is a problem when
2383 accidentals in a chord depend on each other, which does not happen
2384 for the default accidental style.  The problem can be solved by
2385 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
2386 problematic notes.
2387
2388
2389 Cautionary cancellation of accidentals is done by looking at previous measure.
2390 However, in the @code{\alternative} block following a @code{\repeat volta N}
2391 section, one would expect the cancellation being calculated using the previous
2392 @emph{played} measure, not previous @emph{printed} measure.
2393 In the following example, the natural @code{c} in the second alternative does
2394 not need a natural sign:
2395
2396 @lilypond[quote]
2397 {
2398   #(set-accidental-style 'modern)
2399   \time 2/4
2400   \repeat volta 2 {
2401     c'2
2402   }
2403   \alternative {
2404      cis'
2405      c'
2406   }
2407 }
2408 @end lilypond
2409
2410 The following work-around can be used: define a function that locally changes
2411 the accidental style to @code{forget}:
2412
2413 @lilypond[verbatim,quote]
2414 forget = #(define-music-function (parser location music) (ly:music?) #{
2415   #(set-accidental-style 'forget)
2416   $music
2417   #(set-accidental-style 'modern)
2418 #})
2419 {
2420   #(set-accidental-style 'modern)
2421   \time 2/4
2422   \repeat volta 2 {
2423     c'2
2424   }
2425   \alternative {
2426      cis'
2427      \forget c'
2428   }
2429 }
2430 @end lilypond
2431
2432 @node Ambitus
2433 @unnumberedsubsubsec Ambitus
2434
2435 @cindex ambitus
2436 @cindex range of pitches
2437 @cindex pitch range
2438
2439 The term @notation{ambitus} (pl. ambitus) denotes a range of
2440 pitches for a given voice in a part of music.  It may also denote
2441 the pitch range that a musical instrument is capable of playing.
2442 Ambitus are printed on vocal parts so that performers can easily
2443 determine if it matches their capabilities.
2444
2445 Ambitus are denoted at the beginning of a piece near the initial
2446 clef.  The range is graphically specified by two note heads that
2447 represent the lowest and highest pitches.  Accidentals are only
2448 printed if they are not part of the key signature.
2449
2450 @lilypond[verbatim,quote]
2451 \layout {
2452   \context {
2453     \Voice
2454     \consists "Ambitus_engraver"
2455   }
2456 }
2457
2458 \relative c'' {
2459   aes c e2
2460   cis,1
2461 }
2462 @end lilypond
2463
2464
2465 @snippets
2466
2467 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2468 {adding-ambitus-per-voice.ly}
2469
2470 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2471 {ambitus-with-multiple-voices.ly}
2472
2473
2474 @seealso
2475 Music Glossary:
2476 @rglos{ambitus}.
2477
2478 Snippets:
2479 @rlsr{Pitches}.
2480
2481 Internals Reference:
2482 @rinternals{Ambitus_engraver},
2483 @rinternals{Voice},
2484 @rinternals{Staff},
2485 @rinternals{Ambitus},
2486 @rinternals{AmbitusAccidental},
2487 @rinternals{AmbitusLine},
2488 @rinternals{AmbitusNoteHead},
2489 @rinternals{ambitus-interface}.
2490
2491
2492 @knownissues
2493
2494 There is no collision handling in the case of multiple per-voice
2495 ambitus.
2496
2497
2498 @node Note heads
2499 @subsection Note heads
2500
2501 This section suggests ways of altering note heads.
2502
2503 @menu
2504 * Special note heads::
2505 * Easy notation note heads::
2506 * Shape note heads::
2507 * Improvisation::
2508 @end menu
2509
2510 @node Special note heads
2511 @unnumberedsubsubsec Special note heads
2512
2513 @cindex note heads, special
2514 @cindex note heads, cross
2515 @cindex note heads, diamond
2516 @cindex note heads, parlato
2517 @cindex note heads, harmonic
2518 @cindex note heads, guitar
2519 @cindex special note heads
2520 @cindex cross note heads
2521 @cindex diamond note heads
2522 @cindex parlato note heads
2523 @cindex harmonic note heads
2524 @cindex guitar note heads
2525 @cindex note head styles
2526 @cindex styles, note heads
2527
2528 @funindex cross
2529
2530 The appearance of note heads may be altered:
2531
2532 @lilypond[verbatim,quote,relative=2]
2533 c4 b
2534 \override NoteHead #'style = #'cross
2535 c4 b
2536 \revert NoteHead #'style
2537 a b
2538 \override NoteHead #'style = #'harmonic
2539 a b
2540 \revert NoteHead #'style
2541 c4 d e f
2542 @end lilypond
2543
2544 To see all note head styles, see @ref{Note head styles}.
2545
2546 The @code{cross} style is used to represent a variety of musical
2547 intentions.  The following generic predefined commands modify the
2548 note head in both staff and tablature contexts and can be used to
2549 represent any musical meaning:
2550
2551 @lilypond[verbatim,quote,relative=2]
2552 c4 b
2553 \xNotesOn
2554  a b c4 b
2555 \xNotesOff
2556 c4 d
2557 @end lilypond
2558
2559 The music function form of this predefined command may be used
2560 inside and outside chords to generate crossed note heads in both
2561 staff and tablature contexts:
2562
2563 @lilypond[verbatim,quote,relative=2]
2564 c4 b
2565 \xNote { e f }
2566 c b < g \xNote c f > b
2567 @end lilypond
2568
2569 There is also a shorthand for diamond shapes which can be used
2570 only inside chords:
2571
2572 @lilypond[verbatim,quote,relative=2]
2573 <c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
2574 @end lilypond
2575
2576 @predefined
2577 @code{\harmonic},
2578 @code{\xNotesOn},
2579 @code{\xNotesOff},
2580 @code{\xNote}.
2581 @endpredefined
2582
2583 @seealso
2584 Snippets:
2585 @rlsr{Pitches}.
2586
2587 Notation Reference:
2588 @ref{Note head styles},
2589 @ref{Chorded notes}.
2590
2591 Internals Reference:
2592 @rinternals{note-event},
2593 @rinternals{Note_heads_engraver},
2594 @rinternals{Ledger_line_engraver},
2595 @rinternals{NoteHead},
2596 @rinternals{LedgerLineSpanner},
2597 @rinternals{note-head-interface},
2598 @rinternals{ledger-line-spanner-interface}.
2599
2600
2601 @node Easy notation note heads
2602 @unnumberedsubsubsec Easy notation note heads
2603
2604 @cindex note heads, practice
2605 @cindex practice note heads
2606 @cindex note heads, easy notation
2607 @cindex easy notation
2608 @cindex Hal Leonard
2609 @cindex beginners' music
2610 @cindex music, beginners'
2611 @cindex easy play note heads
2612 @cindex note heads, easy play
2613
2614 @funindex \easyHeadsOn
2615 @funindex easyHeadsOn
2616 @funindex \easyHeadsOff
2617 @funindex easyHeadsOff
2618
2619 The @q{easy play} note head includes a note name inside the head.
2620 It is used in music for beginners.  To make the letters readable,
2621 it should be printed in a large font size.  To print with a larger
2622 font, see @ref{Setting the staff size}.
2623
2624 @lilypond[verbatim,quote]
2625 #(set-global-staff-size 26)
2626 \relative c' {
2627   \easyHeadsOn
2628   c2 e4 f
2629   g1
2630   \easyHeadsOff
2631   c,1
2632 }
2633 @end lilypond
2634
2635
2636 @predefined
2637 @code{\easyHeadsOn},
2638 @code{\easyHeadsOff}.
2639 @endpredefined
2640
2641
2642 @snippets
2643
2644 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2645 {numbers-as-easy-note-heads.ly}
2646
2647
2648 @seealso
2649 Notation Reference:
2650 @ref{Setting the staff size}.
2651
2652 Snippets:
2653 @rlsr{Pitches}.
2654
2655 Internals Reference:
2656 @rinternals{note-event},
2657 @rinternals{Note_heads_engraver},
2658 @rinternals{NoteHead},
2659 @rinternals{note-head-interface}.
2660
2661
2662 @node Shape note heads
2663 @unnumberedsubsubsec Shape note heads
2664
2665 @cindex note heads, shape
2666 @cindex note heads, Aiken
2667 @cindex note heads, sacred harp
2668 @cindex shape notes
2669 @cindex Aiken shape note heads
2670 @cindex sacred harp note heads
2671
2672 @funindex \key
2673 @funindex key
2674 @funindex \aikenHeads
2675 @funindex aikenHeads
2676 @funindex \sacredHarpHeads
2677 @funindex sacredHarpHeads
2678
2679 In shape note head notation, the shape of the note head
2680 corresponds to the harmonic function of a note in the scale.  This
2681 notation was popular in nineteenth-century American song books.
2682 Shape note heads can be produced:
2683
2684 @lilypond[verbatim,quote,relative=2]
2685 \aikenHeads
2686 c, d e f g a b c
2687 \sacredHarpHeads
2688 c, d e f g a b c
2689 @end lilypond
2690
2691 Shapes are typeset according to the step in the scale, where the
2692 base of the scale is determined by the @code{\key} command.
2693
2694
2695 @predefined
2696 @code{\aikenHeads},
2697 @code{\sacredHarpHeads}.
2698 @endpredefined
2699
2700
2701 @snippets
2702
2703 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
2704 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
2705
2706 To see all note head styles, see @ref{Note head styles}.
2707
2708
2709 @seealso
2710 Snippets:
2711 @rlsr{Pitches}.
2712
2713 Notation Reference:
2714 @ref{Note head styles}.
2715
2716 Internals Reference:
2717 @rinternals{note-event},
2718 @rinternals{Note_heads_engraver},
2719 @rinternals{NoteHead},
2720 @rinternals{note-head-interface}.
2721
2722
2723 @node Improvisation
2724 @unnumberedsubsubsec Improvisation
2725
2726 @cindex improvisation
2727 @cindex slashed note heads
2728 @cindex note heads, improvisation
2729 @cindex note heads, slashed
2730
2731 @funindex \improvisationOn
2732 @funindex improvisationOn
2733 @funindex \improvisationOff
2734 @funindex improvisationOff
2735
2736 Improvisation is sometimes denoted with slashed note heads, where
2737 the performer may choose any pitch but should play the specified
2738 rhythm.  Such note heads can be created:
2739
2740 @lilypond[verbatim,quote,relative=2]
2741 \new Voice \with {
2742   \consists "Pitch_squash_engraver"
2743 } {
2744   e8 e g a a16( bes) a8 g
2745   \improvisationOn
2746   e8 ~
2747   e2 ~ e8 f4 f8 ~
2748   f2
2749   \improvisationOff
2750   a16( bes) a8 g e
2751 }
2752 @end lilypond
2753
2754
2755 @predefined
2756 @code{\improvisationOn},
2757 @code{\improvisationOff}.
2758 @endpredefined
2759
2760
2761 @seealso
2762 Snippets:
2763 @rlsr{Pitches}.
2764
2765 Internals Reference:
2766 @rinternals{Pitch_squash_engraver},
2767 @rinternals{Voice},
2768 @rinternals{RhythmicStaff}.
2769
2770