Lookahead scheduling
Clicks are scheduled slightly ahead of time on the audio clock itself, not fired the instant a JavaScript timer happens to run.
A precise, drift-free metronome for practice or recording. Set a tempo and time signature, then play it live or download it as a WAV.
🔒 Runs entirely in your browser — no audio or files are uploaded.
Timing a click with JavaScript's setInterval alone is unreliable — the browser's main thread can be busy with other work, and small delays accumulate into audible drift over a long track. This tool instead uses the standard "lookahead scheduler" pattern: a fast, lightweight timer wakes up every 25 milliseconds and schedules any clicks due in the next 100 milliseconds directly on the Web Audio API's sample-accurate clock, so the actual sound timing never depends on how busy the browser is.
Clicks are scheduled slightly ahead of time on the audio clock itself, not fired the instant a JavaScript timer happens to run.
The first beat of each measure plays at a higher pitch so you always know exactly where a new measure begins.
Downloads are rendered offline in a single pass with an OfflineAudioContext, producing the exact number of measures you asked for.
A plain setInterval or setTimeout per beat is not sample-accurate — the browser's timer can fire a little early or late, and those small errors build up into audible drift over a long track. This tool instead uses a lookahead scheduler: a lightweight timer runs frequently and, each time, schedules every upcoming click that falls within the next 100 milliseconds using the Web Audio API's own precise clock, so the actual playback timing is locked to the audio hardware rather than to JavaScript timer jitter.
When checked, the first beat of every measure plays at a higher pitch (1000 Hz instead of 700 Hz) so you can clearly hear the downbeat and keep track of where each measure starts.
Exactly the number you set in "Measures to render," independent of how long you let the live playback run. The WAV is rendered offline in one pass using an OfflineAudioContext.
Yes. The scheduler reads the current BPM value each time it schedules the next click, so changes apply going forward without needing to stop and restart playback.
An uncompressed 16-bit PCM mono WAV file at your browser's native sample rate, named after the BPM you used, for example click-track-120bpm.wav.
More handy tools from My Panda Toolbox.