DEV Community

Hanné B
Hanné B

Posted on

Why Figured Bass Notation did not Make it into v1 of my Music Theory API

My initial plan when building the Music Theory API v1 was to include figured bass notation as a field in the chord endpoints.

The idea was straightforward: return the standard numeric figures alongside the chord notes so that the response would be useful for anyone working with Baroque-era notation or voice leading analysis.

The initial json implementation looked like this:

{
"root": "C",
"quality": "minor",
"name": "C minor",
"inversion": "first inversion",
"bass": "Eb",
"notes": ["Eb", "G", "C"],
"basso_continuo": "6/3"
}

For root position, first inversion, and second inversion triads, the figures map cleanly to inversion number: root position is 5/3, first inversion is 6/3, second inversion is 6/4. For seventh chords the same logic applies: root position is 7/5/3, first inversion is 6/5/3, second inversion is 6/4/3, third inversion is 6/4/2. This works until you try a diminished triad in root position.

A diminished triad has a diminished fifth above the bass, not a perfect fifth. Returning 5/3 for a diminished triad in root position is technically incorrect: the five needs to be altered by accidental. In standard figured bass notation, a diminished fifth is written as b5, giving b5/3for a diminished triad in root position.

The figures need to carry interval quality information, not just interval numbers. That is solvable if I can extract the quality from the interval name and prepend the appropriate accidental symbol, but this is where the real problem appears.

In basso continuo practice, figures are always relative to the key signature. A major third in C major is written as 3: the key signature already implies the major third, so no extra accidental is needed. The same major third in C minor requires a sharp, i.e. #3, because the key signature has an Eb and the performer needs to be told to raise it. The same interval, the same note, different figures depending on context.

This means that correct figured bass notation cannot be derived from the chord spelling alone.The key must be known. Right now the API’s chord endpoints take a root and a quality — they have no key context. Adding a key parameter to the chord endpoints would conflate two separate concerns: what a chord is in isolation versus what function it serves in a key.

The right place for figured bass notation is therefore not the chord endpoint but a future key-aware endpoint; something that takes a tonic, a mode, and a chord, and returns the Roman numeral analysis alongside correct context-dependent figures. That endpoint is planned but not yet built.

For now, the basso_continuo field has been removed from the chord response entirely. For the moment a missing field is preferable to a field that returns correct-looking but context-independent figures that would be wrong in any key with accidentals in the signature.

Top comments (0)