There's a passage in a piece that won't come out at the original speed no matter how often you repeat it. Musicians solve this by slowing the tempo until the passage comes out clean, then raising it little by little. For that you need a reliable metronome, and you don't have to buy one: the online metronome runs in your browser and nothing needs installing.
Why a software metronome can drift out of sync (and how to avoid it)
A naive metronome would use setInterval to play a click every X milliseconds. The problem is that the browser does not guarantee that a timer runs at a fixed interval, and in background tabs it limits how often timers fire. That delay builds up click after click, especially in long sessions.
The solution is to schedule the clicks ahead of time on the audio clock. The metronome on this site checks every 25 milliseconds which clicks fall in the next 0.1 seconds and schedules them using AudioContext.currentTime as the reference. The audio engine plays each one at its exact moment. MDN describes this same look-ahead pattern, and the Web Audio API specification defines the start(when) parameter on the same time scale as currentTime.
How to use the metronome
- Set the tempo with the slider or the plus and minus buttons, one BPM at a time. The range goes from 1 to 1000 BPM.
- Choose the time signature, from 2/4 to 8/4. The first beat of each bar sounds higher and louder to mark the downbeat.
- Press Start. The indicator dots light up with each click.
- If you don't know a song's tempo, press Tap tempo along with what you hear.
If you change the tempo while it plays, the new value applies to the clicks scheduled from then on. Tapping does not start or stop the metronome; it only changes the BPM.
Tap tempo: finding a song's BPM by ear
Tap tempo keeps the last six taps, averages the interval between them and converts that average into BPM. If more than 2.5 seconds pass without a tap, the series starts over. For a stable result, tap at least four times on the song's pulse: each new tap replaces the oldest one.
It only measures your taps and does not analyze the audio, so the BPM comes from your rhythm and will be as accurate as your timing. If you want a measurement with statistics and a warning when the pulse isn't steady, use the tap BPM tool.
Reduced-tempo practice technique
For a difficult passage, the usual sequence is:
- Slow the metronome down to a speed where you can play the passage with zero mistakes, even if it feels absurdly slow.
- Repeat until it comes out automatically at that speed.
- Raise the tempo in small steps (5-10 BPM) and repeat the process.
- If you slip up again, drop a few BPM and consolidate before going back up.
Practicing fast with mistakes repeats those mistakes. Practicing slowly and raising the tempo gradually sets the correct version from the start.
Frequently asked questions
What BPM range does it support? From 1 to 1000 BPM. The slider, the plus and minus buttons and tap tempo all use that same range. Tempo markings from classical terminology, such as Largo or Presto, fall within it.
What time signatures are available? From 2/4 to 8/4. The quarter note is always the unit, so there are no compound meters such as 6/8 and no subdivisions.
Why does my homemade metronome with setInterval drift out of sync on long pieces? Because the timer doesn't fire at the exact moment you asked for, and the error accumulates. A well-built metronome schedules the clicks with the Web Audio API clock.
Do I need an internet connection? Not for it to sound. The clicks are generated in your browser, and nothing is sent to any server while the metronome runs. The page does need to load the first time.
Practice at any tempo with the online metronome: from 1 to 1000 BPM, with tap tempo and 2/4 to 8/4 time signatures, free and with nothing to install.