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