]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/chords.itely
Update from Carl.
[lilypond.git] / Documentation / user / chords.itely
1 @c -*- coding: utf-8; mode: texinfo; -*-
2 @ignore
3     Translation of GIT committish: FILL-IN-HEAD-COMMITTISH
4
5     When revising a translation, copy the HEAD committish of the
6     version that you are working on.  See TRANSLATION for details.
7 @end ignore
8
9 @c \version "2.11.38"
10
11
12 @node Chord notation
13 @section Chord notation
14
15 Chords can be entered in chord mode, which recognizes some
16 traditional European chord naming conventions.  Chord names can also
17 be displayed.  In addition, figured bass notation can be displayed.
18
19 @menu
20 * Chord mode::                  
21 * Displaying chords::           
22 * old Modern chords::           
23 * Figured bass::                
24 @end menu
25
26
27 @node Chord mode
28 @subsection Chord mode
29
30 @cindex chord chords
31
32 Chord mode is used to enter chords using an indicator of the chord
33 structure, rather than the chord pitches.
34
35 @menu
36 * Chord mode overview::         
37 * Common chords::               
38 * Extended and altered chords::  
39 @end menu
40
41 @node Chord mode overview
42 @unnumberedsubsubsec Chord mode overview
43
44 @cindex chord names
45 @cindex chord mode
46
47 Chords can be entered as simultaneous music, as discussed in
48 @ref{Chorded notes}.
49
50 Chords can also be entered in @qq{chord mode}, which is an input
51 mode that focuses on the structures of chords in traditional
52 European music, rather than on specific pitches.  This is
53 convenient for those who are familiar with using chord names to
54 describe chords.  More information on different input modes can be
55 found at @ref{Input modes}.
56
57 @lilypond[verbatim,quote,ragged-right,relative=1]
58 \chordmode { c1 g a g c }
59 @end lilypond
60
61 Chords entered using chord mode are music elements, and can be
62 transposed just like chords entered using simultaneous music.
63
64 @seealso
65
66 Music Glossary:
67 @rglos{chord}.
68
69 Notation Reference:
70 @ref{Chorded notes},
71 @ref{Input modes}.
72
73 Snippets:
74 @rlsr{Chords}
75
76 @node Common chords
77 @unnumberedsubsubsec Common chords
78
79 @cindex triads
80 @cindex seventh chords
81 @cindex root of chord
82 @cindex modifiers, in chords.
83 @cindex chord quality
84
85 Major triads are entered by including the root and an
86 optional duration:
87
88 @lilypond[verbatim,quote,relative=1,ragged-right]
89 \chordmode { c2 f4 g }
90 @end lilypond
91
92 Minor, augmented, and diminished triads are entered by placing
93 @code{:} and a quality modifier string after the duration:
94
95 @lilypond[verbatim,quote,ragged-right,relative=1]
96 \chordmode { c2:m f4:aug g:dim }
97 @end lilypond
98
99 Seventh chords may be created:
100
101 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
102 \chordmode {
103   c1:7 c:m7 c:maj7 c:dim7 c:aug7
104 }
105 @end lilypond
106
107 @funindex aug
108 @funindex dim
109 @funindex maj
110 @funindex m
111
112 The table belows shows the actions of the quality modifiers on
113 triads and seventh chords.
114
115 @table @code
116
117 @item m
118 The minor chord.  This modifier lowers the 3rd and (if present) the
119 7th step.
120
121 @item dim
122 The diminished chord.  This modifier lowers the 3rd, 5th and (if
123 present) the 7th step.
124
125 @item aug
126 The augmented chord.  This modifier raises the 5th step.
127
128 @item maj
129 The major 7th chord.  This modifier adds a raised 7th step.  The
130 @code{7} following @code{maj} is optional.  Do NOT use this modifier
131 to create a major triad.
132
133 @end table
134
135 @c TODO -- perhaps add warning about c and c:maj being different, while
136 @c   c:maj and c:maj7 are the same
137
138 @seealso
139
140 Snippets:
141 @rlsr{Chords}
142
143 @node Extended and altered chords
144 @unnumberedsubsubsec Extended and altered chords
145
146 @cindex extended chords
147 @cindex altered chords
148
149 Chord structures of arbitrary complexity can be created in chord
150 mode.  The modifier string can be used to extend a chord, add or
151 remove chord steps, raise or lower chord steps, and add a bass note
152 or create an inversion.
153
154 The first number following the @code{:} is taken to be the extent
155 of the chord.  The chord is constructed by sequentially adding
156 thirds to the root until the specified number has been reached.
157 If the extent is not a third (e.g., 6), thirds are added up to the
158 highest third below the extent, and then the step of the extent is
159 added.  The largest possible value for the extent is 13.  Any
160 larger value is interpreted as 13.
161
162 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
163 \chordmode {
164 c:2 c:3 c:4 c:5
165 c:6 c:7 c:8 c:9
166 c:10 c:11 c:12 c:13
167 }
168 @end lilypond
169
170 Since an unaltered 11 does not sound good when combined with an
171 unaltered 13, the 11 is removed from a @code{:13} chord (unless it
172 is added explicitly).
173
174 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
175 \chordmode { c1:13 c:13.11 c:m13 }
176 @end lilypond
177
178 @cindex additions, in chords
179
180 Individual steps can be added to a chord.  Additions follow the
181 extent and are prefixed by a dot (@code{.}).
182
183 @lilypond[quote,verbatim,fragment,relative=1]
184 \chordmode { c1:5.6 c:3.7.8 c:3.6.13 }
185 @end lilypond
186
187 Added steps can be as high as desired.
188
189 @lilypond[quote,verbatim,fragment,relative=1]
190 \chordmode { c4:5.15 c:5.20 c:5.25 c:5.30 }
191 @end lilypond
192
193 @cindex chord steps, altering
194
195 Added chord steps can be altered by suffixing a @code{-} or @code{+}
196 sign to the number.  To alter a step that is lower than the extent,
197 add it as an altered step.
198
199 @lilypond[quote,verbatim,fragment,relative=1]
200 \chordmode { c1:7+ c:5+.3- c:3-.5-.7- }
201 @end lilypond
202
203 @cindex removals, in chords
204
205 @funindex ^
206
207 A step to be removed from the chord  must come at the end of a
208 modifier string and be by @code{^}.  Only one removal with @code{^}
209 is allowed in a modifier string.
210
211 @lilypond[quote,verbatim,fragment,relative=1]
212 \chordmode { c1^3 c:7^5 c:9^3.5 }
213 @end lilypond
214
215 @funindex sus
216
217 The modifier @code{sus} can be added to the modifier string to
218 create suspended chords.  This removes the 3rd step from the chord.
219 Append either @code{2} or @code{4} to add the 2nd or 4th step to the
220 chord.  @code{sus} is equivalent to @code{^3}; @code{sus4} is
221 equivalent to @code{.4^3}.
222
223 @lilypond[quote,ragged-right,fragment,verbatim]
224 \chordmode { c1:sus c:sus2 c:sus4 c:5.4^3 }
225 @end lilypond
226
227 It is possible to remove the 3rd step with @code{sus} and remove
228 another step with @code{^} in one modifier string.
229
230 @funindex /
231 @cindex chord inversions
232 @cindex bass note, for chords
233
234 Inversions (putting a pitch other than the root on the bottom of the
235 chord) and added bass notes can be specified by appending
236 @code{/}@var{pitch} to the chord.
237
238 @lilypond[quote,ragged-right,fragment,verbatim, relative=2]
239 \chordmode { c1 c/g c/f }
240 @end lilypond
241
242 @funindex /+
243
244 A bass note that is part of the chord can be added, instead of
245 moved as part of an inversion, by using @code{/+}@var{pitch}.
246
247 @lilypond[quote,ragged-right,fragment,verbatim]
248 \chordmode { c1 c/+g c/+f }
249 @end lilypond
250
251 @seealso
252
253 Snippets:
254 @rlsr{Chords}
255
256 @knownissues
257
258 Each step can only be present in a chord once.  The following
259 simply produces the augmented chord, since @code{5+} is
260 interpreted last.
261
262 @lilypond[quote,ragged-right,verbatim,fragment]
263 \chordmode { c1:5.5-.5+ }
264 @end lilypond
265
266 Only one step can be removed from a chord.  If a chord with multiple
267 removed steps is desired, it must be built through addition of
268 multiple steps.
269
270
271 @node Displaying chords
272 @subsection Displaying chords
273
274 Chords can be displayed by name, in addition to the standard display
275 as notes on a staff.
276
277 @menu
278 * Printing chord names::        
279 * Customizing chord names::     
280 @end menu
281
282 @node Printing chord names
283 @unnumberedsubsubsec Printing chord names
284
285 @cindex printing chord names
286 @cindex chord names
287 @cindex chords
288
289 Chord names are printed in the @code{ChordNames} context:
290
291 @lilypond[verbatim,quote,relative=1,ragged-right]
292 \new ChordNames {
293   \chordmode { c2 f4. g8 }
294 }
295 @end lilypond
296
297 Both chord names and the notes can be displayed:
298
299 @lilypond[verbatim,quote,ragged-right]
300 myChords = \relative c'{
301   \chordmode { c2 f4. g8 }
302 }
303 <<
304   \new ChordNames { \myChords }
305   \myChords
306 >>
307 @end lilypond
308
309 Chords can be entered as simultaneous notes or through the use of
310 chord mode.  The displayed chord name will be the same, regardless
311 of the mode of entry:
312
313 @lilypond[quote,ragged-right,verbatim]
314 twoWays = \relative c' {
315   \chordmode {
316      c2 f:sus4
317   }
318   {
319     <c e g>  <f bes c>
320   }
321 }
322 <<
323   \new ChordNames \twoWays
324   \new Voice \twoWays
325 >>
326 @end lilypond
327
328 @funindex{\chords}
329
330 @code{\chords} is a shortcut method used to change the input mode to
331 @code{\chordmode} and create a @code{ChordNames} context, with the
332 following result:
333
334 @lilypond[verbatim,quote,ragged-right, relative=1]
335 \chords { c2 f4.:m g8:maj7 }
336 @end lilypond
337
338 @cindex lead sheet
339
340 When put together, chord names, a melody, and lyrics form a lead
341 sheet:
342
343 @lilypond[verbatim,quote,ragged-right]
344 <<
345   \chords { c2 g:sus4 f e }
346   \relative c'' {
347     a4 e c8 e r4
348     b2 c4( d)
349   }
350   \addlyrics { One day this shall be free __ }
351 >>
352 @end lilypond
353
354
355
356 @snippets
357
358 If repeats are used in the music, and the volta brackets are to be
359 dispayed above the chord names, @code{voltaOnThisStaff} must be set
360 to @code{##t}.  To add bar indications in the @code{ChordNames}
361 context, add @rinternals{Bar_engraver}.
362
363 @lilypond[ragged-right,verbatim]
364 \new ChordNames \with {
365   \override BarLine #'bar-size = #4
366   voltaOnThisStaff = ##t
367   \consists "Bar_engraver"
368 }
369 \chordmode {
370   \repeat volta 2 {
371     f1:maj7 f:7 bes:7 c:maj7
372   }
373   \alternative {
374     ees e
375   }
376 }
377 @end lilypond
378
379 @seealso
380
381 Music Glossary:
382 @rglos{chord}.
383
384
385 Notation Reference:
386 @ref{Writing music in parallel}.
387
388
389 Snippets:
390 @rlsr{Chords}.
391
392 Internals Reference:
393 @rinternals{ChordNames},
394 @rinternals{Volta_engraver},
395 @rinternals{Bar_engraver}.
396
397 @knownissues
398
399 Chords containing inversions or altered bass notes are not named
400 properly.
401
402
403 @node Customizing chord names
404 @unnumberedsubsubsec Customizing chord names
405
406 @cindex customizing chord names
407
408 There is no unique system for naming chords.  Different musical
409 traditions use different names for the same set of chords.  There
410 are also different symbols displayed for a given chord name.   The
411 names and symbols displayed for chord names are customizable.
412
413 @cindex Banter
414 @cindex jazz chords
415 @cindex chords, jazz
416
417 The default chord name layout is a system for Jazz music, proposed
418 by Klaus Ignatzek (see @ref{Literature list}).  There are also two
419 other chord name schemes implemented: an alternate Jazz chord
420 notation, and a systematic scheme called Banter chords.  The
421 alternate Jazz notation is also shown on the chart in @ref{Chord
422 name chart}.
423
424 In addition to the different naming systems, different note names
425 are used for the root in different languages.  The predefined
426 variables @code{\germanChords}, @code{\semiGermanChords},
427 @code{\italianChords} and @code{\frenchChords} set these variables.
428 The effect is demonstrated here:
429
430 @lilypondfile[ragged-right]{chord-names-languages.ly}
431
432 @c TODO - this paragraph is moved here from an earlier section
433 @c and needs to be corrected.
434 This example also shows that the chord printing routines cannot
435 correctly identify the root of a chord if it has been entered using
436 @code{< .. >} instead of named chord entry.  Therefore, the sixth
437 chord (@code{f bes d}) is not interpreted as an inversion.   In
438 contrast, the third chord, which contains the same notes as the sixth
439 chord, is correctly identified because it was entered in the named
440 chord mode.
441
442 If none of the default settings give the desired output, the chord
443 name display can be tuned through the following properties.
444
445 @ignore
446
447 @table @code
448
449 @funindex chordRootNamer
450
451 @item chordRootNamer
452
453 The chord name is usually printed as a letter for the root with an
454 optional alteration.  The transformation from pitch to letter is
455 done by this function.  Special note names (for example, the German
456 @q{H} for a B-chord) can be produced by storing a new function in
457 this property.
458
459 @funindex majorSevenSymbol
460
461 @item majorSevenSymbol
462
463 This property contains the markup object used to follow the output
464 of @code{chordRootNamer} to dentify a major 7 chord. Predefined
465 options are @code{whiteTriangleMarkup} and
466 @code{blackTriangleMarkup}.
467
468 @funindex chordNoteNamer
469
470 @item chordNoteNamer
471
472 When the chord name contains additional pitches other than the root
473 (e.g., an added bass note), this function is used to print the
474 additional pitch.  By default the pitch is printed using
475 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
476 to a specialized function to change this behavior.  For example, the
477 bass note can be printed in lower case.
478
479 @funindex chordNameSeparator
480
481 @item chordNameSeparator
482
483 Different parts of a chord name are normally separated by a slash.
484 By setting @code{chordNameSeparator}, you can use any desired markup
485 for a separator, e.g.,
486
487 @lilypond[quote,ragged-right,fragment,verbatim]
488 \chords {
489   c:7sus4
490   \set chordNameSeparator
491     = \markup { \typewriter "|" }
492   c:7sus4
493 }
494 @end lilypond
495
496 @funindex chordNameExceptions
497
498 @item chordNameExceptions
499
500 This property is a list of pairs.  The first item in each pair
501 is a set of pitches used to identify the steps present in the chord.
502 The second item is a markups that will follow the @code{chordRootNamer}
503 output to create the chord name.  See @code{FIXME -- future ref to snippet}
504 for information on creating this list.
505
506 @funindex chordPrefixSpacer @item chordPrefixSpacer
507
508 The @q{m} for minor chords is usually printed immediately to the
509 right of the root of the chord.  By setting
510 @code{chordPrefixSpacer}, you can fix a spacer between the root
511 and @q{m}.  The spacer is not used when the root is altered.
512
513 @end table
514 @end ignore
515
516 @predefined
517
518 @funindex major seven symbols
519 @code{\whiteTriangleMarkup}
520 @code{\blackTriangleMarkup}
521 @funindex \germanChords
522 @code{\germanChords},
523 @funindex \semiGermanChords
524 @code{\semiGermanChords},
525 @funindex \italianChords
526 @code{\italianChords},
527 @funindex \frenchChords
528 @code{\frenchChords}.
529
530
531 @snippets
532 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
533 {chord-names-jazz.ly}
534
535 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
536 {chord-name-exceptions.ly}
537 @cindex exceptions, chord names.
538
539 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
540 {chord-name-major7.ly}
541
542 @c TODO -- see if the code below is in chord-name-exceptions.ly
543 @c   if so, remove it.  If not, convert this to a snippet.
544 @ignore
545 The first step is to define sequential music that has the chords to
546 be named with the desired markup (except for the root name) attached
547 to the chord:
548
549 @example
550 FGGChordNames = @{
551   <c e g b d'>1-\markup @{ \super "maj9" @}
552   <c e g a d'>1-\markup @{ \super "6(add9)" @}
553 @}
554 @end example
555
556 The second step is to convert the music from the first step to an
557 exceptions list:
558
559 @example
560 FGGExceptions = #(sequential-music-to-chord-exceptions
561 FGGChordNames #t)
562 @end example
563
564 The third step is to append the default exceptions list (in this
565 case, the Ignatzek exceptions) to the newly-defined exceptions list:
566
567 @example
568 chExceptions = #(append FGGExceptions ignatzekExceptions)
569 @end example
570
571 The final step is to set @code{chordNameExceptions} to the
572 newly-created exceptions list:
573
574 @example
575 \set chordNameExceptions = #chExceptions
576 @end example
577
578 The entire process is illustrated below:
579
580 @lilypond[quote,ragged-right,verbatim]
581 FGGChordNames = {
582   <c e g b d'>1-\markup { \super "maj9" }
583   <c e g a d'>1-\markup { \super "6(add9)" }
584 }
585 FGGExceptions = #(sequential-music-to-chord-exceptions
586 FGGChordNames #t)
587 chExceptions = #(append FGGChordNames
588  ignatzekExceptions)
589
590 chordStuff = \chordmode
591 {
592 % standard names
593 g1:maj9
594 g1:6.9
595 % names with FGG's custom exceptions
596 \set chordNameExceptions = #chExceptions
597 g1:maj9
598 g1:6.9
599 }
600
601 \score
602 {
603 \new ChordNames \chordStuff
604 }
605 @end lilypond
606 @end ignore
607
608
609 @seealso
610
611 Installed Files:
612 @file{scm/@/chords@/-ignatzek@/.scm},
613 @file{scm/@/chord@/-entry@/.scm},
614 @file{ly/@/chord@/-modifier@/-init@/.ly}.
615
616 Snippets:
617 @rlsr{Chords}.
618
619 Internals Reference:
620 @c @rinternals{}.
621
622 @knownissues
623
624 Chord names are determined from both the pitches that are present
625 in the chord and the information on the chord structure that may
626 have been entered in @code{\chordmode}.  If the simultaneous pitches
627 method of entering chords is used, undesired names result from
628 inversions or bass notes.
629
630 @lilypond[quote,ragged-right,verbatim]
631 myChords = \relative c' {
632   \chordmode{ c1 c/g c/f }
633   <c e g> <g c e> <f c' e g>
634 }
635 <<
636   \new ChordNames { \myChords }
637   \new Staff { \myChords }
638 >>
639 @end lilypond
640
641 @node old Modern chords
642 @subsection old Modern chords
643
644 @menu
645 * Entering chord names::        
646 * old Lead sheets::             
647 * old Printing chord names::    
648 @end menu
649
650 @node Entering chord names
651 @subsubsection Entering chord names
652 @cindex chord names
653
654 LilyPond has support for printing chord names.  Chords may be entered
655 in musical chord notation, i.e., @code{< .. >}, but they can also be
656 entered by name.  Internally, the chords are represented as a set of
657 pitches, so they can be transposed
658
659
660 @lilypond[quote,ragged-right,verbatim,ragged-right]
661 twoWays = \transpose c c' {
662   \chordmode {
663     c1 f:sus4 bes/f
664   }
665   <c e g>
666   <f bes c'>
667   <f bes d'>
668 }
669
670 << \new ChordNames \twoWays
671    \new Voice \twoWays >>
672 @end lilypond
673
674 This example also shows that the chord printing routines do not try to
675 be intelligent.  The last chord (@code{f bes d}) is not interpreted as
676 an inversion.
677
678 Note that the duration of chords must be specified outside the
679 @code{<>}.
680
681 @example
682 <c e g>2
683 @end example
684
685 @c TODO Generate snippet based on the following
686 @c      and add explanation -td
687
688 Custom chord names may be generated:
689
690 @lilypond[quote,ragged-right,verbatim,ragged-right]
691 FGGChordNames = {
692   <c e g b d'>1-\markup { \super "maj9" }
693   <c e g a d'>1-\markup { \super "6(add9)" }
694 }
695 chExceptions = #(append
696 (sequential-music-to-chord-exceptions
697 FGGChordNames #t) ignatzekExceptions)
698
699 chordStuff = \chordmode
700 {
701 % standard names
702 g1:maj9
703 g1:6.9
704 % names with FGG's custom exceptions
705 \set chordNameExceptions = #chExceptions
706 g1:maj9
707 g1:6.9
708 }
709
710 \score
711 {
712 \new ChordNames \chordStuff
713 }
714 @end lilypond
715
716
717
718 @node old Lead sheets
719 @subsubsection old Lead sheets
720
721 @cindex lead sheet
722
723 For lead sheets, chords are not printed on staves, but as names on
724 a line for themselves.  This is achieved by using @code{\chords}
725 instead of @code{\chordmode}.
726
727 When put together, chord names, lyrics and a melody form a lead
728 sheet,
729
730 @lilypond[verbatim,quote,ragged-right]
731 <<
732   \chords { c2 g:sus4 f e }
733   \relative c'' {
734     a4 e c8 e r4
735     b2 c4( d)
736   }
737   \addlyrics { One day this shall be free __ }
738 >>
739 @end lilypond
740
741
742
743 @node old Printing chord names
744 @subsubsection old Printing chord names
745
746 @cindex printing chord names
747 @cindex chord names
748 @cindex chords
749
750 For displaying printed chord names, use the @rinternals{ChordNames} context.
751 The chords may be entered either using the notation
752 described above, or directly using @code{<} and @code{>}
753
754 @lilypond[quote,verbatim,ragged-right]
755 harmonies = {
756   \chordmode {a1 b c} <d' f' a'> <e' g' b'>
757 }
758 <<
759   \new ChordNames \harmonies
760   \new Staff \harmonies
761 >>
762 @end lilypond
763
764 You can make the chord changes stand out by setting
765 @rinternals{ChordNames}.@code{chordChanges} to true.  This will only
766 display chord names when there is a change in the chords scheme and at
767 the start of a new line
768
769 @lilypond[quote,verbatim,ragged-right]
770 harmonies = \chordmode {
771   c1:m c:m \break c:m c:m d
772 }
773 <<
774   \new ChordNames {
775     \set chordChanges = ##t
776     \harmonies }
777   \new Staff \transpose c c' \harmonies
778 >>
779 @end lilypond
780
781 The previous examples all show chords over a staff.  This is not
782 necessary.  Chords may also be printed separately.  It may be necessary
783 to add @rinternals{Volta_engraver} and @rinternals{Bar_engraver}
784 for showing repeats.
785
786 @lilypond[ragged-right,verbatim]
787 \new ChordNames \with {
788   \override BarLine #'bar-size = #4
789   \consists Bar_engraver
790   \consists "Volta_engraver"
791 }
792 \chordmode { \repeat volta 2 {
793   f1:maj7 f:7 bes:7
794   c:maj7
795 } \alternative {
796   es e
797 }
798 }
799 @end lilypond
800
801
802 The default chord name layout is a system for Jazz music, proposed by
803 Klaus Ignatzek (see @ref{Literature list}).  It can be tuned through the
804 following properties
805
806 @table @code
807 @funindex chordNameExceptions
808 @item chordNameExceptions
809 This is a list that contains the chords that have special formatting.
810
811 The exceptions list should be encoded as
812 @example
813 @{ <c f g bes>1 \markup @{ \super "7" "wahh" @} @}
814 @end example
815
816 To get this information into @code{chordNameExceptions} takes a little
817 maneuvering.  The following code transforms @code{chExceptionMusic}
818 (which is a sequential music) into a list of exceptions.
819 @example
820 (sequential-music-to-chord-exceptions chExceptionMusic #t)
821 @end example
822 Then,
823 @example
824 (append
825  (sequential-music-to-chord-exceptions chExceptionMusic #t)
826  ignatzekExceptions)
827 @end example
828 adds the new exceptions to the default ones, which are defined in
829 @file{ly/@/chord@/-modifier@/-init@/.ly}.
830
831 For an example of tuning this property, see also
832 @c @lsr{chords,chord@/-name@/-exceptions@/.ly}
833 @cindex exceptions, chord names.
834
835
836 @funindex majorSevenSymbol
837 @item majorSevenSymbol
838 This property contains the markup object used for the 7th step, when
839 it is major.  Predefined options are @code{whiteTriangleMarkup} and
840 @code{blackTriangleMarkup}.  See
841 @c @lsr{chords,chord@/-name@/-major7@/.ly} for an example.
842
843 @funindex chordNameSeparator
844 @item chordNameSeparator
845 Different parts of a chord name are normally separated by a
846 slash.  By setting @code{chordNameSeparator}, you can specify other
847 separators, e.g.,
848 @lilypond[quote,ragged-right,fragment,verbatim]
849 \new ChordNames \chordmode {
850   c:7sus4
851   \set chordNameSeparator
852     = \markup { \typewriter "|" }
853   c:7sus4
854 }
855 @end lilypond
856
857 @funindex chordRootNamer
858 @item chordRootNamer
859 The root of a chord is usually printed as a letter with an optional
860 alteration.  The transformation from pitch to letter is done by this
861 function.  Special note names (for example, the German @q{H} for a
862 B-chord) can be produced by storing a new function in this property.
863
864 @funindex chordNoteNamer
865 @item chordNoteNamer
866 The default is to print single pitch, e.g., the bass note, using the
867 @code{chordRootNamer}.  The @code{chordNoteNamer} property can be set
868 to a specialized function to change this behavior.  For example, the
869 base can be printed in lower case.
870
871 @funindex chordPrefixSpacer
872 @item chordPrefixSpacer
873 The @q{m} for minor chords is usually printed right after the root of
874 the chord.  By setting @code{chordPrefixSpacer}, you can fix a spacer
875 between the root and @q{m}.  The spacer is not used when the root
876 is altered.
877
878 @end table
879
880 The predefined variables @code{\germanChords},
881 @code{\semiGermanChords}, @code{\italianChords} and @code{\frenchChords}
882 set these variables.  The effect is
883 demonstrated here,
884
885 @lilypondfile[ragged-right]{chord-names-languages.ly}
886
887 There are also two other chord name schemes implemented: an alternate
888 Jazz chord notation, and a systematic scheme called Banter chords.  The
889 alternate Jazz notation is also shown on the chart in @ref{Chord name
890 chart}.  Turning on these styles is demonstrated in
891 @c @lsr{chords,chord-names-jazz.ly}.
892
893 @cindex Banter
894 @cindex jazz chords
895 @cindex chords, jazz
896
897
898 @predefined
899
900 @funindex \germanChords
901 @code{\germanChords},
902 @funindex \semiGermanChords
903 @code{\semiGermanChords}.
904 @funindex \italianChords
905 @code{\italianChords}.
906 @funindex \frenchChords
907 @code{\frenchChords}.
908
909
910
911
912 @seealso
913
914 Examples:
915
916 Init files: @file{scm/@/chords@/-ignatzek@/.scm}, and
917 @file{scm/@/chord@/-entry@/.scm}.
918
919
920 @knownissues
921
922 Chord names are determined solely from the list of pitches.  Chord
923 inversions are not identified, and neither are added bass notes.  This
924 may result in strange chord names when chords are entered with the
925 @code{< .. >} syntax.
926
927
928 @node Figured bass
929 @subsection Figured bass
930
931 @menu
932 * Introduction to figured bass::  
933 * Entering figured bass::       
934 * Displaying figured bass::     
935 @end menu
936
937 @node Introduction to figured bass
938 @subsubsection Introduction to figured bass
939
940 @cindex Basso continuo
941
942 @c TODO: musicological blurb about FB
943
944 LilyPond has support for figured bass
945
946 @lilypond[quote,ragged-right,verbatim,fragment]
947 <<
948   \new Voice { \clef bass dis4 c d ais g fis}
949   \new FiguredBass \figuremode {
950     < 6 >4 < 7\+ >8 < 6+ [_!] >
951     < 6 >4 <6 5 [3+] >
952     < _ >4 < 6 5/>4
953   }
954 >>
955 @end lilypond
956
957 The support for figured bass consists of two parts: there is an
958 input mode, introduced by @code{\figuremode}, where you can enter
959 bass figures as numbers, and there is a context named
960 @rinternals{FiguredBass} that takes care of making
961 @rinternals{BassFigure} objects.
962
963 Although the support for figured bass may superficially resemble chord
964 support, it is much simpler.  The @code{\figuremode} mode simply
965 stores the numbers and @rinternals{FiguredBass} context prints them
966 as entered.  There is no conversion to pitches and no realizations of
967 the bass are played in the MIDI file.
968
969 Internally, the code produces markup texts.  You can use any of the
970 markup text properties to override formatting.  For example, the
971 vertical spacing of the figures may be set with @code{baseline-skip}.
972
973
974 @menu
975 * Entering figured bass::
976 * Displaying figured bass::
977 @end menu
978
979 @node Entering figured bass
980 @unnumberedsubsubsec Entering figured bass
981
982
983 In figures input mode, a group of bass figures is delimited by
984 @code{<} and @code{>}.  The duration is entered after the @code{>}
985 @example
986 <4 6>2
987 @end example
988 @lilypond[quote,ragged-right,fragment]
989 \new FiguredBass
990 \figuremode { <4 6>2 }
991 @end lilypond
992
993 Accidentals are added when you append @code{-}, @code{!}, and @code{+}
994 to the numbers.  A plus sign is added when you append @code{\+}, and
995 diminished fifths and sevenths can be obtained with @code{5/} and @code{7/}.
996
997 @example
998 <4- 6+ 7!>3 <5++> <3--> <7/> r <6\+ 5/>
999 @end example
1000 @lilypond[quote,ragged-right,fragment]
1001 \figures { <4- 6+ 7!>4 <5++> <3--> <7/> r <6\+ 5/> }
1002 @end lilypond
1003
1004 Spaces may be inserted by using @code{_}.  Brackets are
1005 introduced with @code{[} and @code{]}.  You can also include text
1006 strings and text markups, see @ref{Text markup commands}.
1007
1008 @example
1009 < [4 6] 8 [_! 12] >4 < 5 \markup @{ \number 6 \super (1) @} >
1010 @end example
1011 @lilypond[quote,ragged-right,fragment]
1012 \new FiguredBass
1013 \figuremode { < [4 6] 8 [_! 12] >4 < 5 \markup{ \tiny \number 6 \super (1)} > }
1014 @end lilypond
1015
1016
1017 It is also possible to use continuation lines for repeated figures,
1018
1019 @lilypond[verbatim,relative=1]
1020 <<
1021   \new Staff {
1022     \clef bass
1023     c4 c c
1024   }
1025   \figures {
1026     \set useBassFigureExtenders = ##t
1027     <4 6>4 <3 6> <3 7>
1028   }
1029 >>
1030 @end lilypond
1031
1032 @noindent
1033 In this case, the extender lines always replace existing figures.
1034
1035 The @code{FiguredBass} context doesn't pay attention to the actual
1036 bass line.  As a consequence, you may have to insert extra figures to
1037 get extender lines below all notes, and you may have to add @code{\!}
1038 to avoid getting an extender line, e.g.
1039
1040 @lilypond[relative=1]
1041 <<
1042   \new Voice
1043   \figures {
1044     \set useBassFigureExtenders = ##t
1045     <6 4->4. <6 4->16. <6 4->32 <5>8. r16 <6>8 <6\! 5->
1046   }
1047   {
1048     \clef bass
1049     f16. g32 f16. g32 f16. g32 f16. g32 f8. es16 d8 es
1050   }
1051 >>
1052 @end lilypond
1053
1054 When using continuation lines, common figures are always put in the
1055 same vertical position.  When this is unwanted, you can insert a rest
1056 with @code{r}.  The rest will clear any previous alignment.  For
1057 example, you can write
1058
1059 @example
1060 <4 6>8 r8
1061 @end example
1062
1063 @noindent
1064 instead of
1065 @example
1066 <4 6>4
1067 @end example
1068
1069 Accidentals and plus signs can appear before or after the numbers,
1070 depending on the @code{figuredBassAlterationDirection} and
1071 @code{figuredBassPlusDirection}
1072 properties
1073
1074 @lilypond
1075   \figures {
1076     <6\+> <5+> <6 4-> r
1077     \set figuredBassAlterationDirection = #1
1078     <6\+> <5+> <6 4-> r
1079     \set figuredBassPlusDirection = #1
1080     <6\+> <5+> <6 4-> r
1081     \set figuredBassAlterationDirection = #-1
1082     <6\+> <5+> <6 4-> r
1083   }
1084 @end lilypond
1085
1086
1087 Figured bass can also be added to @code{Staff} contexts
1088 directly.  In this case, their vertical position is adjusted
1089 automatically.
1090
1091 @lilypond[ragged-right,fragment,quote]
1092 <<
1093   \new Staff = someUniqueName
1094   \relative c'' {
1095     c4 c'8 r8 c,4 c'
1096   }
1097
1098   %% send to existing Staff.
1099   \context Staff = someUniqueName
1100   \figuremode {
1101     <4>4 <6 10>8 s8
1102
1103     \set Staff.useBassFigureExtenders = ##t
1104     <4 6>4 <4 6>
1105   }
1106 >>
1107 @end lilypond
1108
1109 @c @predefined
1110
1111 @c @snippets
1112
1113 @seealso
1114 @c Music Glossary:
1115 @c @rglos{}.
1116
1117 @c Learning Manual:
1118 @c @rlearning{}.
1119
1120 @c Notation Reference:
1121 @c @ruser{}.
1122
1123 @c Application Usage:
1124 @c @rprogram{}.
1125
1126 @c Installed Files:
1127 @c @file{}.
1128
1129 @c Snippets:
1130 @c @rlsr{}.
1131
1132 @c Internals Reference:
1133 @c @rinternals{}.
1134
1135 @c @knownissues
1136
1137 @node Displaying figured bass
1138 @unnumberedsubsubsec Displaying figured bass
1139
1140 Figured bass is displayed using the @code{FiguredBass} context.
1141
1142 @c @predefined
1143
1144 @c @snippets
1145
1146 @seealso
1147 @c Music Glossary:
1148 @c @rglos{}.
1149
1150 @c Learning Manual:
1151 @c @rlearning{}.
1152
1153 @c Notation Reference:
1154 @c @ruser{}.
1155
1156 @c Application Usage:
1157 @c @rprogram{}.
1158
1159 @c Installed Files:
1160 @c @file{}.
1161
1162 @c Snippets:
1163 @c @rlsr{}.
1164
1165 Internals Reference:
1166 @rinternals{NewBassFigure},
1167 @rinternals{BassFigureAlignment},
1168 @rinternals{BassFigureLine},
1169 @rinternals{BassFigureBracket},
1170 @rinternals{BassFigureContinuation},
1171 @rinternals{FiguredBass}.
1172
1173 @knownissues
1174
1175 By default, this method produces figures above the notes.  To get
1176 figures below the notes, use
1177
1178 @example
1179 \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
1180 @end example
1181
1182 When using figured bass above the staff with extender lines and
1183 @code{implicitBassFigures} the lines may become swapped around.
1184 Maintaining order consistently will be impossible when multiple figures
1185 have overlapping extender lines.  To avoid this problem, please
1186 use @code{stacking-dir} on @code{BassFigureAlignment}.
1187
1188
1189 @seealso