tj-pak — bpm-beat-reader % cd ..

% open bpm-beat-reader

BPM · Beat Reader

Listens to a track and reads its exact BPM, decimals and all.

web live

PROBLEM

When you're mixing records, knowing the exact BPM of what's playing is half the battle, and reading it by ear is hard. The decimal is what matters: a track that's really 140.5, not a flat 140, drifts out of time after a few bars. Most free tools round to a whole number, the exact bit that trips you up.

WHAT I BUILT

A phone app that listens to whatever's playing through the speakers and reads the tempo to one decimal. It also has a beatmatch helper: pin the BPM of the track on your deck, and the next track you read shows the exact pitch percentage to nudge to match it, and whether that's an easy mix or out of range. Installs to your home screen, works offline. Send the link, add to home screen, done.

HOW IT WORKS

No library. The mic feeds a 150Hz lowpass to isolate the kick, then it builds an energy envelope and runs autocorrelation to find the tempo. The decimal comes from interpolating the peak, with a bias that stops fast tracks (drum and bass) reading as half their real speed. A separate full-band analyser drives the input meter and a clipping warning for club volume. It keeps the screen awake while listening. Shipped as a PWA: manifest, service worker for offline, home-screen icon.

WHERE IT'S AT

Live and shareable. Works in the browser, installs to the home screen, runs offline after the first load. Tuned for a strong 4/4 kick (house, techno, drum and bass, hip hop).

WHAT I LEARNED

The decimals needed their own math: most tools round, so I wrote the detection from scratch to measure the gaps between beats. It worked first try on my laptop, then died on my phone with a cryptic Safari error, a service worker serving a redirect, the kind of bug you only ever find on a real device.

STACK

Web Audio API · vanilla JS · autocorrelation · PWA · Cloudflare Pages

% cd ..