A metronome that cannot drift.
Set a tempo, press start, and leave it running. Nothing to install, nothing to sign up for.
120
Beats Per Minute
40208
Spacebar starts and stops it. The presets are Largo 50, Andante 92, Allegro 144 and Presto 184. Settings are not saved, so it opens at 120 every time. It runs in a browser, on a phone or tablet on the stand as well as on a desktop.
Why this metronome cannot rush
Most browser metronomes are a timer that plays a sound. Timers are the one thing in a browser you cannot trust with a beat, so this one uses them for something else entirely.
There are two clocks
JavaScript timers drift by milliseconds, get throttled to a crawl in a background tab, and animation frames stop altogether when the tab is hidden. The audio hardware has its own clock, which does none of that. Every click is handed to the audio hardware stamped with an exact time on that clock, and it plays then, whether or not the page is keeping up.
The timer never plays a click
A timer wakes up every 25 milliseconds and looks a tenth of a second ahead. Any beat falling inside that window is scheduled with the audio hardware and forgotten about. If a wake-up is late, the beat is still scheduled for the same moment, so the lateness is absorbed instead of added to the beat.
Beats are counted, not measured
Each beat time is the previous beat time plus 60 divided by the tempo, worked out in advance. Nothing reads the wall clock to decide when the next click happens, so there is no error to accumulate. Change the tempo while it runs and the new spacing applies from the next unscheduled beat, about a tenth of a second later.
The arm is a follower
The swinging arm reads the same audio clock the clicks are scheduled on and works out where it should be. It reaches an extreme exactly on each beat because it is following the schedule, not making it. If frames drop, the arm catches up and the clicks are untouched. Come back from a background tab and it fast-forwards past the beats you missed rather than firing them all at once.
Out of tune as well as out of time? The tuner is on the next page, and it listens in your browser.
Free, no ads, part of MakesPerfect. Create an account if you also want assignments, a practice log and a library of pieces you can hear.