Building a Music Theory API (and learning JavaScript along the way)
Back when I was a grad student, I’ve always wanted a tool that could quickly spell out complex chords. In advanced music theory courses, verifying a chord spelling meant physically stacking thirds and writing them out on paper — a process that gets tedious fast when you’re working with augmented major sevenths in Ab harmonic minor at 11pm.
So I built one.
The API
The Music Theory Explorer is a REST API built with Python and Flask that encodes core music theory concepts as retrievable endpoints:
Scale spellings across major, natural minor, and harmonic minor
Interval identification and inversion
Triad and seventh chord spellings with inversions
Diatonic chord sets with Roman numerals
The data reflects the modern equal temperament tradition and what’s generally known as the common practice period.
The backend felt natural as I had built apps in Python/Flask before.…