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