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