Work · No. 004 · Side project
I could tell I was close to the beat, but not how close
- Who it's for
- Me, and anyone learning drums on a practice pad
- Problem
- Learning drums on a practice pad, I could roughly line up with a metronome, but I had no way to know how far off I really was or whether I was drifting.
- What I built
- A metronome that listens while you play and scores every hit against the beat, so you see how accurate and how consistent you are, and whether you’re rushing or dragging.
- Built with
- JavaScript · Vite · Web Audio API · GitHub Pages · Playwright
- Status
- Live
A metronome tells you where the beat is, not where you are. On a practice pad I could hear I was roughly with the click, but I couldn’t tell how far off I was or whether I was slowly drifting. I looked for a metronome app that listened and showed where each hit landed against the beat, and couldn’t find one. So I built it.
What I built
Pocket Time is a metronome that listens through the microphone while you play. Each hit is matched to the nearest beat and marked early, on time or late. It keeps a running count of hits, how many landed within 25 milliseconds of the beat, and the average miss. It also handles different time signatures, accents and subdivisions, and can raise the tempo a little every few bars to build speed.
It’s a web app you can install on your phone like any other app, hosted free on GitHub Pages. Everything runs on the device. There’s no server because nothing needs one: no accounts, no ads, nothing to sell.
The hardest part
Getting it to play the click and listen at the same time. The microphone hears the metronome too, so it’s easy for the app to score its own clicks as your hits. That took a fair bit of fine-tuning, and in the end the simplest fix helped the most: a click-volume slider. I tested it on my phone, and the slider should make it easy for other people to get it working on theirs.
What’s next
Nothing planned. I had one specific need, it does that well, and I don’t want to pile features on top of it.
Result
I could see straight away when I was early or late, which helped me build speed and get the fundamentals solid on the practice pad.