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