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