]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/pitches.itely
Merge branch 'master' of ssh://kainhofer@git.sv.gnu.org/srv/git/lilypond into kainhofer
[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[ragged-right,line-width=16\cm,staffsize=16,quote]
14 {pitches-headword.ly}
15
16 This section discusses how to specify the pitch of notes.  There
17 are three steps to this process: input, modifying, and output.
18
19 @menu
20 * Writing pitches::             
21 * Changing multiple pitches::   
22 * Displaying pitches::          
23 @end menu
24
25
26 @node Writing pitches
27 @subsection Writing pitches
28
29 This section discusses how to input pitches.
30
31 @menu
32 * Absolute octave entry::       
33 * Relative octave entry::       
34 * Accidentals::                 
35 * Note names in other languages::  
36 @end menu
37
38
39 @node Absolute octave entry
40 @unnumberedsubsubsec Absolute octave entry
41
42 @cindex Pitch names
43 @cindex pitches
44
45 @c don't use @samp here because that might get confused with
46 @c octave marks
47 A pitch name is specified using lowercase letters @code{a} through
48 @code{g}.  An ascending C-major scale is engraved with
49
50 @lilypond[quote,fragment,verbatim,ragged-right]
51 \clef bass
52 c d e f g a b c'
53 @end lilypond
54
55 There are two different ways to enter these note names with regard
56 to octave placement: absolute and relative.  The relative mode
57 will in most cases be the most convenient, but the absolute mode
58 is more fundamental and will be presented first.
59
60 @cindex Absolute
61 @cindex Absolute octave specification
62
63 @c don't use @samp here because that might get confused with
64 @c octave marks
65 In absolute mode, every note is placed explicitly in a certain
66 octave.  The note names @code{c} to @code{b} are engraved in the
67 octave below middle C, as in the previous example.
68
69 @lilypond[quote,fragment,verbatim,ragged-right]
70 \clef treble
71 c1
72 \clef bass
73 c1
74 @end lilypond
75
76 @funindex '
77 @funindex ,
78
79 If a note should be in another octave than this, an octave
80 specification must be given.  It takes the form of a series of
81 single quote (@code{'}) or comma (@code{,}) characters.  Each
82 @code{'} raises the pitch by one octave; each @code{,} lowers the
83 pitch by an octave.
84
85 @lilypond[quote,ragged-right,fragment,verbatim]
86 \clef treble
87 c' c'' e' g d'' d' d c
88 \clef bass
89 c, c,, e, g d,, d, d c
90 @end lilypond
91
92 @seealso
93
94 Snippets: @lsrdir{pitch}
95
96 Program reference: @internalsref{LedgerLineSpanner},
97 @internalsref{NoteHead}.
98
99
100 @node Relative octave entry
101 @unnumberedsubsubsec Relative octaves entry
102
103 @cindex Relative
104 @cindex Relative octave specification
105 @funindex \relative
106
107 The absolute mode requires a lot of octave specifications, which
108 not only becomes tedious but also easily leads to errors.
109 Therefore, it is usually more convenient to let notes be entered
110 relative to the previous note.  This is done with the relative
111 mode.  
112
113 @example
114 \relative @var{startpitch} @var{musicexpr}
115 @end example
116
117 In relative mode, each note is assumed to be as close to the
118 previous note as possible.  This means that the octave of notes
119 that appear in @var{musicexpr} are calculated as follows:
120
121 @itemize
122 @item 
123 The pitch of the first note is relative to @code{\relative
124 @var{startpitch} }.  
125
126 @item
127 If no octave changing marks are used, the basic interval between a
128 note and the one that precedes it is always taken to be a fourth
129 or less.
130
131 @item
132 This distance is determined without regarding alterations or the
133 actual sounding pitches; a @code{fisis} following a @code{ceses}
134 will be put above the @code{ceses}.  In other words, a
135 doubly-augmented fourth is considered a smaller interval than a
136 diminished fifth, even though the doubly-augmented fourth spans
137 seven semitones while the diminished fifth only spans six
138 semitones.
139
140 @item
141 The octave changing marks @code{'} and @code{,} can be added to
142 raise or lower the pitch by an extra octave from the basic
143 interval.
144
145 @item
146 Multiple octave changing marks can be used.  @code{''} will raise
147 the pitch by two octaves.
148
149 @end itemize 
150
151 Here is the relative mode shown in action:
152
153 @lilypond[quote,fragment,ragged-right,verbatim]
154 \relative c'' {
155   b c d c b c bes a
156 }
157 @end lilypond
158
159 Octave changing marks are used for intervals greater than a
160 fourth:
161
162 @lilypond[quote,ragged-right,fragment,verbatim]
163 \relative c'' {
164   c g c f, c' a, e''
165 }
166 @end lilypond
167
168 A note sequence without a single octave mark can nevertheless span
169 large intervals:
170
171 @lilypond[quote,ragged-right,fragment,verbatim]
172 \relative c {
173   c f b e a d g
174 }
175 @end lilypond
176
177 If the preceding item is a chord, the first note of the chord is
178 used as the reference point for the octave placement of a
179 following note or chord:
180
181 @lilypond[quote,ragged-right,fragment,verbatim]
182 \relative c' {
183   c <c e g>
184   <c' e g>
185   <c, e' g> c
186 }
187 @end lilypond
188
189 The @var{startpitch} (after @code{\relative}) is a note name in
190 absolute mode.  In principle it can be any note name, but common
191 practice is to use @code{c} in various octave positions. 
192
193 When octaves are specified as above by adding @code{'} and
194 @code{,} to pitch names, it is easy to accidentally put a pitch in
195 the wrong octave.  The relative octave mode prevents these errors
196 since most of the time it is not necessary to indicate any octaves
197 at all.  Furthermore, in absolute mode, a single mistake may be
198 difficult to spot; in relative mode, a single error puts the rest
199 of the piece off by one octave.
200
201 @seealso
202
203 Snippets: @lsrdir{pitch}
204
205
206 @refbugs
207
208 The relative conversion will not affect @code{\transpose},
209 @code{\chordmode} or @code{\relative} sections in its argument.
210 To use relative within transposed music, an additional
211 @code{\relative} must be placed inside @code{\transpose}.
212
213 @c DEPRECATED
214 If no @var{startpitch} is specified for @code{\relative}, then
215 @code{c'} is assumed.  However, this is a deprecated option and
216 may disappear in future versions, so its use is discouraged.
217
218
219
220 @node Accidentals
221 @unnumberedsubsubsec Accidentals
222
223 @warning{New users are sometimes confused about accidentals and
224 key signatures.  In LilyPond, note names are the raw input; key
225 signatures and clefs determine how this raw input is displayed.
226 An unaltered note like @code{c} means @q{C natural}, regardless of
227 the key signature or clef.  For more information, see
228 @rlearning{Accidentals and key signatures}.}
229
230 @cindex note names, Dutch
231 @cindex note names, default
232
233 A @notation{sharp} pitch is made by adding @code{is} to the name,
234 and a @notation{flat} pitch by adding @code{es}.  As you might
235 expect, a @notation{double sharp} or @notation{double flat} is
236 made by adding @code{isis} or @code{eses}.  This syntax derived
237 from note naming conventions in Nordic and Germanic languages,
238 like German and Dutch.  To use other names for accidentals, see
239 @ref{Note names in other languages}.
240
241 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
242 a2 ais a aes
243 a2 aisis a aeses
244 @end lilypond
245
246 @noindent
247 These are the Dutch note names.  In Dutch, @code{aes} is
248 contracted to @code{as}, but both forms are accepted.  Similarly,
249 both @code{es} and @code{ees} are accepted:
250
251 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
252 a2 as e es
253 @end lilypond
254
255 A natural will cancel the effect of an accidental or key
256 signature.  However, naturals are not encoded into the note name
257 syntax with a suffix; a natural pitch is shown as a simple note
258 name:
259
260 @lilypond[quote,ragged-right,fragment,verbatim,relative=2]
261 a4 aes a2
262 @end lilypond
263
264
265 @cindex accidental, reminder
266 @cindex accidental, cautionary
267 @cindex accidental, parenthesized
268 @cindex reminder accidental
269 @funindex ?
270 @cindex cautionary accidental
271 @cindex parenthesized accidental
272 @funindex !
273
274 Normally accidentals are printed automatically, but you may also
275 print them manually.  A reminder accidental can be forced by
276 adding an exclamation mark @code{!} after the pitch.  A cautionary
277 accidental (i.e., an accidental within parentheses) can be
278 obtained by adding the question mark @code{?} after the pitch.
279 These extra accidentals can be used to produce natural signs, too.
280
281 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
282 cis cis cis! cis? c c? c! c
283 @end lilypond
284
285
286 @cindex quarter tones
287 @cindex semi-flats, semi-sharps
288
289 Half-flats and half-sharps are formed by adding @code{eh} and
290 @code{ih}; the following is a series of Cs with increasing
291 pitches
292
293 @lilypond[verbatim,ragged-right,quote,relative=2,fragment]
294 \set Staff.extraNatural = ##f
295 ceseh ceh cih cisih
296 @end lilypond
297
298 Micro tones are also exported to the MIDI file.
299
300
301 @commonprop
302
303 In accordance with standard typesetting rules, a natural sign is
304 printed before a sharp or flat if a previous accidental needs to
305 be cancelled.  To change this behavior, use
306
307 @lilypond[fragment,quote,ragged-right,verbatim,relative=2]
308 ceses4 ces cis c
309 \set Staff.extraNatural = ##f
310 ceses4 ces cis c
311 @end lilypond
312
313
314 @seealso
315
316 Music glossary: @rglos{sharp}, @rglos{flat}, @rglos{double sharp},
317 @rglos{double flat}.
318
319 Notation reference: @ref{Automatic accidentals}, @ref{Musica ficta
320 accidentals}.
321
322 Snippets: @lsrdir{pitch}
323
324
325 @refbugs
326
327 There are no generally accepted standards for denoting
328 three-quarter flats, so LilyPond's symbol does not conform to any
329 standard.
330
331
332
333 @node Note names in other languages
334 @unnumberedsubsubsec Note names in other languages
335
336 There are predefined sets of note names for various other
337 languages.  To use them, include the language specific init file.
338 For example, add @code{\include "english.ly"} to the top of the
339 input file.  The available language files and the note names they
340 define are:
341
342 @cindex note names, other languages
343
344 @example
345 @multitable @columnfractions .2 .6 .05 .05 .05 .05
346 @headitem Language
347   @tab Note names
348   @tab sharp @tab flat @tab double sharp @tab double flat
349 @item netherlands.ly
350   @tab c d e f g a bes b
351   @tab -is @tab -es @tab -isis @tab -eses
352 @item english.ly
353   @tab c d e f g a bf b 
354   @tab -s/-sharp @tab -f/-flat @tab -ss/-x/-sharpsharp
355     @tab -ff/-flatflat
356 @item deutsch.ly
357   @tab c d e f g a b h 
358   @tab -is @tab -es @tab -isis @tab -eses
359 @item norsk.ly
360   @tab c d e f g a b h 
361   @tab -iss/-is @tab -ess/-es @tab -ississ/-isis
362     @tab -essess/-eses
363 @item svenska.ly
364   @tab c d e f g a b h 
365   @tab -iss @tab -ess @tab -ississ @tab -essess
366 @item italiano.ly
367   @tab do re mi fa sol la sib si 
368   @tab -d @tab -b @tab -dd @tab -bb
369 @item catalan.ly
370   @tab do re mi fa sol la sib si 
371   @tab -d/-s @tab -b @tab -dd/-ss @tab -bb
372 @item espanol.ly
373   @tab do re mi fa sol la sib si 
374   @tab -s @tab -b @tab -ss @tab -bb
375 @end multitable
376 @end example
377
378 @noindent
379 Note that in Dutch, German, Norwegian, and Swedish, the flat
380 alterations of @code{a} like for example @code{aes} and
381 @code{aeses} are usually contracted to @code{as} and @code{ases}
382 (or more commonly @code{asas}).  Sometimes only these contracted
383 names are defined in the corresponding language files (this also
384 applies to the suffixes for quartertones below).
385
386 @noindent
387 Some music uses microtones whose alterations are fractions of a
388 @q{normal} sharp or flat.  The note names for quartertones defined
389 in the various language files are listed in the following table.
390 Here the prefixes @q{semi-} and @q{sesqui-} mean @q{half} and
391 @q{one and a half}, respectively.  For Norwegian, Swedish, Catalan
392 and Spanish no special names have been defined yet.
393
394
395 @c What about Turkish Maquam music and similar microtonal systems?
396 @c
397 @c Note that the term "three-quarter-sharp/-flat" used in lilypond's source code 
398 @c is actually misleading since the alteration is in fact one and a half
399 @c of a regular sharp/flat.  Whence the naming "sesqui-sharp/-flat" used below.
400
401 @example
402 @multitable @columnfractions .2 .6 .05 .05 .05 .05
403 @headitem Language
404   @tab Note names
405   @tab semi- @tab semi- @tab sesqui- @tab sesqui-
406
407 @item nederlands.ly
408   @tab c d e f g a bes b 
409   @tab -ih @tab -eh @tab -isih @tab -eseh
410 @item english.ly
411   @tab c d e f g a bf b 
412   @tab -qs @tab -qf @tab -tqs @tab -tqf
413 @item deutsch.ly
414   @tab c d e f g a b h 
415   @tab -ih @tab -eh @tab -isih @tab -eseh
416 @c @item norsk.ly
417 @c   @tab c d e f g a b h 
418 @c @item svenska.ly
419 @c   @tab c d e f g a b h 
420 @item italiano.ly
421   @tab do re mi fa sol la sib si 
422   @tab -sd @tab -sb @tab -dsd @tab -bsb
423 @c @item catalan.ly 
424 @c   @tab do re mi fa sol la sib si 
425 @c @item  espanol.ly 
426 @c   @tab do re mi fa sol la sib si 
427 @end multitable
428 @end example
429
430 @seealso
431
432 Snippets: @lsrdir{pitch}
433
434
435
436 @node Changing multiple pitches
437 @subsection Changing multiple pitches
438
439 This section discusses how to modify pitches.
440
441 @menu
442 * Octave check::                
443 * Transpose::                   
444 @end menu
445
446 @node Octave check
447 @unnumberedsubsubsec Octave check
448
449 @cindex Octave check
450
451 In relative mode, it is easy to forget an octave changing mark.
452 Octave checks make such errors easier to correct. A note may be
453 followed by @code{=}@var{quotes} to indicate what its absolute
454 octave should be.  In the following example,
455
456 @example
457 \relative c'' @{ c g d='' @}
458 @end example
459
460 @noindent
461 the @code{d} will generate a warning, because a
462 @code{d''} is expected, as indicated by the octave check
463 @code{=''}, but a @code{d'} is found, since both @code{c}-@code{g}
464 and @code{g}-@code{d} without octavation marks are descending
465 fourths.  In the output, the octave is corrected to be a
466 @code{d''} and the next note is calculated relative to @code{d''}
467 instead of @code{d'}.
468
469 There is also an octave check that produces no visible output.
470 The syntax is:
471
472 @example
473 @var{pitch} \octave @var{controlpitch}
474 @end example
475
476 where @var{pitch} is a regular note within a music expression in
477 relative mode and @var{controlpitch} is a pitch in absolute mode.
478 This checks that @var{pitch} lies within the octave surrounding
479 @var{controlpitch}, i.e. not more than a fourth above or below it.
480 If this is not the case, a warning is printed and the octave is
481 corrected.  The @var{controlpitch} is not printed as a note.
482
483 In the example below, the first check passes without incident,
484 since the @code{e} (in @code{relative} mode) is within the octave
485 range of @code{a'}.  However, the second check produces a warning,
486 since the @code{e} is not within the octave range of @code{b'}.
487 The warning message is printed, and the octave is adjusted so that
488 the following notes are in the correct octave once again.
489
490 @example
491 \relative c' @{
492   e
493   \octave a'
494   \octave b'
495 @}
496 @end example
497
498
499 The octave of a note following an @code{\octave} check is
500 determined with respect to the note preceding it, as modified by
501 the outcome of the octave check.  In the next fragment, the first
502 note, an @code{e'}, lies within the octave of @code{b}, and the
503 @code{\octave} check passes successfully. The second note is then
504 calculated relative to (absolute) @code{e'}, which yields an 
505 @code{a'}, above middle C.  In this case, the check had no
506 influence on the output of the piece.
507
508 The second @code{\octave} check fails: @code{a'} is not within the
509 range of @code{b}. A warning is issued, and the last note is
510 calculated relative to @code{a}, not to @code{a'}, and we get a
511 @code{d'}.  Without the last @code{\octave} check, the last note
512 would have been a @code{d''}
513
514 @lilypond[quote,ragged-right,verbatim,fragment]
515 \relative c' {
516   e
517   \octave b
518   a
519   \octave b
520   d
521 }
522 @end lilypond
523
524 @seealso
525
526 Snippets: @lsrdir{pitch}
527
528
529 @node Transpose
530 @unnumberedsubsubsec Transpose
531
532 @cindex Transpose
533 @cindex Transposition of pitches
534 @funindex \transpose
535
536 A music expression can be transposed with @code{\transpose}.  The
537 syntax is
538
539 @example
540 \transpose @var{from} @var{to} @var{musicexpr}
541 @end example
542
543 This means that @var{musicexpr} is transposed by the interval
544 between the pitches @var{from} and @var{to}: any note with pitch
545 @var{from} is changed to @var{to} and any other note is transposed
546 by the same interval.
547
548 Consider a piece written in the key of D-major.  If this piece is
549 a little too low for its performer, it can be transposed up to
550 E-major with
551
552 @example
553 \transpose d e @dots{}
554 @end example
555
556 Consider a part written for violin (a C instrument).  If this part
557 is to be played on the A clarinet (for which an A is notated as a
558 C, and thus sounds a minor third lower than notated), the
559 following transposition will produce the appropriate part:
560
561 @example
562 \transpose a c @dots{}
563 @end example
564
565 @code{\transpose} will also transpose key signatures:
566
567 @lilypond[quote,ragged-right,verbatim]
568 mus = { \key d \major cis d fis g }
569 \new Staff {
570   \clef "F" \mus
571   \clef "G"
572   \transpose c g' \mus
573   \transpose c f' \mus
574 }
575 @end lilypond
576
577 @code{\transpose} distinguishes between enharmonic pitches: both
578 @code{\transpose c cis} or @code{\transpose c des} will transpose
579 up half a tone.  The first version will print sharps and the notes
580 will remain on the same scale step, the second version will print
581 flats on the scale step above.
582
583 @lilypond[quote,ragged-right,verbatim]
584 mus = { c d e f }
585 \new Staff {
586   \transpose c cis { \relative c' \mus }
587   \transpose c des { \relative c' \mus }
588 }
589 @end lilypond
590
591 @code{\transpose} may also be used to input written notes for a
592 transposing instrument.  The previous examples show how to enter
593 pitches in C (or @notation{concert pitch}) and typeset them for a
594 transposing instrument, but the opposite is also possible if you
595 for example have a set of instrumental parts and want to print a
596 conductor's score. For example, when entering music for a B-flat
597 trumpet which begins on a notated E (concert D), one would write:
598
599 @example
600 musicInBflat = @{ e4 @dots{} @}
601 \transpose c bes \musicInBflat
602 @end example
603
604 To print this music in F (e.g., rearranging to a french horn) you
605 would wrap the existing music with another @code{\transpose}
606
607 @example
608 musicInBflat = @{ e4 @dots{} @}
609 \transpose f c @{ \transpose c bes \musicInBflat @}
610 @end example
611
612 @seealso
613
614 Snippets: @lsrdir{pitch}, @lsr{scheme,
615 transpose-pitches-with-minimum-accidentals.ly}.
616
617 Program reference: @internalsref{TransposedMusic}.
618
619 @refbugs
620
621 If you want to use both @code{\transpose} and @code{\relative},
622 you must put @code{\transpose} outside of @code{\relative}, since
623 @code{\relative} will have no effect on music that appears inside
624 a @code{\transpose}. See the previous example. 
625
626
627 @node Displaying pitches
628 @subsection Displaying pitches
629
630 This section discusses how to alter the output of pitches.
631
632 @menu
633 * Clef::                        
634 * Key signature::               
635 * Ottava brackets::             
636 * Instrument transpositions::   
637 * Automatic accidentals::       
638 @end menu
639
640 @node Clef
641 @unnumberedsubsubsec Clef
642
643 @funindex \clef
644
645 @cindex G clef
646 @cindex C clef
647 @cindex F clef
648 @cindex treble clef
649 @cindex violin clef
650 @cindex alto clef
651 @cindex tenor clef
652 @cindex bass clef
653 @cindex french clef
654 @cindex soprano clef
655 @cindex mezzosoprano clef
656 @cindex baritone clef
657 @cindex varbaritone clef
658 @cindex subbass clef
659
660 The clef is set with the @code{\clef} @var{clefname} 
661 command:
662
663 @lilypond[quote,ragged-right,fragment,verbatim]
664 <<
665   \new Staff {
666     % treble clef by default
667     c'1^"middle C"
668   }
669   \new Staff {
670     \clef alto
671     c'1^"middle C"
672   }
673   \new Staff {
674     \clef bass
675     c'1^"middle C"
676   }
677 >>
678 @end lilypond
679
680 The clef can also be changed inside the staff:
681
682 @lilypond[quote,ragged-right,fragment,verbatim]
683 \new PianoStaff <<
684   \new Staff {
685     \time 2/4
686     \clef treble
687     r16
688     \clef bass
689     e g c' e' e g c'
690   }
691   \new Staff {
692     \clef bass
693     c,8 r \clef treble g''4
694   }
695 >>
696 @end lilypond
697
698 These same clef symbols are used in different positions on
699 the staff to change the range of notes shown by that staff.
700 The treble (alto, bass) clef is always positioned to show
701 the line on which a g' (c', f) note is printed.
702  
703 Supported clefs include
704
705 @multitable @columnfractions .4 .6
706 @headitem Clef @tab Position
707 @item @code{treble, violin, G, G2} @tab
708 G clef (g') on 2nd line
709 @item @code{alto, C} @tab
710 C clef (c') on 3rd line
711 @item @code{tenor} @tab
712 C clef (c') on 4th line.
713 @item @code{bass, F} @tab
714 F clef (f) on 4th line
715 @item @code{french} @tab
716 G clef (g') on 1st line, so-called French violin clef
717 @item @code{soprano} @tab
718 C clef (c') on 1st line
719 @item @code{mezzosoprano} @tab
720 C clef (c') on 2nd line
721 @item @code{baritone} @tab
722 C clef (c') on 5th line
723 @item @code{varbaritone} @tab
724 F clef (f) on 3rd line
725 @item @code{subbass} @tab
726 F clef (f) on 5th line
727 @item @code{percussion} @tab
728 percussion clef
729 @item @code{tab} @tab
730 tablature clef
731 @end multitable
732
733 Further supported clefs are described under @ref{Ancient clefs}.
734
735 By adding @code{_8} or @code{^8} to the clef name, the clef is
736 transposed one octave down or up, respectively, and @code{_15} and
737 @code{^15} transposes by two octaves.  The argument @var{clefname}
738 must be enclosed in quotes when it contains underscores or digits.
739 For example,
740
741 @cindex choral tenor clef
742
743 @lilypond[quote,ragged-right,verbatim,fragment,relative=1]
744 \clef "G_8" c4
745 @end lilypond
746
747 @commonprop
748
749 When a clef change takes place at a line break the new clef symbol
750 is printed at both the end of the previous line and the beginning
751 of the new line by default.  If the warning clef at the end of the
752 previous line in not required it can be suppressed by setting the
753 @code{explicitClefVisibility} Staff property to the value
754 @var{end-of-line-invisible}:  @code{\set
755 Staff.explicitClefVisibility = #end-of-line-invisible} The default
756 behaviour can be recovered with @code{\unset
757 Staff.explicitClefVisibility}
758
759 The command @code{\clef "treble_8"} is equivalent to setting
760 @code{clefGlyph}, @code{clefPosition} (which controls the Y
761 position of the clef), @code{middleCPosition} and
762 @code{clefOctavation}.  A clef is printed when either the
763 @code{clefGlyph}, @code{clefPosition} or @code{clefOctavation}
764 properties are changed.  Note that changing the glyph, the
765 position of the clef, or the octavation, does not in itself change
766 the position of subsequent notes on the staff: the position of
767 middle C must also be specified to do this.  The positional
768 parameters are relative to the staff centre line, positive numbers
769 displacing upwards, counting 1 for each line and space.  The
770 clefOctavation value would normally be set to 7, -7, 15 or -15,
771 but other values are not invalid.
772
773 The following examples show the possibilities when setting these
774 properties manually.  First some manual changes which preserve the
775 standard relative positioning of clefs and notes:
776
777 @lilypond[quote,ragged-right,verbatim]
778 {
779   % The default treble clef
780   c'4
781   % The standard bass clef
782   \set Staff.clefGlyph = #"clefs.F"
783   \set Staff.clefPosition = #2
784   \set Staff.middleCPosition = #6
785   c'4
786   % The baritone clef
787   \set Staff.clefGlyph = #"clefs.C"
788   \set Staff.clefPosition = #4
789   \set Staff.middleCPosition = #4
790   c'4
791   % The standard choral tenor clef
792   \set Staff.clefGlyph = #"clefs.G"
793   \set Staff.clefPosition = #-2
794   \set Staff.clefOctavation = #-7
795   \set Staff.middleCPosition = #1
796   c'4
797   % A non-standard clef
798   \set Staff.clefPosition = #0
799   \set Staff.clefOctavation = #0
800   \set Staff.middleCPosition = #-4
801   c'4
802 }
803 @end lilypond
804
805 and some which do not:
806
807 @lilypond[quote,ragged-right,verbatim]
808 {
809   \set Staff.clefGlyph = #"clefs.F"
810   \set Staff.clefPosition = #2
811   c'4
812   \set Staff.clefGlyph = #"clefs.G"
813   c'4
814   \set Staff.clefGlyph = #"clefs.C"
815   c'4
816   \set Staff.clefOctavation = #7
817   c'4
818   \set Staff.clefOctavation = #0
819   \set Staff.clefPosition = #0
820   c'4
821   \set Staff.middleCPosition = #4
822   c'4
823 }
824 @end lilypond
825
826 @seealso
827
828 Notation reference: @ref{Ancient clefs}.
829
830 Snippets: @lsrdir{pitch}
831
832 Program reference: @internalsref{Clef}.
833
834
835 @node Key signature
836 @unnumberedsubsubsec Key signature
837
838 @cindex Key signature
839 @funindex \key
840
841 @warning{New users are sometimes confused about accidentals and
842 key signatures.  In LilyPond, note names are the raw input; key
843 signatures and clefs determine how this raw input is displayed.
844 An unaltered note like @code{c} means @q{C natural}, regardless of
845 the key signature or clef.  For more information, see
846 @rlearning{Accidentals and key signatures}.}
847
848 The key signature indicates the tonality in which a piece is
849 played.  It is denoted by a set of alterations (flats or sharps)
850 at the start of the staff.
851
852 Setting or changing the key signature is done with the @code{\key}
853 command:
854
855 @example
856 \key @var{pitch} @var{type}
857 @end example
858
859 @funindex \minor
860 @funindex \major
861 @funindex \minor
862 @funindex \ionian
863 @funindex \locrian
864 @funindex \aeolian
865 @funindex \mixolydian
866 @funindex \lydian
867 @funindex \phrygian
868 @funindex \dorian
869 @cindex church modes
870
871 Here, @var{type} should be @code{\major} or @code{\minor} to get
872 @var{pitch}-major or @var{pitch}-minor, respectively.  You may
873 also use the standard mode names (also called @q{church modes}):
874 @code{\ionian}, @code{\locrian}, @code{\aeolian},
875 @code{\mixolydian}, @code{\lydian}, @code{\phrygian}, and
876 @code{\dorian}.
877
878 @lilypond[quote,ragged-right,verbatim,relative=2,fragment]
879 \key g \major
880 f1
881 fis
882 @end lilypond
883
884
885 @commonprop
886
887 A natural sign is printed to cancel any previous accidentals.
888 This may be altered:
889
890 @lilypond[quote,fragment,ragged-right,verbatim,relative=2]
891 \key d \major
892 a b cis d
893 \key g \minor
894 a bes c d
895 \set Staff.printKeyCancellation = ##f
896 \key d \major
897 a b cis d
898 \key g \minor
899 a bes c d
900 @end lilypond
901
902 The @code{\key} command sets the context property
903 @code{Staff.keySignature}.  Non-standard key signatures can be
904 specified by setting this property directly.  The format of this
905 command is a list:
906
907 @example
908 \set Staff.keySignature = #'((@var{octave} .  @var{step}) . @var{alter})
909 @end example
910
911 @noindent
912 where, for each element in the list, @var{octave} specifies the
913 octave (0 being the octave from middle C to the B above),
914 @var{step} specifies the note within the octave (0 means C and 6
915 means B), and @var{alter} is ,SHARP ,FLAT ,DOUBLE-SHARP etc.
916 (Note the leading comma.)  Here is an example of a possible key
917 signature for generating a whole-tone scale:
918
919 @lilypond[quote,ragged-right,verbatim]
920 \relative c'
921   \new Staff {
922     \set Staff.keySignature = 
923       #`(((0 .  3) . ,SHARP) ((0 . 5) . ,FLAT) ((0 . 6) . ,FLAT))
924     c d e fis aes bes c
925 }
926 @end lilypond
927
928 @seealso
929
930 Music glossary: @rglos{Church mode}, @rglos{scordatura}.
931
932 Snippets: @lsrdir{pitch},
933 FIXME link to snippet 248,
934 FIXME link to a snippet about scordatura.
935
936 Program reference: @internalsref{KeyCancellation},
937 @internalsref{KeySignature}, @internalsref{Key_engraver}
938
939
940 @node Ottava brackets
941 @unnumberedsubsubsec Ottava brackets
942
943 @cindex ottava
944 @cindex 15ma
945 @cindex 8va
946 @cindex 8ve
947 @cindex octavation
948
949 @notation{Ottava brackets} introduce an extra transposition of an
950 octave for the staff:
951
952 @lilypond[quote,ragged-right,verbatim,fragment]
953 \relative c''' {
954   a2 b
955   #(set-octavation 1)
956   a b
957   #(set-octavation 0)
958   a b
959 }
960 @end lilypond
961
962 The @code{set-octavation} function also takes -1 (for 8va bassa),
963 2@tie{}(for 15ma), and -2 (for 15ma bassa) as arguments.
964 Internally the function sets the properties @code{ottavation}
965 (e.g., to @code{"8va"} or @code{"8vb"}) and
966 @code{middleCPosition}.  To override the text of the bracket, set
967 @code{ottavation} after invoking @code{set-octavation}, i.e.,
968
969 @lilypond[quote,ragged-right,verbatim]
970 {
971   #(set-octavation 1)
972   \set Staff.ottavation = #"8"
973   c'''
974 }
975 @end lilypond
976
977
978 @seealso
979
980 Snippets: @lsrdir{pitch}
981
982 Program reference: @internalsref{OttavaBracket}.
983
984
985 @refbugs
986
987 @code{set-octavation} will get confused when clef changes happen
988 during an octavation bracket.
989
990
991 @node Instrument transpositions
992 @unnumberedsubsubsec Instrument transpositions
993
994 @cindex transposition, MIDI
995 @cindex transposition, instrument
996
997 The key of a @notation{transposing instrument} can be specified.
998 This applies to many wind instruments, for example, clarinets
999 (B-flat, A, and E-flat), horn (F) and trumpet (B-flat, C, D, and
1000 E-flat).
1001
1002 The transposition is entered with the command
1003
1004 @example
1005 \transposition @var{pitch}
1006 @end example
1007
1008 @noindent
1009 where @var{pitch} specifies the key in which the instrument plays.
1010 For example, a part for B-flat clarinet would include
1011
1012 @example
1013 \transposition bes
1014 @end example
1015
1016 This command sets the property @code{instrumentTransposition}.
1017 The value of this property is used for MIDI output and quotations.
1018 MIDI output is transposed to play at concert pitch, and cue notes
1019 and quotations are automatically transposed to the key of the
1020 instrument in which they are quoted.  For more information about
1021 quotations, see @ref{Quoting other voices}.
1022
1023 The pitch to use for @code{\transposition} should correspond to
1024 the real sound heard when a @code{c'} written on the staff is
1025 played by the transposing instrument.  @code{\transposition}
1026 should be used when the music is entered from an orchestral part
1027 written for the instrument.  For example, in classical horn parts,
1028 the tuning of the instrument is often changed during a piece.
1029 Here are a few notes for a violin and a B-flat clarinet where the
1030 parts have been entered using the notes and key as they appear in
1031 each part or the conductor's score:
1032
1033 @lilypond[quote,ragged-right,verbatim]
1034 \new GrandStaff <<
1035     \new Staff = "Violin I" {
1036       \set Staff.instrumentName = "Vln"
1037       \set Staff.midiInstrument="violin"
1038       \key c \major
1039       \transposition c
1040       g'4( c''8) r c'' r c''4
1041     }
1042     \new Staff = "Clarinet" {
1043       \set Staff.instrumentName = "Cl"
1044       \set Staff.midiInstrument="clarinet"
1045       \key d \major
1046       \transposition bes
1047       a'4( d''8) r d'' r d''4
1048     }
1049 >>
1050 @end lilypond
1051
1052 Without the @code{\transposition} command the midi output of this
1053 music would play the notes a tone apart; with it the notes are
1054 played correctly in unison.
1055
1056 However, when entering the notes of a score in concert pitch, when
1057 all voices are entered in C, they may be prefaced by (the default)
1058 @code{\transposition c'}:
1059
1060 @example
1061 clarinet = @{
1062   \transposition c'
1063   ...
1064 @}
1065 saxophone = @{
1066   \transposition c'
1067   ...
1068 @}
1069 @end example
1070
1071 @noindent
1072 to serve as a reminder that these parts are written in C.
1073
1074
1075 @seealso
1076
1077 Notation reference: @ref{Quoting other voices}, @ref{Transpose}.
1078
1079 Snippets: @lsrdir{pitch}
1080
1081
1082 @node Automatic accidentals
1083 @unnumberedsubsubsec Automatic accidentals
1084 @cindex Automatic accidentals
1085
1086 Common rules for typesetting accidentals have been placed in a
1087 function.  This function is called as follows
1088
1089 @funindex set-accidental-style
1090 @example
1091 #(set-accidental-style 'STYLE)
1092 @end example
1093
1094 @c TODO: check the context stuff below
1095 @c -does it *really* work?
1096 @c -the default contexts as specified in
1097 @c  scm/music-function.scm seem to be different -vv
1098
1099 Optionally, the function can take two arguments: the name of the
1100 accidental style, and an optional argument that denotes the context that
1101 should be changed:
1102
1103 @example
1104 #(set-accidental-style 'STYLE #('CONTEXT#))
1105 @end example
1106
1107 If no context name is supplied, @code{Staff} is the default,
1108 but you may wish to apply the accidental style to a single @code{Voice}
1109 instead.
1110
1111 The following accidental styles are supported:
1112
1113 @table @code
1114 @item default
1115 This is the default typesetting behavior.  It corresponds
1116 to 18th century common practice: Accidentals are
1117 remembered to the end of the measure in which they occur and
1118 only on their own octave.
1119
1120 @lilypond[quote,ragged-right]
1121 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1122        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1123
1124 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1125         \change Staff = up cis' \change Staff = down <fis, a>  
1126         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1127         <f a d>2 |  } }}
1128
1129 \score { 
1130         \new PianoStaff {
1131        << \context Staff = "up" {
1132                %#(set-accidental-style 'default) 
1133        \musicA }
1134        \context Staff = "down"{
1135                %#(set-accidental-style 'default)
1136        \musicB } >> }
1137        \header { piece = \markup {\fill-line { \fontsize #3  "'default" }}}
1138 }
1139 @end lilypond
1140
1141 @item voice
1142 The normal behavior is to remember the accidentals on
1143 Staff-level.  This variable, however, typesets accidentals
1144 individually for each voice.  Apart from that, the rule is similar to
1145 @code{default}.
1146
1147 @example
1148  \new Staff <<
1149         #(set-accidental-style 'voice)
1150         @{ @dots{} @}
1151         >>
1152 @end example
1153
1154 As a result, accidentals from one voice do not get canceled in other
1155 voices, which is often an unwanted result: in the following example, it
1156 is hard to determine whether the second @samp{a} should be played
1157 natural or sharp.
1158
1159 @lilypond[quote,ragged-right]
1160 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1161        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1162
1163 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1164         \change Staff = up cis' \change Staff = down <fis, a>  
1165         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1166         <f a d>2 |  } }}
1167
1168 \score { 
1169         \new PianoStaff {
1170        << \context Staff = "up" {
1171                #(set-accidental-style 'voice) 
1172        \musicA }
1173        \context Staff = "down"{
1174                #(set-accidental-style 'voice)
1175        \musicB } >> }
1176        \header { piece = \markup {\fill-line { \fontsize #3  "'voice" }}}
1177 }
1178 @end lilypond
1179
1180 The @code{voice} option should be used if the voices
1181 are to be read solely by individual musicians.  If the staff is to be
1182 used by one musician (e.g., a conductor) then
1183 @code{modern} or @code{modern-cautionary}
1184 should be used instead.
1185
1186 @item modern
1187 @funindex modern style accidentals
1188 This rule corresponds to the common practice in the 20th century.  This rule
1189 prints the same accidentals as @code{default}, but temporary
1190 accidentals also are canceled in other octaves.  Furthermore,
1191 in the same octave, they also get canceled in the following
1192 measure: in the following example, notice the two natural signs which appear
1193 in the second bar of the upper staff.
1194
1195 @lilypond[quote,ragged-right]
1196 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1197        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1198
1199 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1200         \change Staff = up cis' \change Staff = down <fis, a>  
1201         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1202         <f a d>2 |  } }}
1203
1204 \score { 
1205         \new PianoStaff {
1206        << \context Staff = "up" {
1207                #(set-accidental-style 'modern) 
1208        \musicA }
1209        \context Staff = "down"{
1210                #(set-accidental-style 'modern)
1211        \musicB } >> }
1212        \header { piece = \markup {\fill-line { \fontsize #3  "'modern" }}}
1213 }
1214 @end lilypond
1215
1216 @item @code{modern-cautionary}
1217 @funindex modern-cautionary
1218 This rule is similar to @code{modern}, but the @q{extra} accidentals
1219 (the ones not typeset by @code{default}) are typeset as cautionary
1220 accidentals.  They are printed in reduced size or (by default)
1221 with parentheses -- this can be set by definig the @code{cautionary-style}
1222 property of the @internalsref{AccidentalSuggestion} object.
1223
1224 @lilypond[quote,ragged-right]
1225 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1226        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1227
1228 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1229         \change Staff = up cis' \change Staff = down <fis, a>  
1230         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1231         <f a d>2 |  } }}
1232
1233 \score { 
1234         \new PianoStaff {
1235        << \context Staff = "up" {
1236                #(set-accidental-style 'modern-cautionary) 
1237        \musicA }
1238        \context Staff = "down"{
1239                #(set-accidental-style 'modern-cautionary)
1240        \musicB } >> }
1241        \header { piece = \markup {\fill-line { \fontsize #3  "'modern-cautionary" }}}
1242 }
1243 @end lilypond
1244
1245 @funindex modern-voice
1246 @item modern-voice
1247 This rule is used for multivoice accidentals to be read both by musicians
1248 playing one voice and musicians playing all voices.  Accidentals are
1249 typeset for each voice, but they @emph{are} canceled across voices in
1250 the same @internalsref{Staff}.
1251
1252 @lilypond[quote,ragged-right]
1253 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1254        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1255
1256 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1257         \change Staff = up cis' \change Staff = down <fis, a>  
1258         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1259         <f a d>2 |  } }}
1260
1261 \score { 
1262         \new PianoStaff {
1263        << \context Staff = "up" {
1264                #(set-accidental-style 'modern-voice) 
1265        \musicA }
1266        \context Staff = "down"{
1267                #(set-accidental-style 'modern-voice)
1268        \musicB } >> }
1269        \header { piece = \markup {\fill-line { \fontsize #3  "'modern-voice" }}}
1270 }
1271 @end lilypond
1272
1273 @funindex modern-voice-cautionary
1274 @item modern-voice-cautionary
1275 This rule is the same as @code{modern-voice}, but with the extra
1276 accidentals (the ones not typeset by @code{voice}) typeset
1277 as cautionaries.  Even though all accidentals typeset by
1278 @code{default} @emph{are} typeset by this variable,
1279 some of them are typeset as cautionaries.
1280
1281 @lilypond[quote,ragged-right]
1282 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1283        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1284
1285 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1286         \change Staff = up cis' \change Staff = down <fis, a>  
1287         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1288         <f a d>2 |  } }}
1289
1290 \score { 
1291         \new PianoStaff {
1292        << \context Staff = "up" {
1293                #(set-accidental-style 'modern-voice-cautionary) 
1294        \musicA }
1295        \context Staff = "down"{
1296                #(set-accidental-style 'modern-voice-cautionary)
1297        \musicB } >> }
1298        \header { piece = \markup {\fill-line { \fontsize #3  "'modern-voice-cautionary" }}}
1299 }
1300 @end lilypond
1301
1302 @item piano
1303 @funindex piano accidentals
1304 This accidental style takes place in a GrandStaff context.  However, you have to 
1305 explicitly set it for @emph{each} individual Staff of the GrandStaff:
1306
1307 @example
1308 \new GrandStaff @{ <<
1309   \new Staff = "up" @{ <<
1310     #(set-accidental-style 'piano)
1311     @{ @dots{} @}
1312   >> @}
1313   \new Staff = "down"@{ <<
1314     #(set-accidental-style 'piano)
1315   @{ @dots{} @}
1316   >> @}
1317 >> @}
1318 @end example
1319
1320 This rule reflects 20th century practice for piano notation.  Its behavior is very
1321 similar to @code{modern} style, but here accidentals also get canceled
1322 across the staves in the same @internalsref{GrandStaff} or
1323 @internalsref{PianoStaff}.
1324
1325 @lilypond[quote,ragged-right]
1326 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1327        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1328
1329 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1330         \change Staff = up cis' \change Staff = down <fis, a>  
1331         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1332         <f a d>2 |  } }}
1333
1334 \score { 
1335         \new PianoStaff {
1336        << \context Staff = "up" {
1337                #(set-accidental-style 'piano) 
1338        \musicA }
1339        \context Staff = "down"{
1340                #(set-accidental-style 'piano)
1341        \musicB } >> }
1342        \header { piece = \markup {\fill-line { \fontsize #3  "'piano" }}}
1343 }
1344 @end lilypond
1345
1346 @item piano-cautionary
1347 @funindex #(set-accidental-style 'piano-cautionary)
1348 Same as @code{#(set-accidental-style 'piano)} but with the extra
1349 accidentals typeset as cautionaries.
1350
1351 @lilypond[quote,ragged-right]
1352 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1353        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1354
1355 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1356         \change Staff = up cis' \change Staff = down <fis, a>  
1357         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1358         <f a d>2 |  } }}
1359
1360 \score { 
1361         \new PianoStaff {
1362        << \context Staff = "up" {
1363                #(set-accidental-style 'piano-cautionary) 
1364        \musicA }
1365        \context Staff = "down"{
1366                #(set-accidental-style 'piano-cautionary)
1367        \musicB } >> }
1368        \header { piece = \markup {\fill-line { \fontsize #3  "'piano-cautionary" }}}
1369 }
1370 @end lilypond
1371
1372 @item no-reset
1373 @funindex no-reset accidental style
1374 This is the same as @code{default} but with accidentals lasting
1375 @q{forever} and not only until the next measure:
1376 @lilypond[quote,ragged-right]
1377 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1378        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1379
1380 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1381         \change Staff = up cis' \change Staff = down <fis, a>  
1382         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1383         <f a d>2 |  } }}
1384
1385 \score { 
1386         \new PianoStaff {
1387        << \context Staff = "up" {
1388                #(set-accidental-style 'no-reset) 
1389        \musicA }
1390        \context Staff = "down"{
1391                #(set-accidental-style 'no-reset)
1392        \musicB } >> }
1393        \header { piece = \markup {\fill-line { \fontsize #3  "'no-reset" }}}
1394 }
1395 @end lilypond
1396
1397 @item forget
1398 This is sort of the opposite of @code{no-reset}: Accidentals
1399 are not remembered at all -- and hence all accidentals are
1400 typeset relative to the key signature, regardless of what was
1401 before in the music
1402
1403 @lilypond[quote,ragged-right]
1404 musicA = {  << \relative {  cis'8 fis, d'4 <a cis>8 f bis4 | cis2. <c, g'>4 | } \\
1405        \relative { ais'2 cis, | fis8 b a4 cis2 | } >> }
1406
1407 musicB = { \clef bass  \new Voice { \voiceTwo \relative { < fis, a cis>4 
1408         \change Staff = up cis' \change Staff = down <fis, a>  
1409         \change Staff = up dis' | \change Staff = down <fis, a cis>4 gis 
1410         <f a d>2 |  } }}
1411
1412 \score { 
1413         \new PianoStaff {
1414        << \context Staff = "up" {
1415                #(set-accidental-style 'forget) 
1416        \musicA }
1417        \context Staff = "down"{
1418                #(set-accidental-style 'forget)
1419        \musicB } >> }
1420        \header { piece = \markup {\fill-line { \fontsize #3  "'forget" }}}
1421 }
1422 @end lilypond
1423 @end table
1424
1425
1426 @seealso
1427
1428 Program reference: @internalsref{Accidental_engraver},
1429 @internalsref{Accidental}, @internalsref{AccidentalSuggestion} and @internalsref{AccidentalPlacement}.
1430
1431
1432 @refbugs
1433
1434 Simultaneous notes are considered to be entered in sequential
1435 mode.  This means that in a chord the accidentals are typeset as if the
1436 notes in the chord happen one at a time, in the order in which
1437 they appear in the input file.  This is a problem when accidentals
1438 in a chord depend on each other,
1439 which does not happen for the default accidental style.  The problem
1440 can be solved by manually inserting @code{!} and @code{?} for the
1441 problematic notes.
1442
1443
1444