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