Universal Music Theory Library - v0.12.0
    Preparing search index...

    Class FiguredBass

    Figured bass: parsing figures, realizing them over a bass note, and four-voice (SATB) realization.

    Index

    Constructors

    Methods

    • Derives the figured bass symbol from a chord and its bass note. Returns the standard abbreviation by the chord member in the bass: triads '', '6', '6/4'; seventh chords '7', '6/5', '4/3', '4/2'. A bass that is no root, third, fifth or seventh returns its offset in steps above the root.

      Parameters

      Returns string

    • Parses a figured bass symbol into interval offsets and accidentals, as written (no key, no implied figures: '6' → [9]). A plain triad ('', '5', '3', '5/3') gives [4, 7].

      Supported formats: '6', '6/4', '7', '6/5', '4/3', '4/2', '9', '#6', 'b7', '6/4/2', '#' (raised third), empty string (= root position triad).

      Parameters

      • symbol: string

      Returns { accidentals: Map<number, FigureAccidental>; intervals: number[] }

      Object with intervals (semitone offsets above bass) and accidentals (Map from interval index to accidental).

      • accidentals: Map<number, FigureAccidental>

        Accidental of each figure that has one, keyed by its index in intervals.

      • intervals: number[]

        Semitones above the bass, one per figure.

    • Realizes a figured bass symbol above a bass note, returning a Chord.

      Abbreviations are completed as in continuo practice: 6 is 6/3, 7 is 7/5/3, 6/5 is 6/5/3, 4/3 is 6/4/3, 2 and 4/2 are 6/4/2. A bare accidental alters the third.

      When keySymbol is provided, numerals without explicit accidentals are resolved diatonically: the interval is adjusted to the nearest scale degree in the key. If the bass note is not in the key, falls back to FIGURE_DEFAULT_SEMITONES. Explicit accidentals (e.g. '#6', 'b7') always override diatonic resolution.

      Parameters

      • bassNote: Note

        The bass note.

      • figures: string

        The figured bass symbol (e.g., '6', '6/4', '7', '').

      • keySymbol: string = 'C major'

        Key context for diatonic resolution (e.g. 'G major', 'D minor'). If the key cannot be parsed or the bass note is chromatic, falls back to equal-tempered defaults.

      • _voices: number = 4

        Reserved. For full SATB voicing use FiguredBass.voices.

      Returns Chord

    • Realizes a figured bass symbol as a 4-voice SATB voicing.

      Returns [soprano, alto, tenor, bass] as an array of 4 Note objects. The bass voice is the given bassNote. The upper voices (T, A, S) are placed within classical vocal ranges using standard doubling and spacing rules:

      • Soprano: C4–G5, Alto: G3–C5, Tenor: C3–G4
      • S-A and A-T: max one octave apart; T-B: max a 12th (19 semitones)
      • No voice crossing
      • Triads: root doubled; 7th chords: all 4 pitch classes represented

      Parameters

      • bassNote: Note

        The bass note (basso continuo).

      • figures: string

        The figured bass symbol (e.g. '', '6', '6/4', '7').

      • keySymbol: string = 'C major'

        Key context for diatonic resolution (default 'C major').

      Returns Note[]

      [soprano, alto, tenor, bass]