Online Metronome — Sample-Accurate
A metronome scheduled on the audio clock rather than a JavaScript timer, with time signatures, accented downbeats and subdivisions.
Beats per Bar
Subdivision
Why browser metronomes usually drift, and this one does not
The naive implementation calls setInterval at the beat interval and plays a click each time. It is audibly wrong within seconds.
JavaScript timers are not precise. They fire when the main thread is free, which under any load means late — and the error varies per tick, so the beat wanders rather than simply running slow. Human hearing is extremely sensitive to rhythmic irregularity: a 20 ms jitter is inaudible in pitch and obvious in timing.
The correct approach schedules beats ahead of time on the Web Audio clock, which is driven by the audio hardware rather than the main thread. A look-ahead scheduler wakes periodically, looks at what falls within the next 100 ms or so, and queues those clicks at exact timestamps. The audio thread plays them sample-accurately regardless of what the main thread is doing.
The consequence is that the sound stays rock steady even when the visual indicator stutters — the visual is best-effort, the audio is not.
Tempo markings
Traditional markings are ranges rather than exact values, and sources disagree at the edges.
| Marking | BPM | Character |
|---|---|---|
| Largo | 40–60 | Very slow, broad |
| Adagio | 66–76 | Slow, at ease |
| Andante | 76–108 | Walking pace |
| Moderato | 108–120 | Moderate |
| Allegro | 120–168 | Fast, cheerful |
| Vivace | 168–176 | Lively |
| Presto | 168–200 | Very fast |
| Prestissimo | 200+ | As fast as possible |
For reference: most pop sits between 100 and 130 BPM, house around 120–128, drum and bass around 170–175. A resting heart rate is 60–100, which is roughly why moderate tempi feel natural.
Using a metronome well
- Start slower than feels necessary —Practise a passage at a tempo where you can play it perfectly, then raise by 4–5 BPM. Practising at a tempo where you make mistakes trains the mistakes.
- Put the click on beats 2 and 4 —Setting half tempo and hearing it as the backbeat forces you to keep time internally through beats 1 and 3. Considerably harder and much more useful.
- Use subdivisions for tricky rhythms —Eighth or sixteenth-note clicks make it obvious exactly where a syncopation sits.
- Practise dropping the click —Mute every other bar. If you drift, your internal time needs work — which the click was hiding rather than fixing.
- Do not use it for everything —Rubato, phrasing and ensemble breathing are all deliberately not metronomic. A click is a tool for building steady time, not a target for every performance.
About
The Metronome uses the Web Audio API for sample-accurate beat scheduling — ensuring the click is never late even when the browser tab is in the background. You can set any BPM from 20 to 300, choose from 2, 3, 4, 6, 7, or 8 beats per bar, and add subdivisions (quarter, eighth, or sixteenth notes). The first beat of each bar is accented automatically.
How to use
- 1 Set your BPM using the slider or the +1/−1/+5/−5 buttons.
- 2 Select the number of beats per bar and the subdivision.
- 3 Press the Play button (or tap Space) to start the metronome.
- 4 The beat indicator lights up on every beat — the first beat is highlighted in the brand colour.
- Why does a browser metronome stay accurate even when I switch tabs?
- This metronome uses the Web Audio API's AudioContext clock for scheduling, which runs in the browser's audio thread independently of the JavaScript UI thread. Beats are scheduled several hundred milliseconds ahead of time, so even if the UI thread is delayed by background tab throttling, the audio clicks play exactly on time.
- What BPM should I practice at?
- Start at a tempo where you can play a passage perfectly without mistakes — typically 60–80% of the target speed. Increase by 5 BPM only when you can play cleanly at the current tempo for several repetitions. Practising slowly and correctly builds accurate muscle memory; practising too fast reinforces mistakes. Common time signatures: 4/4 (most pop/rock), 3/4 (waltz), 6/8 (compound duple, ballads).
- What is a subdivision in a metronome?
- A subdivision divides each beat into smaller equal parts. Quarter-note beats with eighth-note subdivisions add a click between each main beat, helping you feel the "and" of each beat. Sixteenth-note subdivisions add three clicks between each main beat. Subdivisions help musicians stay accurate at slow tempos and play passages with small note values evenly.
More in Media & Audio
See all media & audio.