Music & audio

Metronome with tap tempo

A free online metronome from 20 to 300 BPM with time signatures, subdivisions, accent patterns, tap tempo and a numbered beat display, timed on the audio clock.

Metronome with tap tempo
Esc to restore

Metronome

Tap the button, or press T, in time with a beat. Taps start again after 2 seconds of silence, and the tempo box follows your taps.

Sound starts when you press Start, because browsers only allow audio after a click or key press. Wireless headphones add a delay that this page cannot measure.

Tempo

The tempo terms and their ranges come from the table in Wikipedia’s Tempo article, in quarter notes per minute. Ranges overlap and vary between composers and sources, so treat them as a rough guide.

Bar and accents

BPM counts the note at the bottom of the signature: quarter notes in 2/4 to 5/4 and in a custom bar, eighth notes in 6/8, 7/8, 9/8 and 12/8. For 6/8 at 60 dotted quarters a minute, set 180.

Accent pattern: press a beat to change it between normal, accent and muted

Sound

How it keeps time

  • Clicks are scheduled on the audio clock, about 100 milliseconds ahead, by a timer that wakes every 25 milliseconds, so the rhythm does not depend on how busy the page is. Every click time is worked out from the start time and the click number, so nothing drifts however long it plays.
  • The beat display uses the same scheduled times, drawn once per screen refresh and delayed by the browser’s output-latency estimate where it gives one.
  • The audio clock is exact, but what you hear is later: speakers and wired headphones add a few milliseconds, wireless ones tens to hundreds. The page cannot measure that.
  • If your browser blocks or lacks Web Audio, or you choose Silent, the beat display still runs, timed by the page clock.
  • Nothing is stored, sent or kept after you close or reload this page.

A clear answer. Here’s how.

Plays a click at a steady tempo from 20 to 300 BPM and shows each beat as a number. BPM counts the note value at the bottom of the time signature: quarter notes in 2/4 to 5/4 and in a custom bar, eighth notes in 6/8, 7/8, 9/8 and 12/8, so 6/8 at 60 dotted quarters a minute is 180 here. Choose a time signature or a custom bar of 1 to 32 beats, divide each beat into eighths, triplets or sixteenths, and set every beat to normal, accented or muted. The first beat is accented by default, and 6/8, 9/8 and 12/8 also accent each group of three. Tap tempo averages the gaps between your last 8 taps (at least 2 are needed), starts again after 2 seconds without a tap and says how many taps it used. The tempo term (Largo, Andante, Allegro and so on) is read from the table in Wikipedia’s Tempo article in quarter notes per minute; such ranges are rough conventions that vary widely between composers and sources and overlap one another, so the page lists every term that fits. The clicks are short sine tones with a gain envelope made by the Web Audio API, with no audio files, and are scheduled with the lookahead pattern from Chris Wilson’s “A Tale of Two Clocks”: a timer wakes about every 25 ms and hands the audio clock every click due in the next 100 ms, so the rhythm does not depend on the busy main thread. Each click time is computed from the start time and the click number, t0 + n × 60 / (BPM × clicks per beat), never by adding intervals, so nothing drifts however long it runs. The beat display follows the same scheduled times. The audio clock is exact, but what you hear is later: speakers and wired headphones add a few milliseconds and wireless ones tens to hundreds that the page cannot measure (the display is delayed by the browser’s output-latency estimate where it gives one), and the display is drawn once per screen refresh. A hidden tab may run timers only once a second, so while the tab is hidden the lookahead grows to 1.5 seconds. Browsers start audio only after a click or key press, which is why sound begins when you press Start; if sound is blocked or missing, the metronome runs silently with the beat display. Nothing is stored or sent.

What this does not include

  • Finding the tempo of a song, a file or a microphone: tap tempo only measures your taps.
  • One tempo and one bar pattern at a time: no tempo ramps, setlists or polyrhythms.
  • Exact timing with wireless speakers or headphones, whose delay the page cannot measure.
  • Any claim about how fast a piece should be played: tempo terms are loose conventions.