Metronome

Share:

A free online metronome with tap tempo, time signatures and subdivisions. The click is scheduled on the audio clock, so it does not drift — and it keeps time when you switch tabs.

RT-FUN-107 · Fun & Misc

Metronome

120 BPM
Allegro 4/4 · quarter notes
or tap the tempo

Space start/stop · ±1 BPM · ±5 BPM · T tap tempo

Advertisement
After tool · AD-W1Responsive

How to Use the Metronome

Set the tempo, or tap it

Drag the slider, nudge it with the buttons, or press Tap in time with the music four or five times and it will read the tempo from your taps. Tapping uses the middle of your taps rather than the average, so one hesitant tap does not drag the answer.

Choose the bar and the subdivision

Beats per bar sets how often the accent lands; the subdivision adds clicks between the beats at two, three or four to a beat. The beats stay louder than the subdivisions so the pulse is still audible underneath.

Press Start, or the space bar

The dots follow the beat, with the accented one on the downbeat. You can change tempo while it runs — the change is picked up within about a quarter of a second, and it carries on from the current beat rather than restarting the bar.

Switch to your music

The click keeps time in a background tab. That is the case most browser metronomes get wrong, so it is worth knowing you can leave this tab and go and read your score.

Advertisement
After how-to · AD-W2Responsive

Why a Browser Metronome Is Harder Than It Looks

A metronome has one job, and a web page is unusually badly equipped to do it. The obvious implementation — ask the browser to run a function every so many milliseconds, and play a click each time it fires — produces something that sounds approximately right for about thirty seconds and then falls apart. It is worth understanding why, because the failure is not a bug anyone introduced. It is the ordinary behaviour of a browser meeting a task that needs millisecond accuracy.

Two failures, both invisible at first

The first is drift. Browser timers are best-effort: they fire when the main thread is free, which might be a few milliseconds late, or considerably later if something else is happening on the page. If each click is scheduled relative to the previous one, that lateness is added permanently and the metronome falls further behind real time with every beat. Ten thousand beats into a session it can be seconds adrift — but three beats in it looks perfect, which is exactly why the flaw survives casual testing. The fix is to compute every click's time from a single fixed starting point, so that late arrivals correct themselves instead of compounding.

The second is background throttling. Browsers deliberately slow timers in tabs you are not looking at, to about one callback per second, because most pages doing work in the background are doing nothing useful. For a metronome this is fatal in the most annoying possible way: the click is fine while you watch it and stutters the moment you switch to the tab with your sheet music in it — which is what you opened it to do.

The tempting design plays a click when the timer fires. The correct one never plays anything from a timer at all — it queues clicks on the audio clock and lets the sound card keep time.

What makes this solvable is that browsers expose a second, far better clock. The Web Audio system runs on its own thread with sample-level accuracy, and it will accept an instruction to play a sound at a precise future moment. So the timer's job changes completely: it stops being the thing that plays the click, and becomes the thing that tops up a queue of clicks already scheduled on the audio clock. Its own jitter no longer matters, because nothing it does is heard. Handle background throttling by queueing further ahead when the page is hidden — several seconds instead of a fraction of one — and a browser that only wakes you once a second still finds plenty already scheduled.

What a metronome measures, and what it does not

The device is younger than most of the music played to it. Winkel built the mechanism and Maelzel patented it in 1815, well after Bach and Mozart, and the Italian tempo words that appear on scores are centuries older still. Those words were never precise: allegro means cheerful, not 132 beats per minute, and the same marking covers a range because it describes a character. Beethoven, who adopted metronome marks early, left figures that many performers still consider unplayably fast — a two-hundred-year argument about what a number can and cannot capture about music.

A limitation worth stating, especially in this region

This tool assumes a Western metrical accent: bars of equal beats with the emphasis on the first. That assumption does not travel everywhere, and it travels particularly badly across Southeast Asia. Javanese and Balinese gamelan, and the related Malay traditions, are organised around colotomic cycles marked by gongs, where the structurally important moment is the arrival at the end of the cycle rather than a stress at its beginning — the opposite emphasis from the one every dot on this page is drawing. A metronome accenting beat one is not a neutral tool for that repertoire; it is a Western one.

Where it does fit the regional context squarely is graded examination practice. The ABRSM and Trinity syllabuses are widely taken across Singapore and Malaysia, and their set pieces carry metronome marks that candidates are expected to work towards rather than hit on the first attempt. The standard method — set the mark, subtract twenty, and creep upwards as the passage becomes clean — is exactly what tap tempo and a fine-grained slider are for.

10 Facts About Metronomes and Musical Timing

01

Dietrich Nikolaus Winkel built the double-weighted pendulum that makes a metronome work; Johann Maelzel patented it in 1815. That is why scores mark tempo “MM” — Maelzel’s Metronome.

02

Beethoven was among the first composers to publish metronome marks, and his are famously fast — fast enough that performers have argued about them for two centuries.

03

The Italian tempo words are centuries older than the metronome and describe character, not just speed. Allegro means cheerful; grave means serious.

04

At the top of this tool’s range, 400 BPM, the clicks are 150 milliseconds apart. At the bottom, 20 BPM, they are three seconds apart.

05

A browser’s setTimeout is nowhere near accurate enough for music. The Web Audio clock is sample-accurate — at 48 kHz one sample is about 0.021 ms.

06

Browsers throttle timers in a background tab to roughly once per second. That single fact is why most browser metronomes stutter the moment you switch to your sheet music.

07

This one schedules further ahead when the page is hidden, so a one-second timer clamp still leaves seconds of clicks already queued on the audio clock.

08

Triplets divide the beat into three, and one third has no exact binary representation — so every triplet interval a computer plays is a rounding, in every piece of music software.

09

At 60 BPM with sixteenth notes, a metronome emits 240 clicks a minute — four times the tempo you set.

10

Without an accent, 3/4 and 4/4 sound identical. The downbeat is the only thing that makes a time signature audible.

Frequently Asked Questions

  • Yes, and that is the hardest part of building one. Browsers throttle timers in a hidden tab to roughly once a second, which starves a metronome that schedules only a fraction of a second ahead — you hear it stutter. This one detects that the page is hidden and schedules three seconds of clicks ahead instead of a quarter of a second, so a one-second throttle still leaves plenty already queued. Switching to your sheet music is the whole use case, so it would be a strange thing to get wrong.
  • Because each click is placed at an absolute time computed from a fixed starting point — click number n happens at start + n × interval. The tempting alternative is to add one interval to the previous click, which quietly adds however late the browser was to every click after it, forever. That error accumulates and is clearly audible within a couple of minutes. The timing tests check the ten-thousandth click, not the third, precisely because the broken version looks fine early on.
  • No. Every click is synthesised on the spot as a short sine burst with a decay envelope, so there is no sample to fetch, nothing to 404, and no delay before the first beat. It also keeps the page well inside its size budget.
  • Once the page has loaded, yes — nothing further is fetched, and the click is generated in your browser rather than streamed. There is no network request at any point while it runs.
  • Browsers deliberately block audio until you interact with the page, to stop sites playing sound at you unprompted. That is why the audio engine is created on your first click rather than when the page loads. Press Start, or the space bar, and it begins immediately.
  • They are the traditional tempo markings, and they predate the metronome by centuries. Largo is broad and slow, Andante is walking pace, Allegro is brisk and cheerful, Presto is very fast. They describe the character a composer wanted as much as a precise speed, which is why the same marking can carry a range of BPM.
  • Yes — the subdivision setting adds clicks between the beats at two, three or four to a beat, with the beats themselves still sounding louder than the subdivisions so you can hear the pulse underneath. Set 60 BPM with sixteenths and you get 240 clicks a minute grouped in fours.
  • Your tempo, time signature, subdivision and accent setting are kept in your own browser's local storage so they are there next time. Nothing is sent anywhere, there is no account, and clearing your browser data clears them.
  • Twenty beats a minute is a click every three seconds, which is past the point where most people can feel a pulse rather than hear separate events. Four hundred is a click every 150 milliseconds, fast enough that it starts to be heard as a texture. The range comfortably covers standard metronome markings at both ends.
  • Space starts and stops, the up and down arrows change the tempo by one, the left and right arrows by five, and T taps the tempo. The shortcuts are ignored while you are focused on a control, so the slider's own arrow-key behaviour still works normally.

Related News

You may be interested in these recent stories from our newsroom.

No related news yet for this tool. Our editorial team publishes new pieces every week.

Browse all news →
Advertisement
Pre-footer · AD-W3 728 × 90