]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/pitches.itely
Fixes for renamed LSR snippets.
[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 check 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 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} transposes 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 {clefs-commonly-tweaked-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 r1^\markup{Switch to B\flat clarinet}
986
987 \key bes \major
988 \transposition bes
989 c2 g
990 @end lilypond
991
992
993 @seealso
994
995 Music Glossary:
996 @rglos{concert pitch},
997 @rglos{transposing instrument}.
998
999 Notation Reference:
1000 @ref{Quoting other voices}, @ref{Transpose}.
1001
1002 Snippets:
1003 @lsrdir{Pitches,Pitches}.
1004
1005
1006 @node Automatic accidentals
1007 @unnumberedsubsubsec Automatic accidentals
1008
1009 @cindex automatic accidentals
1010 @cindex accidentals, automatic
1011 @cindex accidentals
1012 @cindex accidental style
1013 @cindex default accidental style
1014 @cindex accidental style, default
1015 @funindex set-accidental-style
1016
1017 There are many different conventions on how to typeset
1018 accidentals.  LilyPond provides a function to specify which
1019 accidental style to use.  This function is called as follows
1020
1021 @example
1022 \new Staff <<
1023   #(set-accidental-style 'voice)
1024   @{ @dots{} @}
1025 >>
1026 @end example
1027
1028 The accidental style applies to the current @code{Staff} by
1029 default (with the exception of the styles @code{piano} and
1030 @code{piano-cautionary}, which are explained below).  Optionally,
1031 the function can take a second argument that determines in which
1032 scope the style should be changed.  For example, to use the same
1033 style in all staves of the current @code{StaffGroup}, use
1034
1035 @example
1036 #(set-accidental-style 'voice 'StaffGroup)
1037 @end example
1038
1039 The following accidental styles are supported.  To demonstrate
1040 each style, we use the following example:
1041
1042 @lilypond[verbatim,quote,ragged-right]
1043 musicA = {
1044   <<
1045     \relative c' {
1046       cis'8 fis, d'4 <a cis>8 f bis4 |
1047       cis2. <c, g'>4 |
1048     }
1049     \\
1050     \relative c' {
1051       ais'2 cis, |
1052       fis8 b a4 cis2 |
1053     }
1054   >>
1055 }
1056
1057 musicB = {
1058   \clef bass
1059   \new Voice {
1060     \voiceTwo \relative c' {
1061       <fis, a cis>4
1062       \change Staff = up
1063       cis'
1064       \change Staff = down
1065       <fis, a>
1066       \change Staff = up
1067       dis' |
1068       \change Staff = down
1069       <fis, a cis>4 gis <f a d>2 |
1070     }
1071   }
1072 }
1073
1074 \new PianoStaff {
1075   <<
1076     \context Staff = "up" {
1077       %%% change the next line as desired:
1078       #(set-accidental-style 'default)
1079       \musicA
1080     }
1081     \context Staff = "down" {
1082       %%% change the next line as desired:
1083       #(set-accidental-style 'default)
1084       \musicB
1085     }
1086   >>
1087 }
1088 @end lilypond
1089
1090 Note that the last lines of this example can be replaced by the
1091 following, as long as the same accidental style should be used in
1092 both staves.
1093 @example
1094 \new PianoStaff @{
1095   <<
1096     \context Staff = "up" @{
1097       %%% change the next line as desired:
1098       #(set-accidental-style 'default 'Score)
1099       \musicA
1100     @}
1101     \context Staff = "down" @{
1102       \musicB
1103     @}
1104   >>
1105 @}
1106 @end example
1107
1108
1109 @c don't use verbatim in this table.
1110 @table @code
1111 @item default
1112 This is the default typesetting behavior.  It corresponds to
1113 eighteenth-century common practice: accidentals are remembered to
1114 the end of the measure in which they occur and only on their own
1115 octave.  Thus, in the example below, no natural signs are printed
1116 before the@tie{}@code{b} in the second measure or the
1117 last@tie{}@code{c}:
1118
1119 @lilypond[quote,ragged-right]
1120 musicA = {
1121   <<
1122     \relative c' {
1123       cis'8 fis, d'4 <a cis>8 f bis4 |
1124       cis2. <c, g'>4 |
1125     }
1126     \\
1127     \relative c' {
1128       ais'2 cis, |
1129       fis8 b a4 cis2 |
1130     }
1131   >>
1132 }
1133
1134 musicB = {
1135   \clef bass
1136   \new Voice {
1137     \voiceTwo \relative c' {
1138       <fis, a cis>4
1139       \change Staff = up
1140       cis'
1141       \change Staff = down
1142       <fis, a>
1143       \change Staff = up
1144       dis' |
1145       \change Staff = down
1146       <fis, a cis>4 gis <f a d>2 |
1147     }
1148   }
1149 }
1150
1151 \new PianoStaff {
1152   <<
1153     \context Staff = "up" {
1154       #(set-accidental-style 'default)
1155       \musicA
1156     }
1157     \context Staff = "down" {
1158       #(set-accidental-style 'default)
1159       \musicB
1160     }
1161   >>
1162 }
1163 @end lilypond
1164
1165 @item voice
1166 The normal behavior is to remember the accidentals on Staff-level.
1167 In this style, however, accidentals are typeset individually for
1168 each voice.  Apart from that, the rule is similar to
1169 @code{default}.
1170
1171 As a result, accidentals from one voice do not get canceled in
1172 other voices, which is often an unwanted result: in the following
1173 example, it is hard to determine whether the second@tie{}@code{a}
1174 should be played natural or sharp.  The @code{voice} option should
1175 therefore be used only if the voices are to be read solely by
1176 individual musicians.  If the staff is to be used by one musician
1177 (e.g., a conductor or in a piano score) then @code{modern} or
1178 @code{modern-cautionary} should be used instead.
1179
1180
1181 @lilypond[quote,ragged-right]
1182 musicA = {
1183   <<
1184     \relative c' {
1185       cis'8 fis, d'4 <a cis>8 f bis4 |
1186       cis2. <c, g'>4 |
1187     }
1188     \\
1189     \relative c' {
1190       ais'2 cis, |
1191       fis8 b a4 cis2 |
1192     }
1193   >>
1194 }
1195
1196 musicB = {
1197   \clef bass
1198   \new Voice {
1199     \voiceTwo \relative c' {
1200       <fis, a cis>4
1201       \change Staff = up
1202       cis'
1203       \change Staff = down
1204       <fis, a>
1205       \change Staff = up
1206       dis' |
1207       \change Staff = down
1208       <fis, a cis>4 gis <f a d>2 |
1209     }
1210   }
1211 }
1212
1213 \new PianoStaff {
1214   <<
1215     \context Staff = "up" {
1216       #(set-accidental-style 'voice)
1217       \musicA
1218     }
1219     \context Staff = "down" {
1220       #(set-accidental-style 'voice)
1221       \musicB
1222     }
1223   >>
1224 }
1225 @end lilypond
1226
1227 @item modern
1228 @cindex accidentals, modern style
1229 @cindex modern style accidentals
1230 @funindex modern style accidentals
1231
1232 This rule corresponds to the common practice in the twentieth
1233 century.  It prints the same accidentals as @code{default}, with
1234 two exceptions that serve to avoid ambiguity: after temporary
1235 accidentals, cancellation marks are printed also in the following
1236 measure (for notes in the same octave) and, in the same measure,
1237 for notes in other octaves.  Hence the naturals before
1238 the@tie{}@code{b} and the@tie{}@code{c} in the second measure of
1239 the upper staff:
1240
1241 @lilypond[quote,ragged-right]
1242 musicA = {
1243   <<
1244     \relative c' {
1245       cis'8 fis, d'4 <a cis>8 f bis4 |
1246       cis2. <c, g'>4 |
1247     }
1248     \\
1249     \relative c' {
1250       ais'2 cis, |
1251       fis8 b a4 cis2 |
1252     }
1253   >>
1254 }
1255
1256 musicB = {
1257   \clef bass
1258   \new Voice {
1259     \voiceTwo \relative c' {
1260       <fis, a cis>4
1261       \change Staff = up
1262       cis'
1263       \change Staff = down
1264       <fis, a>
1265       \change Staff = up
1266       dis' |
1267       \change Staff = down
1268       <fis, a cis>4 gis <f a d>2 |
1269     }
1270   }
1271 }
1272
1273 \new PianoStaff {
1274   <<
1275     \context Staff = "up" {
1276       #(set-accidental-style 'modern)
1277       \musicA
1278     }
1279     \context Staff = "down" {
1280       #(set-accidental-style 'modern)
1281       \musicB
1282     }
1283   >>
1284 }
1285 @end lilypond
1286
1287 @item modern-cautionary
1288 @cindex accidentals, modern cautionary style
1289 @cindex modern style accidentals
1290 @cindex modern style cautionary accidentals
1291 @cindex modern accidental style
1292 @cindex modern cautionary accidental style
1293 @funindex modern-cautionary
1294
1295 This rule is similar to @code{modern}, but the @q{extra}
1296 accidentals (the ones not typeset by @code{default}) are typeset
1297 as cautionary accidentals.  They are by default printed with
1298 parentheses, but they can also be printed in reduced size by
1299 defining the @code{cautionary-style} property of
1300 @code{AccidentalSuggestion}.
1301
1302
1303 @lilypond[quote,ragged-right]
1304 musicA = {
1305   <<
1306     \relative c' {
1307       cis'8 fis, d'4 <a cis>8 f bis4 |
1308       cis2. <c, g'>4 |
1309     }
1310     \\
1311     \relative c' {
1312       ais'2 cis, |
1313       fis8 b a4 cis2 |
1314     }
1315   >>
1316 }
1317
1318 musicB = {
1319   \clef bass
1320   \new Voice {
1321     \voiceTwo \relative c' {
1322       <fis, a cis>4
1323       \change Staff = up
1324       cis'
1325       \change Staff = down
1326       <fis, a>
1327       \change Staff = up
1328       dis' |
1329       \change Staff = down
1330       <fis, a cis>4 gis <f a d>2 |
1331     }
1332   }
1333 }
1334
1335 \new PianoStaff {
1336   <<
1337     \context Staff = "up" {
1338       #(set-accidental-style 'modern-cautionary)
1339       \musicA
1340     }
1341     \context Staff = "down" {
1342       #(set-accidental-style 'modern-cautionary)
1343       \musicB
1344     }
1345   >>
1346 }
1347 @end lilypond
1348
1349 @item modern-voice
1350 @cindex accidentals, multivoice
1351 @cindex accidentals, modern
1352 @cindex modern accidentals
1353 @cindex multivoice accidentals
1354 @cindex accidental style, modern
1355 @cindex modern accidental style
1356 @funindex modern-voice
1357
1358 This rule is used for multivoice accidentals to be read both by
1359 musicians playing one voice and musicians playing all voices.
1360 Accidentals are typeset for each voice, but they @emph{are}
1361 canceled across voices in the same @code{Staff}.  Hence,
1362 the@tie{}@code{a} in the last measure is canceled because the
1363 previous cancellation was in a different voice, and
1364 the@tie{}@code{d} in the lower staff is canceled because of the
1365 accidental in a different voice in the previous measure:
1366
1367
1368 @lilypond[quote,ragged-right]
1369 musicA = {
1370   <<
1371     \relative c' {
1372       cis'8 fis, d'4 <a cis>8 f bis4 |
1373       cis2. <c, g'>4 |
1374     }
1375     \\
1376     \relative c' {
1377       ais'2 cis, |
1378       fis8 b a4 cis2 |
1379     }
1380   >>
1381 }
1382
1383 musicB = {
1384   \clef bass
1385   \new Voice {
1386     \voiceTwo \relative c' {
1387       <fis, a cis>4
1388       \change Staff = up
1389       cis'
1390       \change Staff = down
1391       <fis, a>
1392       \change Staff = up
1393       dis' |
1394       \change Staff = down
1395       <fis, a cis>4 gis <f a d>2 |
1396     }
1397   }
1398 }
1399
1400 \new PianoStaff {
1401   <<
1402     \context Staff = "up" {
1403       #(set-accidental-style 'modern-voice)
1404       \musicA
1405     }
1406     \context Staff = "down" {
1407       #(set-accidental-style 'modern-voice)
1408       \musicB
1409     }
1410   >>
1411 }
1412 @end lilypond
1413
1414 @cindex accidental style, modern voice cautionary
1415 @cindex accidental style, cautionary, modern voice
1416 @cindex accidental style, voice, modern cautionary
1417 @funindex modern-voice-cautionary
1418 @item modern-voice-cautionary
1419
1420 This rule is the same as @code{modern-voice}, but with the extra
1421 accidentals (the ones not typeset by @code{voice}) typeset
1422 as cautionaries.  Even though all accidentals typeset by
1423 @code{default} @emph{are} typeset with this rule,
1424 some of them are typeset as cautionaries.
1425
1426 @lilypond[quote,ragged-right]
1427 musicA = {
1428   <<
1429     \relative c' {
1430       cis'8 fis, d'4 <a cis>8 f bis4 |
1431       cis2. <c, g'>4 |
1432     }
1433     \\
1434     \relative c' {
1435       ais'2 cis, |
1436       fis8 b a4 cis2 |
1437     }
1438   >>
1439 }
1440
1441 musicB = {
1442   \clef bass
1443   \new Voice {
1444     \voiceTwo \relative c' {
1445       <fis, a cis>4
1446       \change Staff = up
1447       cis'
1448       \change Staff = down
1449       <fis, a>
1450       \change Staff = up
1451       dis' |
1452       \change Staff = down
1453       <fis, a cis>4 gis <f a d>2 |
1454     }
1455   }
1456 }
1457
1458 \new PianoStaff {
1459   <<
1460     \context Staff = "up" {
1461       #(set-accidental-style 'modern-voice-cautionary)
1462       \musicA
1463     }
1464     \context Staff = "down" {
1465       #(set-accidental-style 'modern-voice-cautionary)
1466       \musicB
1467     }
1468   >>
1469 }
1470 @end lilypond
1471
1472 @item piano
1473 @cindex piano accidentals
1474 @cindex piano accidentals
1475 @cindex accidentals, piano
1476 @cindex piano accidental style
1477 @cindex accidental style, piano
1478
1479 This rule reflects twentieth-century practice for piano notation.
1480 Its behavior is very similar to @code{modern} style, but here
1481 accidentals also get canceled across the staves in the same
1482 GrandStaff or PianoStaff, hence all the cancellations of the final
1483 notes.
1484
1485 This accidental style applies to the current @code{GrandStaff} or
1486 @code{PianoStaff} by default.
1487
1488 @lilypond[quote,ragged-right]
1489 musicA = {
1490   <<
1491     \relative c' {
1492       cis'8 fis, d'4 <a cis>8 f bis4 |
1493       cis2. <c, g'>4 |
1494     }
1495     \\
1496     \relative c' {
1497       ais'2 cis, |
1498       fis8 b a4 cis2 |
1499     }
1500   >>
1501 }
1502
1503 musicB = {
1504   \clef bass
1505   \new Voice {
1506     \voiceTwo \relative c' {
1507       <fis, a cis>4
1508       \change Staff = up
1509       cis'
1510       \change Staff = down
1511       <fis, a>
1512       \change Staff = up
1513       dis' |
1514       \change Staff = down
1515       <fis, a cis>4 gis <f a d>2 |
1516     }
1517   }
1518 }
1519
1520 \new PianoStaff {
1521   <<
1522     \context Staff = "up" {
1523       #(set-accidental-style 'piano)
1524       \musicA
1525     }
1526     \context Staff = "down" {
1527       \musicB
1528     }
1529   >>
1530 }
1531 @end lilypond
1532
1533 @item piano-cautionary
1534 @funindex #(set-accidental-style 'piano-cautionary)
1535 @cindex accidentals, piano cautionary
1536 @cindex cautionary accidentals, piano
1537 @cindex piano cautionary accidentals
1538 @cindex accidental style, piano cautionary
1539 @cindex cautionary accidental style, piano
1540 @cindex piano cautionary accidental style
1541
1542 Same as @code{#(set-accidental-style 'piano)} but with the extra
1543 accidentals typeset as cautionaries.
1544
1545 @lilypond[quote,ragged-right]
1546 musicA = {
1547   <<
1548     \relative c' {
1549       cis'8 fis, d'4 <a cis>8 f bis4 |
1550       cis2. <c, g'>4 |
1551     }
1552     \\
1553     \relative c' {
1554       ais'2 cis, |
1555       fis8 b a4 cis2 |
1556     }
1557   >>
1558 }
1559
1560 musicB = {
1561   \clef bass
1562   \new Voice {
1563     \voiceTwo \relative c' {
1564       <fis, a cis>4
1565       \change Staff = up
1566       cis'
1567       \change Staff = down
1568       <fis, a>
1569       \change Staff = up
1570       dis' |
1571       \change Staff = down
1572       <fis, a cis>4 gis <f a d>2 |
1573     }
1574   }
1575 }
1576
1577 \new PianoStaff {
1578   <<
1579     \context Staff = "up" {
1580       #(set-accidental-style 'piano-cautionary)
1581       \musicA
1582     }
1583     \context Staff = "down" {
1584       \musicB
1585     }
1586   >>
1587 }
1588 @end lilypond
1589
1590 @item no-reset
1591 @funindex no-reset accidental style
1592 @cindex accidental style, no reset
1593 @cindex no reset accidental style
1594
1595 This is the same as @code{default} but with accidentals lasting
1596 @q{forever} and not only within the same measure:
1597
1598 @lilypond[quote,ragged-right]
1599 musicA = {
1600   <<
1601     \relative c' {
1602       cis'8 fis, d'4 <a cis>8 f bis4 |
1603       cis2. <c, g'>4 |
1604     }
1605     \\
1606     \relative c' {
1607       ais'2 cis, |
1608       fis8 b a4 cis2 |
1609     }
1610   >>
1611 }
1612
1613 musicB = {
1614   \clef bass
1615   \new Voice {
1616     \voiceTwo \relative c' {
1617       <fis, a cis>4
1618       \change Staff = up
1619       cis'
1620       \change Staff = down
1621       <fis, a>
1622       \change Staff = up
1623       dis' |
1624       \change Staff = down
1625       <fis, a cis>4 gis <f a d>2 |
1626     }
1627   }
1628 }
1629
1630 \new PianoStaff {
1631   <<
1632     \context Staff = "up" {
1633       #(set-accidental-style 'no-reset)
1634       \musicA
1635     }
1636     \context Staff = "down" {
1637       #(set-accidental-style 'no-reset)
1638       \musicB
1639     }
1640   >>
1641 }
1642 @end lilypond
1643
1644 @item forget
1645 @funindex forget accidental style
1646 @cindex forget accidental style
1647 @cindex accidental style, forget
1648
1649 This is the opposite of @code{no-reset}: Accidentals are not
1650 remembered at all -- and hence all accidentals are typeset
1651 relative to the key signature, regardless of what was before in
1652 the music:
1653
1654 @lilypond[quote,ragged-right]
1655 musicA = {
1656   <<
1657     \relative c' {
1658       cis'8 fis, d'4 <a cis>8 f bis4 |
1659       cis2. <c, g'>4 |
1660     }
1661     \\
1662     \relative c' {
1663       ais'2 cis, |
1664       fis8 b a4 cis2 |
1665     }
1666   >>
1667 }
1668
1669 musicB = {
1670   \clef bass
1671   \new Voice {
1672     \voiceTwo \relative c' {
1673       <fis, a cis>4
1674       \change Staff = up
1675       cis'
1676       \change Staff = down
1677       <fis, a>
1678       \change Staff = up
1679       dis' |
1680       \change Staff = down
1681       <fis, a cis>4 gis <f a d>2 |
1682     }
1683   }
1684 }
1685
1686 \new PianoStaff {
1687   <<
1688     \context Staff = "up" {
1689       #(set-accidental-style 'forget)
1690       \musicA
1691     }
1692     \context Staff = "down" {
1693       #(set-accidental-style 'forget)
1694       \musicB
1695     }
1696   >>
1697 }
1698 @end lilypond
1699 @end table
1700
1701 @snippets
1702
1703 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1704 {dodecaphonic-style-accidentals-for-each-note-including-naturals.ly}
1705
1706
1707 @seealso
1708
1709 Snippets:
1710 @lsrdir{Pitches,Pitches}.
1711
1712 Internals Reference:
1713 @internalsref{Accidental_engraver},
1714 @internalsref{Accidental}, @internalsref{AccidentalSuggestion},
1715 @internalsref{AccidentalPlacement}, @internalsref{GrandStaff} and
1716 @internalsref{PianoStaff}, @internalsref{Staff}.
1717
1718
1719 @cindex accidentals and simultaneous notes
1720 @cindex simultaneous notes and accidentals
1721 @cindex accidentals in chords
1722 @cindex chords, accidentals in
1723
1724 @knownissues
1725
1726 Simultaneous notes are considered to be entered in sequential
1727 mode.  This means that in a chord the accidentals are typeset as
1728 if the notes in the chord happen one at a time, in the order in
1729 which they appear in the input file.  This is a problem when
1730 accidentals in a chord depend on each other, which does not happen
1731 for the default accidental style.  The problem can be solved by
1732 manually inserting@tie{}@code{!} and@tie{}@code{?} for the
1733 problematic notes.
1734
1735
1736 @node Ambitus
1737 @unnumberedsubsubsec Ambitus
1738
1739 @cindex ambitus
1740 @cindex range of pitches
1741 @cindex pitch range
1742
1743 The term @notation{ambitus} (pl. ambitus) denotes a range of
1744 pitches for a given voice in a part of music.  It may also denote
1745 the pitch range that a musical instrument is capable of playing.
1746 Ambitus are printed on vocal parts so that performers can easily
1747 determine if it matches their capabilities.
1748
1749 Ambitus are denoted at the beginning of a piece near the initial
1750 clef.  The range is graphically specified by two note heads that
1751 represent the lowest and highest pitches.  Accidentals are only
1752 printed if they are not part of the key signature.
1753
1754 @lilypond[verbatim,quote,ragged-right]
1755 \layout {
1756   \context {
1757     \Voice
1758     \consists Ambitus_engraver
1759   }
1760 }
1761
1762 \relative c'' {
1763   aes c e2 cis,2
1764 }
1765 @end lilypond
1766
1767
1768 @snippets
1769
1770 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1771 {adding-ambitus-per-voice.ly}
1772
1773 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1774 {ambitus-with-multiple-voices.ly}
1775
1776
1777 @seealso
1778
1779 Music Glossary:
1780 @rglos{ambitus}.
1781
1782 Snippets:
1783 @lsrdir{Pitches,Pitches}.
1784
1785 Internals Reference:
1786 @internalsref{Ambitus},
1787 @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead},
1788 @internalsref{AmbitusAccidental}, @internalsref{Ambitus_engraver},
1789 @internalsref{Staff}, @internalsref{Voice}.
1790
1791
1792 @knownissues
1793
1794 There is no collision handling in the case of multiple per-voice
1795 ambitus.
1796
1797
1798 @node Note heads
1799 @subsection Note heads
1800
1801 This section suggests ways of altering note heads.
1802
1803 @menu
1804 * Special note heads::          
1805 * Easy notation note heads::    
1806 * Shape note heads::            
1807 * Improvisation::               
1808 @end menu
1809
1810 @node Special note heads
1811 @unnumberedsubsubsec Special note heads
1812
1813 @cindex note heads, special
1814 @cindex note heads, cross
1815 @cindex note heads, diamond
1816 @cindex note heads, parlato
1817 @cindex note heads, harmonic
1818 @cindex note heads, guitar
1819 @cindex special note heads
1820 @cindex cross note heads
1821 @cindex diamond note heads
1822 @cindex parlato note heads
1823 @cindex harmonic note heads
1824 @cindex guitar note heads
1825
1826 Different note heads are used by various instruments for various
1827 meanings -- crosses are used for @q{parlato} with vocalists,
1828 stopped notes on guitar; diamonds are used for harmonics on string
1829 instruments, etc.  There is a shorthand (@code{\harmonic}) for
1830 diamond shapes; the other note head styles are produced by
1831 tweaking the property:
1832
1833 @lilypond[verbatim,quote,ragged-right,fragment,relative=1]
1834 c4 d
1835 \override NoteHead #'style = #'cross
1836 e f
1837 \revert NoteHead #'style
1838 e d <c f\harmonic> <d a'\harmonic>
1839 @end lilypond
1840
1841 @noindent
1842 To see all note head styles, see @ref{Note head styles}.
1843
1844
1845 @seealso
1846
1847 Snippets:
1848 @lsrdir{Pitches,Pitches}.
1849
1850 Notation Reference:
1851 @ref{Note head styles}.
1852
1853 Internals Reference:
1854 @internalsref{NoteHead},
1855 @internalsref{LedgerLineSpanner}.
1856
1857
1858 @node Easy notation note heads
1859 @unnumberedsubsubsec Easy notation note heads
1860
1861 @cindex note heads, practice
1862 @cindex note heads, easy notation
1863 @cindex easy notation
1864 @cindex Hal Leonard
1865 @cindex beginners' music
1866 @cindex music, beginners'
1867 @cindex easy play note heads
1868 @cindex note heads, easy play
1869
1870 The @q{easy play} note head includes a note name inside the head.
1871 It is used in music for beginners.
1872
1873 @lilypond[verbatim,quote,ragged-right]
1874 #(set-global-staff-size 26)
1875 \relative c' {
1876   \easyHeadsOn
1877   c2 e4 f
1878   g1
1879   \easyHeadsOff
1880   c,1
1881 }
1882 @end lilypond
1883
1884 The command @code{\easyHeadsOn} overrides settings for the
1885 @code{NoteHead} object.  These settings can be reverted with the command
1886 @code{\easyHeadsOff}. To make the letters readable, it has to be printed
1887 in a large font size.  To print with a larger font, see @ref{Setting the
1888 staff size}.
1889
1890 @predefined
1891
1892 @funindex \easyHeadsOn
1893 @funindex \easyHeadsOff
1894 @code{\easyHeadsOn}, @code{\easyHeadsOff}
1895
1896 @seealso
1897
1898 Notation Reference:
1899 @ref{Setting the staff size}.
1900
1901 Snippets:
1902 @lsrdir{Pitches,Pitches},
1903
1904 Internals Reference:
1905 @internalsref{NoteHead}.
1906
1907
1908 @node Shape note heads
1909 @unnumberedsubsubsec Shape note heads
1910
1911 @cindex note heads, shape
1912 @cindex note heads, Aiken
1913 @cindex note heads, sacred harp
1914 @cindex shape notes
1915 @cindex Aiken shape note heads
1916 @cindex sacred harp note heads
1917 @funindex \key
1918 @funindex shapeNoteStyles
1919 @funindex \aikenHeads
1920 @funindex \sacredHarpHeads
1921
1922 In shape note head notation, the shape of the note head
1923 corresponds to the harmonic function of a note in the scale.  This
1924 notation was popular in nineteenth-century American song books.
1925
1926 Shape note heads can be produced by setting @code{\aikenHeads} or
1927 @code{\sacredHarpHeads}, depending on the style desired.
1928
1929 @lilypond[verbatim,fragment,quote,ragged-right,relative=1]
1930 \aikenHeads
1931 c8 d4 e8 a2 g1
1932 \sacredHarpHeads
1933 c,8 d4 e8 a2 g1
1934 @end lilypond
1935
1936 Shapes are typeset according to the step in the scale, where
1937 the base of the scale is determined by the @code{\key} command.
1938
1939 @predefined
1940
1941 @funindex \aikenHeads
1942 @funindex \sacredHarpHeads
1943 @code{\aikenHeads}, @code{\sacredHarpHeads}
1944
1945 @snippets
1946
1947 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc]
1948 {applying-note-head-styles-depending-on-the-step-of-the-scale.ly}
1949
1950 @noindent
1951 To see all note head styles, see @ref{Note head styles}.
1952
1953 @seealso
1954
1955 Snippets:
1956 @lsrdir{Pitches,Pitches}.
1957
1958 Notation Reference:
1959 @ref{Note head styles}.
1960
1961
1962 @node Improvisation
1963 @unnumberedsubsubsec Improvisation
1964
1965 @cindex improvisation
1966 @cindex slashed note heads
1967 @cindex note heads, improvisation
1968 @cindex note heads, slashed
1969
1970 Improvisation is sometimes denoted with slashed note heads, where
1971 the performer may choose any pitch but should play the specified
1972 rhythm.  Such note heads can be created:
1973
1974 @lilypond[verbatim,quote,ragged-right]
1975 \new Voice \with {
1976   \consists Pitch_squash_engraver
1977 } \transpose c c' {
1978   e8 e g a a16( bes) a8 g
1979   \improvisationOn
1980   e8
1981   ~e2~e8 f4 fis8
1982   ~fis2
1983   \improvisationOff
1984   a16(bes) a8 g e
1985 }
1986 @end lilypond
1987
1988
1989 @predefined
1990
1991 @funindex \improvisationOn
1992 @funindex \improvisationOff
1993
1994 @code{\improvisationOn}, @code{\improvisationOff}
1995
1996 @seealso
1997
1998 Snippets:
1999 @lsrdir{Pitches,Pitches}.
2000
2001 Internals Reference:
2002 @internalsref{Pitch_squash_engraver},
2003 @internalsref{Voice}.
2004
2005