Catalog/music-just-intonation

Music

Just vs equal temperament API

Compares just-intonation (small-integer 5-limit ratio) and equal-temperament frequencies for an interval above a tonic, with the cents deviation and the audible beat frequency between them. Answers 'What is a just perfect fifth above A4?', 'How many cents sharp is the just major third?'.

Price$0.06per request
MethodPOST
Route/v1/music/just-intonation
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
musicjust-intonationtemperamenttuningcentsratiomicrotuningfrequencyaudio
API URLhttps://x402.hexl.dev/v1/music/just-intonation
Integration docs
Example request
{
  "tonicNote": "A4",
  "semitones": 7
}
Example response
{
  "tonicFreq": 440,
  "semitones": 7,
  "intervalName": "perfect fifth",
  "justRatio": "3:2",
  "justFrequency": 660,
  "equalTemperedFrequency": 659.2551,
  "centsDeviation": 1.955,
  "beatFrequencyHz": 0.7449,
  "note": "JI is pure (small-integer ratio); ET evenly divides the octave into 12 equal cents-steps."
}
Input schema
{
  "type": "object",
  "required": [
    "semitones"
  ],
  "properties": {
    "tonicFreq": {
      "type": "number",
      "examples": [
        440
      ]
    },
    "tonicNote": {
      "type": "string",
      "examples": [
        "A4"
      ]
    },
    "semitones": {
      "type": "number",
      "examples": [
        7,
        4
      ]
    },
    "a4": {
      "type": "number"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}