Metronome

A precise 40 to 208 BPM metronome with an accented downbeat, subdivisions and tap tempo — Web Audio clock scheduling keeps timer jitter off the beat.

The clicks are synthesized locally with the Web Audio API. Nothing is downloaded and nothing ever leaves your device.

How It Works

This metronome schedules its clicks with a lookahead audio clock instead of firing them straight from a JavaScript timer. A raw setInterval is a bad timekeeper on its own: browsers clamp timers to a few milliseconds, pause them while the main thread is busy or the tab is hidden, and every one of those hiccups lands directly on an audible click. Here, a 25 ms interval only decides when to look ahead — each click is handed to the Web Audio API about 100 ms in the future with an exact timestamp, so the samples play on the audio hardware clock regardless of what the page is doing.

The lookahead scheduler
Every 25 ms the scheduler checks which notes fall inside the next ~100 ms and queues them with precise AudioContext.currentTime values. The interval only needs to fire often enough to never run out of runway; its own jitter is invisible because no sound is ever tied to the timer's firing moment.
What each click is
A short oscillator blip — 1000 Hz on the first beat of the bar, 660 Hz on the others, with a 30 ms exponential decay so it sounds percussive rather than beepy. Nothing is downloaded; the waveform is generated at the sample level the moment it is scheduled.
Tap tempo
Tap the button four or more times in rhythm and the tool takes the intervals between your last four taps, uses their median — an outlier tap that was too early or too late cannot drag the average away — converts it to BPM and clamps the result into the 40–208 range.

Frequently Asked Questions

Will it keep running if I lock my phone or switch tabs?

Not reliably. Browsers throttle timers in background tabs, and mobile browsers frequently suspend the audio engine entirely when the screen locks or the tab is hidden — iOS Safari and Android Chrome both do this. The scheduler keeps the click grid steady through short throttling bursts because it reads the audio clock, but the honest answer is: keep the tab open and in the foreground, and expect silence behind a lock screen.

Why do the clicks arrive late on Bluetooth headphones?

Bluetooth adds tens of milliseconds of output latency, and some codecs (like SBC) add more than others. The clicks and the flashing squares are scheduled against the same audio clock, so the visual beat is always the true reference — when a wired or lower-latency option is available, use it for critical practice, or simply follow the lights.

How should I practise with a metronome?

Start at a tempo where you play the passage cleanly — usually 40–60% of your target speed — and raise the BPM by small steps (2–4 at a time) only after a few clean repetitions. Slow practice with accents on the downbeats, as this tool provides, builds the internal pulse far faster than struggling at full tempo.

What do the subdivision settings change?

They set how many clicks land inside each beat: quarter gives one click per beat, eighth two, sixteenth four. The first beat of the bar always sounds higher (1000 Hz vs 660 Hz), so subdivisions act as a counting aid while the accent keeps the bar structure audible.

Is anything uploaded to a server?

No. The clicks are synthesized on the fly with the Web Audio API inside your browser — no samples to download, no network requests at all. The tool works with the wifi switched off, and nothing about your practice leaves your device.