MagicBPM SDK

Real-time tempo detection,
on-device.

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

A focused DSP engine, not a dependency tangle.

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.

On-device & offline

All analysis runs locally with no network calls. Nothing about the audio ever leaves the device — ideal for privacy-sensitive and offline-first apps.

Low latency

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.

Dual-engine accuracy

vDSP autocorrelation over an onset-detection function, combined with an onset/inter-onset-interval peak-picker, merged for robustness across genres and noisy rooms.

Any audio source

A simple provider protocol means you can feed the live microphone, your own audio engine tap, or pre-recorded buffers for offline analysis.

Tunable

Expose tempo range, detection mode, and gating to your users — or lock sensible defaults. The same controls that ship in the MagicBPM app.

Native Swift

A modern Swift framework for Apple platforms. Apple-first by design — no cross-platform abstraction overhead.

Benchmarks

Measured, not asserted.

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.

Tempo accuracy — electronic music

GiantSteps-Tempo · 629 tracks · MIREX Accuracy-1 (within ±4% of ground truth) · engines at defaults

MagicBPMlive · on-device 63.8%
librosaoffline 58.7%
aubiostreaming 43.1%

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

Built for anything beat-aware.

🎧

Music & DJ apps

Auto-detect tempo for sync, looping, and beat-matched effects.

🏃

Fitness & running

Match workout cadence or coaching cues to the music in the room.

🎮

Games & AR

Drive rhythm gameplay and reactive visuals from live audio.

🎹

Instruments & practice

Give players an accurate tempo readout while they perform.

🎬

Creator tools

Tag clips with tempo for editing, transitions, and auto-cuts.

🔬

Research & analysis

Run the live detector offline over recorded audio for batch tempo analysis.

Get in touch

Tell us what you're building.

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.

SDK inquiries

We read every message and usually reply within a couple of business days.

[email protected]