MagicBPM SDK
The same dual-engine beat detector that powers the MagicBPM app — available to license as a native iOS framework. Feed it audio, get a confident BPM. No servers, no latency tax, no data leaving the device.
Overview
MagicBPM's detector is a self-contained Swift framework with a clean input boundary: push audio samples in, receive running and per-beat BPM out, along with a stabilizing/confidence signal. It's built entirely on Apple's Accelerate/vDSP and SIMD — zero third-party dependencies.
All analysis runs locally with no network calls. Nothing about the audio ever leaves the device — ideal for privacy-sensitive and offline-first apps.
Designed for live input. Audio is processed off the main thread on a dedicated queue, with an allocation-free hot path for steady, real-time readings.
vDSP autocorrelation over an onset-detection function, combined with an onset/inter-onset-interval peak-picker, merged for robustness across genres and noisy rooms.
A simple provider protocol means you can feed the live microphone, your own audio engine tap, or pre-recorded buffers for offline analysis.
Expose tempo range, detection mode, and gating to your users — or lock sensible defaults. The same controls that ship in the MagicBPM app.
A modern Swift framework for Apple platforms. Apple-first by design — no cross-platform abstraction overhead.
Benchmarks
We scored the engine against the two standard open-source references — librosa and aubio — on open, labeled datasets, using the MIREX accuracy metric everyone reports. On rhythmic, electronic material it beats both — while running live and on-device, where librosa gets to analyze the whole file offline and aubio is given its strongest streaming reading.
Ahead where it counts. On fast tempos (drum & bass, ~174 BPM) MagicBPM reads 25% correct vs librosa's 9% — prior-based estimators halve fast music; the live detector tracks it.
Honest about scope. The engine is tuned for steady, rhythmic material. For broad multi-genre offline catalog analysis — jazz, classical, solo acoustic — general-purpose libraries are still stronger. Point it at beats, live.
Method: MIREX Accuracy-1 — an estimate within ±4% of the ground-truth BPM. GiantSteps-Tempo v2 labels; engines at defaults. librosa (feature.tempo) analyzes the entire file offline. aubio is causal like MagicBPM; we score it from its streaming beat output (aubiotrack) reduced by the same whole-track median we apply to MagicBPM — its strongest reading (aubio's own single-value aubio tempo summary reads 22.1%). MagicBPM produces its answer as audio arrives, the way it runs on device. Reproducible on the same open datasets.
Where it fits
Auto-detect tempo for sync, looping, and beat-matched effects.
Match workout cadence or coaching cues to the music in the room.
Drive rhythm gameplay and reactive visuals from live audio.
Give players an accurate tempo readout while they perform.
Tag clips with tempo for editing, transitions, and auto-cuts.
Run the live detector offline over recorded audio for batch tempo analysis.
Get in touch
Email us about licensing, integration, and pricing. A short note about your app and how you'd use real-time tempo detection is all we need to start.
We read every message and usually reply within a couple of business days.
[email protected]