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