Music Theory API
Music-theory maths as an API, computed locally and deterministically over the twelve-tone chromatic scale. The interval endpoint gives the number of semitones and the interval name between two notes — C to G is seven semitones, a perfect fifth. The transpose endpoint shifts one or more notes up or down by a number of semitones, so C E G transposed up seven becomes G B D and a negative value transposes down. The chord endpoint returns the notes of a chord from a root and a type — major, minor, diminished, augmented, the sevenths (major7, minor7, dominant7, diminished7, half-diminished7), sixths, suspended, add9, ninth and power chords — so C major is C E G and C7 is C E G B♭. The scale endpoint returns the notes of a scale from a root and a mode — the major and three minor scales, the seven church modes, the major and minor pentatonics, blues, whole-tone and chromatic — so C major is C D E F G A B and A natural-minor is A B C D E F G. Notes use C, C#, D♭ … B, and accidental=flat spells with flats. Everything is computed locally and deterministically, so it is instant and private. Ideal for music-education, ear-training, songwriting, DAW-plugin, notation and instrument app developers, chord-and-scale tools, and practice software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is pitch-class theory; for the actual frequency of a note use a music-note API.
api.oanor.com/musictheory-api