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.…