{"openapi":"3.1.0","info":{"title":"Tempo & BPM API","version":"1.0.0","description":"Musical timing maths as an API — turn a tempo into exact times. The durations endpoint gives the length of every note value (whole down to sixty-fourth, plus dotted and triplet variants) at a given BPM, in milliseconds, in hertz, and in samples at your sample rate. The delay endpoint is the producer's note-to-millisecond tool: the delay and reverb times for 1/1 to 1/32 (straight, dotted and triplet) so time-based effects lock to the tempo. The bar endpoint gives the duration of a bar for any time signature. The convert endpoint turns BPM into milliseconds per beat (and back) and names the Italian tempo marking — Largo, Adagio, Andante, Moderato, Allegro, Presto and the rest. Everything is computed locally and deterministically, so it is instant and private. Ideal for DAWs and music-production tools, drum machines and sequencers, delay and echo plug-ins, metronomes, and audio apps. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is tempo and rhythm timing; for notes, intervals, chords and scales use a music-theory API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/tempo-api","description":"oanor gateway"}],"tags":[{"name":"Tempo"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/bar":{"get":{"operationId":"get_v1_bar","tags":["Tempo"],"summary":"Bar / measure duration","description":"","parameters":[{"name":"bpm","in":"query","required":true,"description":"Beats per minute","schema":{"type":"string"},"example":"120"},{"name":"time_signature","in":"query","required":false,"description":"e.g. 4/4","schema":{"type":"string"},"example":"4/4"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"bpm":120,"bar_ms":2000,"beat_ms":500,"beat_note":"1/4","beats_per_bar":4,"time_signature":"4/4","bars_per_minute":30,"bars_per_second":0.5},"meta":{"timestamp":"2026-06-03T17:42:07.199Z","request_id":"219777d8-4532-46d6-b6de-dd7080e96ff0"},"status":"ok","message":"Bar duration","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/convert":{"get":{"operationId":"get_v1_convert","tags":["Tempo"],"summary":"BPM <-> ms + tempo marking","description":"","parameters":[{"name":"bpm","in":"query","required":false,"description":"Beats per minute","schema":{"type":"string"},"example":"120"},{"name":"ms","in":"query","required":false,"description":"Or ms per beat -> BPM","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"bpm":120,"marking":"Allegro","ms_per_beat":500,"beats_per_second":2},"meta":{"timestamp":"2026-06-03T17:42:07.305Z","request_id":"74c1db89-c81d-4c19-ac66-2a8cbb6ebb5d"},"status":"ok","message":"BPM convert","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/delay":{"get":{"operationId":"get_v1_delay","tags":["Tempo"],"summary":"Tempo-synced delay times","description":"","parameters":[{"name":"bpm","in":"query","required":true,"description":"Beats per minute","schema":{"type":"string"},"example":"128"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"bpm":128,"note":"set a delay/reverb time in ms (or its rate in Hz) to sync to the tempo","dotted":[{"hz":0.355556,"ms":2812.5,"division":"1/1 dotted"},{"hz":0.711111,"ms":1406.25,"division":"1/2 dotted"},{"hz":1.42222,"ms":703.125,"division":"1/4 dotted"},{"hz":2.84444,"ms":351.5625,"division":"1/8 dotted"},{"hz":5.68889,"ms":175.7813,"division":"1/16 dotted"},{"hz":11.3778,"ms":87.89063,"division":"1/32 dotted"}],"triplet":[{"hz":0.8,"ms":1250,"division":"1/1 triplet"},{"hz":1.6,"ms":625,"division":"1/2 triplet"},{"hz":3.2,"ms":312.5,"division":"1/4 triplet"},{"hz":6.4,"ms":156.25,"division":"1/8 triplet"},{"hz":12.8,"ms":78.125,"division":"1/16 triplet"},{"hz":25.6,"ms":39.0625,"division":"1/32 triplet"}],"straight":[{"hz":0.533333,"ms":1875,"division":"1/1"},{"hz":1.06667,"ms":937.5,"division":"1/2"},{"hz":2.13333,"ms":468.75,"division":"1/4"},{"hz":4.26667,"ms":234.375,"division":"1/8"},{"hz":8.53333,"ms":117.1875,"division":"1/16"},{"hz":17.0667,"ms":58.59375,"division":"1/32"}]},"meta":{"timestamp":"2026-06-03T17:42:07.391Z","request_id":"22962f09-7f78-42aa-926f-c9a1b1b43571"},"status":"ok","message":"Delay times","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/durations":{"get":{"operationId":"get_v1_durations","tags":["Tempo"],"summary":"Note durations at a BPM","description":"","parameters":[{"name":"bpm","in":"query","required":true,"description":"Beats per minute","schema":{"type":"string"},"example":"120"},{"name":"sample_rate","in":"query","required":false,"description":"Hz (default 44100)","schema":{"type":"string"},"example":"44100"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"bpm":120,"dotted":[{"hz":0.333333,"ms":3000,"note":"whole (dotted)","samples":132300},{"hz":0.666667,"ms":1500,"note":"half (dotted)","samples":66150},{"hz":1.33333,"ms":750,"note":"quarter (dotted)","samples":33075},{"hz":2.66667,"ms":375,"note":"eighth (dotted)","samples":16538},{"hz":5.33333,"ms":187.5,"note":"sixteenth (dotted)","samples":8269},{"hz":10.6667,"ms":93.75,"note":"thirty-second (dotted)","samples":4134},{"hz":21.3333,"ms":46.875,"note":"sixty-fourth (dotted)","samples":2067}],"triplet":[{"hz":0.75,"ms":1333.333,"note":"whole (triplet)","samples":58800},{"hz":1.5,"ms":666.6667,"note":"half (triplet)","samples":29400},{"hz":3,"ms":333.3333,"note":"quarter (triplet)","samples":14700},{"hz":6,"ms":166.6667,"note":"eighth (triplet)","samples":7350},{"hz":12,"ms":83.33333,"note":"sixteenth (triplet)","samples":3675},{"hz":24,"ms":41.66667,"note":"thirty-second (triplet)","samples":1838},{"hz":48,"ms":20.83333,"note":"sixty-fourth (triplet)","samples":919}],"straight":[{"hz":0.5,"ms":2000,"note":"whole","samples":88200},{"hz":1,"ms":1000,"note":"half","samples":44100},{"hz":2,"ms":500,"note":"quarter","samples":22050},{"hz":4,"ms":250,"note":"eighth","samples":11025},{"hz":8,"ms":125,"note":"sixteenth","samples":5513},{"hz":16,"ms":62.5,"note":"thirty-second","samples":2756},{"hz":32,"ms":31.25,"note":"sixty-fourth","samples":1378}],"sample_rate":44100,"quarter_note_ms":500},"meta":{"timestamp":"2026-06-03T17:42:07.496Z","request_id":"fbc33c33-507d-45a0-adb7-fb6f23be5a85"},"status":"ok","message":"Note durations","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Tempo & BPM API","notes":"BPM counts quarter notes (and the beat note in /v1/bar is the time-signature denominator). A quarter note at 120 BPM is 500 ms. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/durations","params":{"bpm":"beats per minute","sample_rate":"Hz (default 44100)"},"returns":"every note value's duration in ms, Hz and samples"},{"path":"/v1/delay","params":{"bpm":"beats per minute"},"returns":"tempo-synced delay/reverb times (straight, dotted, triplet)"},{"path":"/v1/bar","params":{"bpm":"beats per minute","time_signature":"e.g. 4/4"},"returns":"the bar/measure duration"},{"path":"/v1/convert","params":{"ms":"or a ms-per-beat to get BPM","bpm":"beats per minute"},"returns":"BPM ↔ ms and the Italian tempo marking"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Musical timing maths as an API — turn a tempo into exact times. The durations endpoint gives the length of every note value (whole down to sixty-fourth, plus dotted and triplet variants) at a given BPM, in milliseconds, in hertz, and in samples at your sample rate. The delay endpoint is the producer's note-to-millisecond tool: the delay and reverb times for 1/1 to 1/32 (straight, dotted and triplet) so effects lock to the tempo. The bar endpoint gives the duration of a bar for any time signature. The convert endpoint turns BPM into milliseconds per beat (and back) and names the Italian tempo marking (Largo, Andante, Allegro, Presto …). Everything is computed locally and deterministically, so it is instant and private. Ideal for DAWs and music-production tools, drum machines and sequencers, delay/echo plug-ins, metronomes, and audio apps. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. This is tempo and rhythm timing; for notes, intervals, chords and scales use a music-theory API."},"meta":{"timestamp":"2026-06-03T17:42:07.600Z","request_id":"bcd700c6-a8e5-4133-bda2-9ba49605a750"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":7735,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":925,"monthly_call_quota":17250,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2915,"monthly_call_quota":223500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6715,"monthly_call_quota":1160000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/tempo-api"}