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