]> 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 * old Modern chords::           
22 * Figured bass::                
23 @end menu
24
25
26 @node Chord mode
27 @subsection Chord mode
28
29 @cindex chord chords
30
31 @menu
32 * Chord mode overview::         
33 * Common chords::               
34 * Extended and altered chords::  
35 @end menu
36
37 @node Chord mode overview
38 @unnumberedsubsubsec Chord mode overview
39
40 @cindex chord names
41 @cindex chord mode
42
43 Chords can be entered as simultaneous music, as discussed in
44 @ref{Chorded notes}.
45
46 Chords can also be entered in chord mode, which is an input mode
47 that focuses on the structures of chords in traditional European
48 music, rather than on specific pitches.  This is convenient for
49 those who are familiar with using chord names to describe chords.
50
51 More information on different input modes can be found at @ref{Input
52 modes FIXME}.
53
54 Chord mode is entered by using @code{\chordmode}.
55
56 Chords entered using chord mode are music elements, and can be
57 transposed just like chords entered using simultaneous music.
58
59 The example below shows a simple chord progression:
60
61 @lilypond[verbatim,quote,ragged-right,relative=1]
62 \chordmode { c1 g a g c }
63 @end lilypond
64
65 @seealso
66
67 Music Glossary:
68 @rglos{chord}.
69
70 Notation Reference:
71 @ref{Chorded notes},
72 @ref{Input modes FIXME}.
73
74 Snippets:
75 @rlsr{Chords}
76
77 @node Common chords
78 @unnumberedsubsubsec Common chords
79
80 @cindex triads
81 @cindex seventh chords
82 @cindex root of chord
83 @cindex modifiers, in chords.
84 @cindex chord quality
85
86 Major triads are entered by including the root and a duration:
87
88 @lilypond[verbatim,quote,relative=1,ragged-right]
89 \chordmode { c2 f4. g8 }
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 g4:dim }
97 @end lilypond
98
99 Seventh chords are created by adding the number 7 at the beginning
100 of the modifier string (for the dominant seventh chord) or after the
101 quality modifier (for the other named seventh chords).
102
103 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
104 \chordmode { c1:7 c:m7 c:maj7 c:dim c:dim7 c:aug7 c:maj }
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 @seealso
136
137 Snippets:
138 @rlsr{Chords}
139
140 @node Extended and altered chords
141 @unnumberedsubsubsec Extended and altered chords
142
143 @cindex extended chords
144 @cindex altered chords
145
146 Chord structures of arbitrary complexity can be created in chord
147 mode.  The modifier string can be used to extend a chord, add or
148 remove chord steps, raise or lower chord steps, and add a bass note
149 or create an inversion.
150
151 The first number following the @code{:} is taken to be the extent of
152 the chord.  The chord is constructed by sequentially adding thirds
153 to the root until the specified number has been reached.  If the
154 extent is not a third (e.g., 6), thirds are added up to the highest
155 third below the extent, and then the step of the extent is added.
156
157 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
158 \chordmode { c1:3 c:5 c:6 c:7 c:8 c:9 c:10 c:11 }
159 @end lilypond
160
161 Since an unaltered 11 does not sound good when combined with an
162 unaltered 13, the 11 is removed from a @code{:13} chord (unless it
163 is added explicitly).
164
165 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
166 \chordmode { c1:13 c:13.11 c:m13 }
167 @end lilypond
168
169 @cindex additions, in chords
170
171 Individual steps can be added to a chord.  Additions follow the
172 extent and are prefixed by a dot (@code{.}).
173
174 @lilypond[quote,verbatim,fragment,relative=1]
175 \chordmode { c1:5.6 c:3.7.8 c:3.6.13 }
176 @end lilypond
177
178 @cindex chord steps, altering
179
180 Added chord steps can be altered by suffixing a @code{-} or @code{+}
181 sign to the number.  To alter a step that is lower than the extent,
182 add it as an altered step.
183
184 @lilypond[quote,verbatim,fragment,relative=1]
185 \chordmode { c1:7+ c:5+.3- c:3-.5-.7- }
186 @end lilypond
187
188 @cindex removals, in chords
189
190 @funindex ^
191
192 A step to be removed from the chord  must come at the end of a
193 modifier string and be by @code{^}.  Only one removal with @code{^}
194 is allowed in a modifier string.
195
196 @lilypond[quote,verbatim,fragment,relative=1]
197 \chordmode { c1^3 c:7^5 c:9^3.5 }
198 @end lilypond
199
200 @funindex sus
201
202 The modifier @code{sus} can be added to the modifier string to
203 create suspended chords.  This removes the 3rd step from the chord.
204 Append either @code{2} or @code{4} to add the 2nd or 4th step to the
205 chord.@code{sus} is equivalent to @code{^3}; @code{sus4} is
206 equivalent to @code{.4^3}.
207
208 @lilypond[quote,ragged-right,fragment,verbatim]
209 \chordmode { c1:sus c:sus2 c:sus4 c:5.4^3 }
210 @end lilypond
211
212 It is possible to remove the 3rd step with @code{sus} and remove
213 another step with @code{^} in one modifier string.
214
215 @funindex /
216 @cindex chord inversions
217 @cindex bass note, for chords
218
219 Inversions (putting a pitch other than the root on the bottom of the
220 chord) and added bass notes can be specified by appending
221 @code{/}@var{pitch} to the chord.
222
223 @lilypond[quote,ragged-right,fragment,verbatim, relative=2]
224 \chordmode { c1 c/g c/f }
225 @end lilypond
226
227 @funindex /+
228
229 A bass note that is part of the chord can be added, instead of
230 moved as part of an inversion, by using @code{/+}@var{pitch}.
231
232 @lilypond[quote,ragged-right,fragment,verbatim]
233 \chordmode { c1 c/+g c/+f }
234 @end lilypond
235
236 @seealso
237
238 Snippets:
239 @rlsr{Chords}
240
241 @knownissues
242
243 Each step can only be present in a chord once.  The following
244 simply produces the augmented chord, since @code{5+} is
245 interpreted last.
246
247 @lilypond[quote,ragged-right,verbatim,fragment]
248 \chordmode { c1:5.5-.5+ }
249 @end lilypond
250
251 Only one step can be removed from a chord.  If a chord with multiple
252 removed steps is desired, it must be build through addition of
253 multiple steps.
254
255 @ignore
256 @n ode Displaying chords
257 @s ubsection Displaying chords
258
259
260
261 @menu
262 * Printing chord names::
263 * Customizing chord names::
264 * Lead sheets::
265 @end menu
266
267 @n ode Printing chord names
268 @u nnumberedsubsubsec Printing chord names
269
270 @cindex printing chord names
271 @cindex chord names
272 @cindex chords
273
274 LilyPond has support for printing chord names.  Because chords are
275 music elements, they can be transposed, and the chord names will be
276 transposed along with the chords.
277
278 Chords can be entered using @code{< .. >} or through the use of
279 chord mode.  The displayed chord name will sometimes be different
280 depending upon the entry mode:
281
282 @lilypond[quote,ragged-right,verbatim,ragged-right]
283 twoWays = \transpose c c' {
284   \chordmode {
285     c1 f:sus4 bes/f
286   }
287   <c e g>
288   <f bes c'>
289   <f bes d'>
290 }
291
292 << \new ChordNames \twoWays
293    \new Voice \twoWays >>
294 @end lilypond
295
296 This example also shows that the chord printing routines cannot
297 correctly identify the root of a chord if it has been entered using
298 @code{< .. >} instead of named chord entry.  Therefore, the sixth
299 chord (@code{f bes d}) is not interpreted as an inversion.   In
300 contrast, the third chord, which contains the same notes as the sixth
301 chord, is correctly identified because it was entered in the named
302 chord mode.
303
304 For displaying printed chord names, use the @rinternals{ChordNames}
305 context.
306
307 @lilypond[quote,verbatim,ragged-right]
308 harmonies = {
309   \chordmode {a1 b c} <d' f' a'> <e' g' b'>
310 }
311 <<
312   \new ChordNames \harmonies
313   \new Staff \harmonies
314 >>
315 @end lilypond
316
317 The previous examples all show chords over a staff.  This is not
318 necessary.  Chords may also be printed separately.  It may be necessary
319 to add @rinternals{Volta_engraver} and @rinternals{Bar_engraver}
320 for showing repeats.
321
322 @lilypond[ragged-right,verbatim]
323 \new ChordNames \with {
324   \override BarLine #'bar-size = #4
325   \consists Bar_engraver
326   \consists "Volta_engraver"
327 }
328 \chordmode { \repeat volta 2 {
329   f1:maj7 f:7 bes:7
330   c:maj7
331 } \alternative {
332   es e
333 }
334 }
335 @end lilypond
336
337 @code{\chords} is a shortcut method used to change the input mode to
338 @code{\chordmode} and create a @code{ChordNames} context, with the
339 following result:
340
341 @lilypond[verbatim,quote,ragged-right]
342 \chords { c2 f4.:m g4.:maj7 gis8:dim7 }
343 @end lilypond
344
345 @c @predefined
346
347 @c @snippets
348
349 @seealso
350 @c Music Glossary:
351 @c @rglos{}.
352
353 @c Learning Manual:
354 @c @rlearning{}.
355
356 @c Notation Reference:
357 @c @ruser{}.
358
359 @c Application Usage:
360 @c @rprogram{}.
361
362 @c Installed Files:
363 @c @file{}.
364
365 @c Snippets:
366 @c @rlsr{}.
367
368 @c Internals Reference:
369 @c @rinternals{}.
370
371 @c @knownissues
372
373
374 @n ode Customizing chord names
375 @u nnumberedsubsubsec Customizing chord names
376
377 @cindex customizing chord names
378
379 There is no unique system for naming chords.  Different musical
380 traditions use different names for the same set of chords.  There
381 are also different symbols displayed for a given chord name.   The
382 names and symbols displayed for chord names are customizable.
383
384 The default chord name layout is a system for Jazz music, proposed
385 by Klaus Ignatzek (see @ref{Literature list}).  There are also two
386 other chord name schemes implemented: an alternate Jazz chord
387 notation, and a systematic scheme called Banter chords.  The
388 alternate Jazz notation is also shown on the chart in @ref{Chord
389 name chart}.
390
391 In addition to the different naming systems, different note names
392 are used for the root in different languages.  The predefined
393 variables @code{\germanChords}, @code{\semiGermanChords},
394 @code{\italianChords} and @code{\frenchChords} set these variables.
395 The effect is demonstrated here:
396
397 @lilypondfile[ragged-right]{chord-names-languages.ly}
398
399 If none of the default settings give the desired output, the chord
400 name display can be tuned through the following properties.
401
402 @c TODO Generate snippet based on the following
403 @c      and add explanation -td
404
405 @table
406 @item
407 @funindex chordNameExceptions
408
409 @code{chordNameExceptions} contains a list of markups used to follow
410 the root note name based on the pitches in the chord.  Creating the
411 list requires four steps.
412
413 The first step is to define sequential music that has the chords to
414 be named with the desired markup (except for the root name) attached
415 to the chord:
416
417 @example
418 FGGChordNames = @{
419   <c e g b d'>1-\markup @{ \super "maj9" @}
420   <c e g a d'>1-\markup @{ \super "6(add9)" @}
421 @}
422 @end example
423
424 The second step is to convert the music from the first step to an
425 exceptions list:
426
427 @example
428 FGGExceptions = #(sequential-music-to-chord-exceptions
429 FGGChordNames #t)
430 @end example
431
432 The third step is to append the default exceptions list (in this
433 case, the Ignatzek exceptions) to the newly-defined exceptions list:
434
435 @example
436 chExceptions = #(append FGGExceptions ignatzekExceptions)
437 @end example
438
439 The final step is to set @code{chordNameExceptions} to the
440 newly-created exceptions list:
441
442 @example
443 \set chordNameExceptions = #chExceptions
444 @end example
445
446 The entire process is illustrated below:
447
448 @lilypond[quote,ragged-right,verbatim,ragged-right]
449 FGGChordNames = {
450   <c e g b d'>1-\markup { \super "maj9" }
451   <c e g a d'>1-\markup { \super "6(add9)" }
452 }
453 FGGExceptions = #(sequential-music-to-chord-exceptions
454 FGGChordNames #t)
455 chExceptions = #(append FGGChordNames
456  ignatzekExceptions)
457
458 chordStuff = \chordmode
459 {
460 % standard names
461 g1:maj9
462 g1:6.9
463 % names with FGG's custom exceptions
464 \set chordNameExceptions = #chExceptions
465 g1:maj9
466 g1:6.9
467 }
468
469 \score
470 {
471 \new ChordNames \chordStuff
472 }
473 @end lilypond
474
475
476 @funindex majorSevenSymbol @item majorSevenSymbol This property
477 contains the markup object used as part of the printed chord name to
478 identify a major 7 chord.  Predefined options are
479 @code{whiteTriangleMarkup} and @code{blackTriangleMarkup}.
480
481 @funindex chordNameSeparator
482 @item chordNameSeparator
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 @lilypond[quote,ragged-right,fragment,verbatim]
487 \new ChordNames \chordmode {
488   c:7sus4
489   \set chordNameSeparator
490     = \markup { \typewriter "|" }
491   c:7sus4
492 }
493 @end lilypond
494
495 @funindex chordRootNamer
496 @item chordRootNamer
497 The chord name is usually printed as a letter for the root with an
498 optional alteration.  The transformation from pitch to letter is
499 done by this function.  Special note names (for example, the German
500 @q{H} for a B-chord) can be produced by storing a new function in
501 this property.
502
503 @funindex chordNoteNamer @item chordNoteNamer When the chord name
504 contains an additional pitch besides the root (e.g., an added bass
505 note), this function is used to print the additional pitch.  By
506 default the pitch is printed using @code{chordRootNamer}.  The
507 @code{chordNoteNamer} property can be set to a specialized function
508 to change this behavior.  For example, the bass note can be printed
509 in lower case.
510
511 @funindex chordPrefixSpacer
512 @item chordPrefixSpacer
513 The @q{m} for minor chords is usually printed immediately to the
514 right of the root of the chord.  By setting
515 @code{chordPrefixSpacer}, you can fix a spacer between the root and
516 @q{m}.  The spacer is not used when the root is altered.
517
518 @end table
519
520
521
522
523 @cindex Banter
524 @cindex jazz chords
525 @cindex chords, jazz
526
527 @predefined
528 @funindex major seven symbols
529 @code{\whiteTriangleMarkup}
530 @code{\blackTriangleMarkup}
531 @funindex \germanChords
532 @code{\germanChords},
533 @funindex \semiGermanChords
534 @code{\semiGermanChords},
535 @funindex \italianChords
536 @code{\italianChords},
537 @funindex \frenchChords
538 @code{\frenchChords}.
539
540
541 @snippets
542 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
543 {chord-names-jazz.ly}
544
545 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
546 {chord-name-exceptions.ly}
547 @cindex exceptions, chord names.
548
549 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
550 {chord-name-major7.ly}
551
552 @seealso
553 @c Music Glossary:
554 @c @rglos{}.
555
556 @c Learning Manual:
557 @c @rlearning{}.
558
559 @c Notation Reference:
560 @c @ruser{}.
561
562 @c Application Usage:
563 @c @rprogram{}.
564
565 Installed Files:
566 @file{scm/@/chords@/-ignatzek@/.scm},
567 @file{scm/@/chord@/-entry@/.scm},
568 @file{ly/@/chord@/-modifier@/-init@/.ly}.
569
570 @c Snippets: @c @rlsr{}.
571
572 @c Internals Reference:
573 @c @rinternals{}.
574
575 @knownissues
576
577 When chords are entered with the @code{< .. >} syntax, the root and
578 any added bass notes are not identified.  In this  case, chord names
579 are determined solely from the list of pitches.  This may result in
580 strange chord names
581
582 @n ode Lead sheets
583 @u nnumberedsubsubsec Lead sheets
584
585 @cindex lead sheet
586
587 For lead sheets, chords are not printed on staves, but as names on a
588 line for themselves.  This is achieved by using a @code{ChordNames}
589 context simultaneously with the @code{Staff} context.  The
590 @code{\chords} keyword can be used as a shortcut for @code{\new
591 ChordNames \chordmode}.
592
593 When put together, chord names, a melody, and lyrics form a lead
594 sheet:
595
596 @lilypond[verbatim,quote,ragged-right]
597 <<
598   \chords { c2 g:sus4 f e }
599   \relative c'' {
600     a4 e c8 e r4
601     b2 c4( d)
602   }
603   \addlyrics { One day this shall be free __ }
604 >>
605 @end lilypond
606
607 @c @predefined
608
609 @c @snippets
610
611 @seealso
612 @c Music Glossary:
613 @c @rglos{}.
614
615 @c Learning Manual:
616 @c @rlearning{}.
617
618 @c Notation Reference:
619 @c @ruser{}.
620
621 @c Application Usage:
622 @c @rprogram{}.
623
624 @c Installed Files:
625 @c @file{}.
626
627 @c Snippets:
628 @c @rlsr{}.
629
630 @c Internals Reference:
631 @c @rinternals{}.
632
633 @c @knownissues
634
635
636
637
638 @end ignore
639
640
641 @node old Modern chords
642 @subsection old Modern chords
643
644 @menu
645 * Entering chord names::        
646 * Lead sheets::                 
647 * 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 Lead sheets
719 @subsubsection 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 Printing chord names
744 @subsubsection 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