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