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