Zum Inhalt springen
GET /v1/durations

Note durations at a BPM

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/tempo-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

curl "https://api.oanor.com/tempo-api/v1/durations" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/tempo-api/v1/durations", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/tempo-api/v1/durations");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/tempo-api/v1/durations",
    headers={"x-oanor-key": "oanor_test_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten Health-Check.

{
    "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",
             
…