Back

#music-theory

2 APIs with this tag

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

Music Theory API

Music-theory maths as an API, in equal temperament with A4 = 440 Hz and scientific pitch notation (C4 = middle C = MIDI 60). The note endpoint converts freely between a note name (A4, C#5, Eb3), a MIDI note number and a frequency — and when you pass a frequency it returns the nearest note and how many cents sharp or flat it is. The interval endpoint gives the distance between two notes in semitones and cents, its name (perfect fifth, major third, …) and the exact frequency ratio. The chord endpoint returns the notes, MIDI numbers and frequencies of a chord from a root and a quality (major, minor, dim, aug, sus, 6, 7, maj7, m7, dim7, m7b5, 9 and more). The scale endpoint returns the notes of a scale or mode from a root — major, the three minor scales, the seven church modes, the major and minor pentatonics, blues, whole-tone and chromatic. Sharp or flat spelling is selectable. Everything is computed locally and deterministically, so it is instant and private. Ideal for music apps and games, synthesizers and DAWs, ear-training and theory teaching, tuners and MIDI tools. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 5 endpoints. This is music theory; for searching tracks and artists use a music API and for the classical repertoire use a classical-music API.

api.oanor.com/musicnote-api