]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/user/chords.itely
Update to chords.itely
[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.51"
10
11
12 @node Chord notation
13 @section Chord notation
14
15 @lilypondfile[quote]{chords-headword.ly}
16
17 Chords can be entered in chord mode, which recognizes some traditional European chord naming conventions.  Chord names can also
18 be displayed.  In addition, figured bass notation can be displayed.
19
20 @menu
21 * Chord mode::
22 * Displaying 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 Chord mode and note mode can be mixed in sequential music:
65
66 @lilypond[verbatim,quote,ragged-right,relative=1]
67 <c e g>2 < g b d >
68 \chordmode { c2 f}
69 < c e g > < g' b d >
70 \chordmode { f g}
71 @end lilypond
72
73
74 @seealso
75
76 Music Glossary:
77 @rglos{chord}.
78
79 Notation Reference:
80 @ref{Chorded notes},
81 @ref{Input modes}.
82
83 Snippets:
84 @rlsr{Chords}
85
86 @knownissues
87
88 When chord mode and note mode are mixed in sequential music, and
89 chord mode comes first, the note mode will create a new @code{Staff}
90 context.
91
92 @lilypond[verbatim,quote,ragged-right,relative=1]
93 \chordmode { c2 f}
94 < c e g > < g' b d >
95 @end lilypond
96
97 To avoid this behavior, explicitly create the @code{Staff} context:
98
99 @lilypond[verbatim,quote,ragged-right,relative=1]
100 \new Staff {
101   \chordmode { c2 f}
102   < c e g > < g' b d >
103 }
104 @end lilypond
105
106 @node Common chords
107 @unnumberedsubsubsec Common chords
108
109 @cindex triads
110 @cindex seventh chords
111 @cindex root of chord
112 @cindex modifiers, in chords.
113 @cindex chord quality
114
115 Major triads are entered by including the root and an
116 optional duration:
117
118 @lilypond[verbatim,quote,relative=1,ragged-right]
119 \chordmode { c2 f4 g }
120 @end lilypond
121
122 Minor, augmented, and diminished triads are entered by placing
123 @code{:} and a quality modifier string after the duration:
124
125 @lilypond[verbatim,quote,ragged-right,relative=1]
126 \chordmode { c2:m f4:aug g:dim }
127 @end lilypond
128
129 Seventh chords can be created:
130
131 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
132 \chordmode { c1:7 c:m7 c:maj7 c:dim7 c:aug7 }
133 @end lilypond
134
135 @funindex aug
136 @funindex dim
137 @funindex maj
138 @funindex m
139
140 The table belows shows the actions of the quality modifiers on
141 triads and seventh chords.
142
143 @table @code
144
145 @item m
146 The minor chord.  This modifier lowers the 3rd and (if present) the
147 7th step.
148
149 @item dim
150 The diminished chord.  This modifier lowers the 3rd, 5th and (if
151 present) the 7th step.
152
153 @item aug
154 The augmented chord.  This modifier raises the 5th step.
155
156 @item maj
157 The major 7th chord.  This modifier adds a raised 7th step.  The
158 @code{7} following @code{maj} is optional.  Do NOT use this modifier
159 to create a major triad.
160
161 @end table
162
163 @c TODO -- perhaps add warning about c and c:maj being different, while
164 @c   c:maj and c:maj7 are the same
165
166 @seealso
167
168 Snippets:
169 @rlsr{Chords}
170
171 @node Extended and altered chords
172 @unnumberedsubsubsec Extended and altered chords
173
174 @cindex extended chords
175 @cindex altered chords
176
177 Chord structures of arbitrary complexity can be created in chord
178 mode.  The modifier string can be used to extend a chord, add or
179 remove chord steps, raise or lower chord steps, and add a bass note
180 or create an inversion.
181
182 The first number following the @code{:} is taken to be the extent
183 of the chord.  The chord is constructed by sequentially adding
184 thirds to the root until the specified number has been reached.
185 If the extent is not a third (e.g., 6), thirds are added up to the
186 highest third below the extent, and then the step of the extent is
187 added.  The largest possible value for the extent is 13.  Any
188 larger value is interpreted as 13.
189
190 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
191 \chordmode {
192   c1:2 c:3 c:4 c:5
193   c:6 c:7 c:8 c:9
194   c:10 c:11 c:12 c:13
195   c:14
196 }
197 @end lilypond
198
199 @noindent
200 Note that @code{c:5} is identical to @code{c} -- both produce a C major triad.
201
202 Since an unaltered 11 does not sound good when combined with an
203 unaltered 13, the 11 is removed from a @code{:13} chord (unless it
204 is added explicitly).
205
206 @lilypond[quote,ragged-right,fragment,verbatim,relative=1]
207 \chordmode {
208   c1:13 c:13.11 c:m13
209 }
210 @end lilypond
211
212 @cindex additions, in chords
213
214 Individual steps can be added to a chord.  Additions follow the
215 extent and are prefixed by a dot (@code{.}).
216
217 @lilypond[quote,verbatim,fragment,relative=1]
218 \chordmode {
219   c1:5.6 c:3.7.8 c:3.6.13
220 }
221 @end lilypond
222
223 Added steps can be as high as desired.
224
225 @lilypond[quote,verbatim,fragment,relative=1]
226 \chordmode {
227   c4:5.15 c:5.20 c:5.25 c:5.30
228 }
229 @end lilypond
230
231 @cindex chord steps, altering
232
233 Added chord steps can be altered by suffixing a @code{-} or @code{+}
234 sign to the number.  To alter a step that is automatically included
235 as part of the basic chode structure, add it as an altered step.
236
237 @lilypond[quote,verbatim,fragment,relative=1]
238 \chordmode {
239   c1:7+ c:5+.3- c:3-.5-.7-
240 }
241 @end lilypond
242
243 @cindex removals, in chords
244
245 @funindex ^
246
247 A step to be removed from the chord indicated in a
248 modifier string with a prefix of @code{^}.  Only one removal with @code{^}
249 is allowed in a modifier string.
250
251 @lilypond[quote,verbatim,fragment,relative=1]
252 \chordmode {
253   c1^3 c:7^5 c:9^3.5
254 }
255 @end lilypond
256
257 @funindex sus
258
259 The modifier @code{sus} can be added to the modifier string to
260 create suspended chords.  This removes the 3rd step from the chord.
261 Append either @code{2} or @code{4} to add the 2nd or 4th step to the
262 chord.  @code{sus} is equivalent to @code{^3}; @code{sus4} is
263 equivalent to @code{.4^3}.
264
265 @lilypond[quote,ragged-right,fragment,verbatim]
266 \chordmode {
267   c1:sus c:sus2 c:sus4 c:5.4^3
268 }
269 @end lilypond
270
271 It is possible to remove the 3rd step with @code{sus} and remove
272 another step with @code{^} in one modifier string.
273
274 @funindex /
275 @cindex chord inversions
276 @cindex bass note, for chords
277
278 Inversions (putting a pitch other than the root on the bottom of the
279 chord) and added bass notes can be specified by appending
280 @code{/}@var{pitch} to the chord.
281
282 @lilypond[quote,ragged-right,fragment,verbatim, relative=2]
283 \chordmode {
284   c1 c/g c/f
285 }
286 @end lilypond
287
288 @funindex /+
289
290 A bass note that is part of the chord can be added, instead of
291 moved as part of an inversion, by using @code{/+}@var{pitch}.
292
293 @lilypond[quote,ragged-right,fragment,verbatim]
294 \chordmode {
295   c1 c/g c/+g
296 }
297 @end lilypond
298
299 @seealso
300
301 Snippets:
302 @rlsr{Chords}
303
304 @knownissues
305
306 Each step can only be present in a chord once.  The following
307 simply produces the augmented chord, since @code{5+} is
308 interpreted last.
309
310 @lilypond[quote,ragged-right,verbatim,fragment]
311 \chordmode { c1:5.5-.5+ }
312 @end lilypond
313
314 Only one step can be removed from a chord.  If a chord with multiple
315 removed steps is desired, it must be built through addition of
316 multiple steps.
317
318 Only the first inversion can be created by adding a bass note.  The
319 second inversion requires changing the root of the chord.
320
321 @lilypond[quote,ragged-right,verbatim,fragment]
322 \chordmode {
323   c'1: c':/g e:6-3-^5 e:m6-^5
324 }
325 @end lilypond
326
327 @node Displaying chords
328 @subsection Displaying chords
329
330 Chords can be displayed by name, in addition to the standard display
331 as notes on a staff.
332
333 @menu
334 * Printing chord names::
335 * Customizing chord names::
336 @end menu
337
338 @node Printing chord names
339 @unnumberedsubsubsec Printing chord names
340
341 @cindex printing chord names
342 @cindex chord names
343 @cindex chords
344
345 Chord names are printed in the @code{ChordNames} context:
346
347 @lilypond[verbatim,quote,relative=1,ragged-right]
348 \new ChordNames {
349   \chordmode {
350     c2 f4. g8
351   }
352 }
353 @end lilypond
354
355 Chords can be entered as simultaneous notes or through the use of
356 chord mode.  The displayed chord name will be the same, regardless
357 of the mode of entry, unless there are inversions or added bass notes:
358
359 @lilypond[verbatim,quote,relative=1]
360 <<
361   \new ChordNames {
362     <c e g>2  <f bes c>
363     <f c' e g>1
364     \chordmode {
365       c2 f:sus4 c1:/f
366     }
367   }
368   {
369     <c e g>2  <f bes c>
370     <f, c' e g>1
371     \chordmode {
372       c2 f:sus4 c1:/f
373     }
374   }
375 >>
376 @end lilypond
377
378 @funindex{\chords}
379
380 @code{\chords @{ ... @}} is a shortcut notation for
381 @code{\new ChordNames @{\chordmode @{ ... @}@}}.
382
383 @lilypond[verbatim,quote,ragged-right, relative=1]
384 \chords {
385   c2 f4.:m g8:maj7
386 }
387 @end lilypond
388
389 @lilypond[verbatim,quote,ragged-right, relative=1]
390 \new ChordNames {
391   \chordmode {
392     c2 f4.:m g8:maj7
393   }
394 }
395 @end lilypond
396
397 @snippets
398
399 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
400 {showing-chords-at-changes.ly}
401
402 @c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
403 @c {adding-bar-lines-to-chordnames-context.ly}
404
405 @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
406 {simple-lead-sheet.ly}
407
408
409 @seealso
410
411 Music Glossary:
412 @rglos{chord}.
413
414
415 Notation Reference:
416 @ref{Writing music in parallel}.
417
418
419 Snippets:
420 @rlsr{Chords}.
421
422 Internals Reference:
423 @rinternals{ChordNames},
424 @rinternals{Volta_engraver},
425 @rinternals{Bar_engraver}.
426
427 @knownissues
428
429 Chords containing inversions or altered bass notes are not named
430 properly if entered using simultaneous music.
431
432
433 @node Customizing chord names
434 @unnumberedsubsubsec Customizing chord names
435
436 @cindex customizing chord names
437
438 There is no unique system for naming chords.  Different musical
439 traditions use different names for the same set of chords.  There
440 are also different symbols displayed for a given chord name.   The
441 names and symbols displayed for chord names are customizable.
442
443 @cindex Banter
444 @cindex jazz chords
445 @cindex chords, jazz
446
447 The default chord name layout is a system for Jazz music, proposed
448 by Klaus Ignatzek (see @ref{Literature list}).  There are also two
449 other chord name schemes implemented: an alternate Jazz chord
450 notation, and a systematic scheme called Banter chords.  The
451 alternate Jazz notation is also shown on the chart in @ref{Chord
452 name chart}.
453
454 @c TODO --  Change this so we don't have a non-verbatim example.
455 @c  Make short example in docs, then move longer example to
456 @c  appendix, where the length of the snippet won't matter.
457
458 In addition to the different naming systems, different note names
459 are used for the root in different languages.  The predefined
460 variables @code{\germanChords}, @code{\semiGermanChords},
461 @code{\italianChords} and @code{\frenchChords} set these variables.
462 The effect is demonstrated here:
463
464 @lilypondfile[ragged-right]{chord-names-languages.ly}
465
466 If none of the default settings give the desired output, the chord
467 name display can be tuned through the following properties.
468
469 @table @code
470
471 @funindex chordRootNamer
472
473 @item chordRootNamer
474
475 The chord name is usually printed as a letter for the root with an
476 optional alteration.  The transformation from pitch to letter is
477 done by this function.  Special note names (for example, the German
478 @q{H} for a B-chord) can be produced by storing a new function in
479 this property.
480
481 @funindex majorSevenSymbol
482
483 @item majorSevenSymbol
484
485 This property contains the markup object used to follow the output
486 of @code{chordRootNamer} to dentify a major 7 chord. Predefined
487 options are @code{whiteTriangleMarkup} and
488 @code{blackTriangleMarkup}.
489
490 @funindex chordNoteNamer
491
492 @item chordNoteNamer
493
494 When the chord name contains additional pitches other than the root
495 (e.g., an added bass note), this function is used to print the
496 additional pitch.  By default the pitch is printed using
497 @code{chordRootNamer}. The @code{chordNoteNamer} property can be set
498 to a specialized function to change this behavior.  For example, the
499 bass note can be printed in lower case.
500
501 @funindex chordNameSeparator
502
503 @item chordNameSeparator
504
505 Different parts of a chord name are normally separated by a slash.
506 By setting @code{chordNameSeparator}, you can use any desired markup
507 for a separator.
508
509 @funindex chordNameExceptions
510
511 @item chordNameExceptions
512
513 This property is a list of pairs.  The first item in each pair
514 is a set of pitches used to identify the steps present in the chord.
515 The second item is a markups that will follow the @code{chordRootNamer}
516 output to create the chord name.
517
518 @funindex chordPrefixSpacer
519 @item chordPrefixSpacer
520
521 The @q{m} for minor chords is usually printed immediately to the
522 right of the root of the chord.  By setting
523 @code{chordPrefixSpacer}, you can fix a spacer between the root
524 and @q{m}.  The spacer is not used when the root is altered.
525
526 @end table
527
528 @predefined
529
530 @funindex major seven symbols
531 @code{\whiteTriangleMarkup},
532 @code{\blackTriangleMarkup},
533 @funindex \germanChords
534 @code{\germanChords},
535 @funindex \semiGermanChords
536 @code{\semiGermanChords},
537 @funindex \italianChords
538 @code{\italianChords},
539 @funindex \frenchChords
540 @code{\frenchChords}.
541
542
543 @snippets
544
545 @cindex exceptions, chord names.
546 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
547 {chord-name-exceptions.ly}
548
549 @c TODO - tweak snippet to use \blackTriangleMarkup as well
550 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
551 {chord-name-major7.ly}
552
553 @c @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
554 @c {adding-bars-to-chordnames.ly)
555
556 @c @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
557 @c {volta-brackets-over-chord-names.ly}
558
559 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
560 {changing-chord-separator.ly}
561
562
563 @seealso
564
565 Notation Reference:
566 @ref{Chord name chart}.
567
568 Installed Files:
569 @file{scm/@/chords@/-ignatzek@/.scm},
570 @file{scm/@/chord@/-entry@/.scm},
571 @file{ly/@/chord@/-modifier@/-init@/.ly}.
572
573 Snippets:
574 @rlsr{Chords}.
575
576 @c Internals Reference:
577 @c @r internals{}.
578
579 @knownissues
580
581 Chord names are determined from both the pitches that are present
582 in the chord and the information on the chord structure that may
583 have been entered in @code{\chordmode}.  If the simultaneous pitches
584 method of entering chords is used, undesired names result from
585 inversions or bass notes.
586
587 @lilypond[quote,ragged-right,verbatim]
588 myChords = \relative c' {
589   \chordmode{ c1 c/g c/f }
590   <c e g> <g c e> <f c' e g>
591 }
592 <<
593   \new ChordNames { \myChords }
594   \new Staff { \myChords }
595 >>
596 @end lilypond
597
598
599 @node Figured bass
600 @subsection Figured bass
601
602 @lilypondfile[quote]{figured-bass-headword.ly}
603
604 Figured bass notation can be displayed.
605
606 @menu
607 * Introduction to figured bass::
608 * Entering figured bass::
609 * Displaying figured bass::
610 @end menu
611
612 @node Introduction to figured bass
613 @unnumberedsubsubsec Introduction to figured bass
614
615 @cindex Basso continuo
616 @cindex Thorough bass
617 @cindex Figured bass
618 @cindex Bass, thorough
619 @cindex Bass, figured
620
621 @c TODO: musicological blurb about FB
622
623
624 LilyPond has support for figured bass, also called thorough bass
625 or basso continuo:
626
627 @lilypond[quote,ragged-right,verbatim,fragment]
628 <<
629   \new Voice { \clef bass dis4 c d ais g fis}
630   \new FiguredBass {
631     \figuremode {
632       < 6 >4 < 7\+ >8 < 6+ [_!] >
633       < 6 >4 <6 5 [3+] >
634       < _ >4 < 6 5/>4
635     }
636   }
637 >>
638 @end lilypond
639
640 The support for figured bass consists of two parts: there is an
641 input mode, introduced by @code{\figuremode}, that accepts
642 entry of bass figures, and there is a context named
643 @code{FiguredBass} that takes care of displaying
644 @code{BassFigure} objects.  Figured bass can also be displayed
645 in @code{Staff} contexts.
646
647 @code{\figures@{ ... @}} is a shortcut notation for
648 @code{\new FiguredBass @{\figuremode @{ ... @}@}}.
649
650
651 Although the support for figured bass may superficially resemble chord
652 support, it is much simpler.  @code{\figuremode} mode simply
653 stores the figures and the @code{FiguredBass} context prints them
654 as entered.  There is no conversion to pitches.
655
656 Figures are created as markup texts.  Any of the standard markup
657 properties can be used to modify the display of figures.  For
658 example, the vertical spacing of the figures may be set with
659 @code{baseline-skip}.
660
661 @seealso
662
663 Snippets:
664 @rlsr{Chords}
665
666
667 @node Entering figured bass
668 @unnumberedsubsubsec Entering figured bass
669
670 @code{\figuremode} is used to switch the input mode to figure mode.
671 More information on different input modes can be
672 found at @ref{Input modes}.
673
674 In figure mode, a group of bass figures is delimited by
675 @code{<} and @code{>}.  The duration is entered after the @code{>}.
676
677 @lilypond[verbatim,quote,ragged-right,fragment]
678 \new FiguredBass {
679   \figuremode {
680     <6 4>2
681   }
682 }
683 @end lilypond
684
685 Accidentals (including naturals) can be added to figures:
686
687 @lilypond[verbatim,quote,ragged-right,fragment]
688 \figures {
689   <7! 6+ 4-> <5++> <3-->
690 }
691 @end lilypond
692
693 Augmented and diminished steps can be indicated.
694
695 @lilypond[verbatim,quote,ragged-right,fragment]
696 \figures {
697   <6\+ 5/> <7/>
698 }
699 @end lilypond
700
701 A backward slash through a figure (typically used for raised
702 sixth steps) can be created.
703
704 @lilypond[verbatim,quote,ragged-right,fragment]
705 \figures {
706   <6>
707   <6\\>
708 }
709 @end lilypond
710
711
712 Vertical spaces and brackets can be be included in figures:
713
714 @lilypond[verbatim,quote,ragged-right,fragment]
715 \figures {
716   <[12 _!] 8 [6  4]>
717 }
718 @end lilypond
719
720
721 Any text markup can be inserted as a figure:
722
723 @lilypond[verbatim,quote,ragged-right,fragment]
724 \figures {
725   <  \markup{ \tiny \number 6 \super (1)} 5 >
726 }
727 @end lilypond
728
729 @c NOTE: We need to include notes any time we use extenders to
730 @c avoid extraneous staff creation due to Staff.use... in
731 @c \bassFigureExtendersOn
732
733 Continuation lines can be used to indicate repeated figures:
734
735 @lilypond[verbatim,quote,ragged-right,fragment]
736 <<
737   {
738     \clef bass
739     e d c b,
740     e d c b,
741   }
742   \figures {
743     \bassFigureExtendersOn
744     <6 4> <6 3> <7 3> <7 3>
745     \bassFigureExtendersOff
746     <6 4> <6 3> <7 3> <7 3>
747   }
748 >>
749 @end lilypond
750
751 @noindent
752 In this case, the extender lines replace existing figures,
753 unless the continuation lines have been explicitly terminated.
754
755 @lilypond[verbatim,quote,ragged-right,fragment]
756 <<
757   \figures {
758     \bassFigureExtendersOn
759     <6 4> <6 4> <6\! 4\!> <6 4>
760   }
761   {
762     \clef bass
763     d d c c
764   }
765 >>
766 @end lilypond
767
768
769
770 @predefined
771 @cindex figured bass extender lines
772 @code{\bassFigureExtendersOn},
773 @code{\bassFigureExtendersOff}.
774
775
776 @snippets
777 @lilypondfile[verbatim,lilyquote,texidoc,doctitle]
778 {changing-the-positions-of-figured-bass-alterations.ly}
779
780 @seealso
781 @c Music Glossary:
782 @c @rglos{}.
783
784 @c Learning Manual:
785 @c @rlearning{}.
786
787 @c Notation Reference:
788 @c @ruser{}.
789
790 @c Application Usage:
791 @c @rprogram{}.
792
793 @c Installed Files:
794 @c @file{}.
795
796 Snippets:
797 @rlsr{Chords}.
798
799 Internals Reference:
800 @rinternals{NewBassFigure},
801 @rinternals{BassFigureAlignment},
802 @rinternals{BassFigureLine},
803 @rinternals{BassFigureBracket},
804 @rinternals{BassFigureContinuation},
805 @rinternals{FiguredBass}.
806
807 @c @knownissues
808
809 @node Displaying figured bass
810 @unnumberedsubsubsec Displaying figured bass
811
812 Figured bass can be displayed using the @code{FiguredBass} context,
813 or in most staff contexts.
814
815 When displayed in a @code{FiguredBass} context, the vertical location
816 of the figures is independent of the notes on the staff.
817
818 @lilypond[verbatim,ragged-right,fragment,quote]
819 <<
820   \relative c'' {
821     c4 c'8 r8 c,4 c'
822   }
823   \new FiguredBass {
824     \figuremode {
825       <4>4 <10 6>8 s8
826       <6 4>4 <6 4>
827     }
828   }
829 >>
830 @end lilypond
831
832 @noindent
833 In the example above, the @code{FiguredBass} context must be
834 explicitly instantiated to avoid creating a second (empty) staff.
835
836
837 Figured bass can also be added to @code{Staff} contexts
838 directly.  In this case, the vertical position of the
839 figures is adjusted automatically.
840
841 @lilypond[verbatim,ragged-right,fragment,quote]
842 <<
843   \new Staff = myStaff
844   \figuremode {
845     <4>4 <10 6>8 s8
846     <6 4>4 <6 4>
847   }
848   %% Put notes on same Staff as figures
849   \context Staff = myStaff
850   {
851     \clef bass
852     c4 c'8 r8 c4 c'
853   }
854 >>
855 @end lilypond
856
857
858 When added in a Staff context, figured bass can be displayed above
859 or below the staff.
860
861 @lilypond[verbatim,ragged-right,fragment,quote]
862 <<
863   \new Staff = myStaff
864   \figuremode {
865     <4>4 <10 6>8 s8
866     \bassFigureStaffAlignmentDown
867     <6 4>4 <6 4>
868   }
869   %% Put notes on same Staff as figures
870   \context Staff = myStaff
871   {
872     \clef bass
873     c4 c'8 r8 c4 c'
874   }
875 >>
876 @end lilypond
877
878
879 @predefined
880 @cindex figured bass alignment
881 @code{\bassFigureStaffAlignmentDown},
882 @code{\bassFigureStaffAlignmentUp},
883 @code{\bassFigureStaffAlignmentNeutral}.
884
885 @c @snippets
886
887 @seealso
888 @c Music Glossary:
889 @c @rglos{}.
890
891 @c Learning Manual:
892 @c @rlearning{}.
893
894 @c Notation Reference:
895 @c @ruser{}.
896
897 @c Application Usage:
898 @c @rprogram{}.
899
900 @c Installed Files:
901 @c @file{}.
902
903 Snippets:
904 @rlsr{Chords}.
905
906 Internals Reference:
907 @rinternals{NewBassFigure},
908 @rinternals{BassFigureAlignment},
909 @rinternals{BassFigureLine},
910 @rinternals{BassFigureBracket},
911 @rinternals{BassFigureContinuation},
912 @rinternals{FiguredBass}.
913
914 @knownissues
915
916 To ensure that continuation lines work properly, it is
917 safest to use the same rhythm in the figure line as in
918 the bass line.
919
920 @lilypond[verbatim,ragged-right,fragment,quote]
921 <<
922   {
923     \clef bass
924     \repeat unfold 4 {f16. g32} f8. es16 d8 es
925   }
926   \figures {
927     \bassFigureExtendersOn
928     % The extenders are correct here, with the same rhythm as the bass
929     \repeat unfold 4 {<6 4->16. <6 4->32}
930     <5>8. r16 <6>8 <6\! 5->
931   }
932 >>
933 <<
934   {
935     \clef bass
936     \repeat unfold 4 {f16. g32} f8. es16 d8 es
937   }
938   \figures {
939     \bassFigureExtendersOn
940     % The extenders are incorrect here, even though the timing is the same
941     <6 4->4 <6 4->4
942     %\repeat unfold 4 {<6 4->16. <6 4->32}
943     <5>8. r16 <6>8 <6\! 5->
944   }
945 >>
946 @end lilypond
947
948 When using extender lines, adjacent figures with the same number in
949 a different figure location can cause the figure positions to invert.
950
951 @lilypond[verbatim,ragged-right,fragment,quote,relative=1]
952 <<
953  { fis g g, e' }
954   \figures {
955     \bassFigureExtendersOn
956     <6 5> <5\! 4> < 5 _!> <6>
957   }
958 >>
959 @end lilypond
960
961 To avoid this problem, simply turn on extenders after the figure that
962 begins the extender line and turn them off at the end of the extender line.
963
964 @lilypond[verbatim,ragged-right,fragment,quote,relative=1]
965 <<
966  { fis g g, e' }
967   \figures {
968     <6 5> <5 4>
969     \bassFigureExtendersOn
970     < 5 _!> <6>
971     \bassFigureExtendersOff
972   }
973 >>
974 @end lilypond
975