Metronome

A click track that keeps time on the sound card's own clock instead of a JavaScript timer. The arm is already swinging — it is silent until you press Start, because browsers only allow sound after a click.

108BPM
Moderato
A metronome arm swinging in time with the beat

Silent preview — press Start to hear it.

PREVIEW
TAP IT OUT
tap 4 times on the beat
TIME SIGNATURE

SUBDIVIDE THE BEAT

Under the hood

A timer that fires every 25 ms wakes up and books every click that falls inside the next 120 ms, stamped with an exact time on the audio clock. The timer is allowed to be late; the clicks are not. A plain setInterval runs alongside doing nothing but counting, and its error is read at each tick — that is the number you can watch slide away from zero.

SCHEDULERwakes every 25 ms · books 120 ms ahead
TIMER LATENESS—
CLICK PLACEMENTwaiting for start
PLAIN setInterval—

Space starts and stops, T taps the tempo, ↑↓ nudge it by 1 (hold Shift for 5). The first beat of every bar is the loud one; 4/4, 5/4 and 6/8 add one softer accent inside the bar, and 7/8 adds two — it counts 2+2+3.