Clever Quest Lab ← Labs

Metronome

A steady click from 20 to 300 BPM, with accents, subdivisions and a speed trainer.

Sound is off – press Start (or the Space bar) to begin.

Tap in time with music to set the tempo.
BPM

Each beat is a quarter note.

Beats – click or tap a beat to change its accent

Start and stop with the Start button or Space. Tap tempo: the Tap button or T. Tempo: − / + (hold to repeat), the slider or the arrow keys. Click a beat to cycle its accent. Keys: Space start/stop, T tap, ← → tempo ±1 (Shift ±10), Esc stop. Space start/stop · T tap · ← → tempo ±1 (Shift ±10) · Enter presses the focused button, so Enter on a beat changes its accent · Esc stops. Tap a beat to cycle its accent. Tap the Tap button in time with music to set the tempo; hold − or + to change it quickly.

Rhythm

Time signature

Subdivision

Eighths, triplets and sixteenths split every beat into 2, 3 or 4 clicks with a softer sound of their own. The names assume a quarter-note beat.

Sound

Click sound

Picking a sound while the metronome is stopped plays a short preview. All sounds are made live in your browser.

Practice

How to use it

Press Start or the Space bar and the metronome clicks at the tempo shown, 120 beats per minute (BPM) until you change it. The big circle shows the current beat and lights up on every click. The dot along the bottom reaches one end exactly on each beat, so you can see the next click coming. The top corners show the bar number and the tempo.

Pick a time signature, add subdivisions to hear the notes between the beats, and choose one of four click sounds. Your settings are saved in your browser for the next visit.

Controls

How it works

One beat lasts 60 / BPM seconds: 0.5 s at 120 BPM and 1 s at 60 BPM. With n clicks per beat the gap between clicks is:

interval = 60 / (BPM × n) seconds    e.g. triplets at 120 BPM: 60 / 360 ≈ 0.1667 s

The arithmetic is easy; keeping time is not. JavaScript timers are not punctual: a busy page can delay them by tens of milliseconds, and browsers slow them down in background tabs. This metronome therefore uses lookahead scheduling. The Web Audio API has its own clock, AudioContext.currentTime, which advances with the sound hardware, and a sound can be booked to start at an exact time on that clock.

A light timer wakes a scheduler about every 25 ms. The scheduler books every click due in the next 100 ms at its exact time on the audio clock and works out the following one by adding the interval. A late timer costs nothing, because the clicks are already booked; it only has to come back before the 100 ms window runs out. Tempo changes apply from the next click that is not booked yet, and the speed trainer changes the tempo exactly on the first beat of a bar.

The picture uses the same booking list. On every screen frame the page asks the audio clock which moment is being heard, corrected for output delay where the browser reports it, and draws the latest booked click. The flash follows the sound, not a separate timer.

In 6/8 each dot is an eighth note grouped 3 + 3, so beat 4 gets a medium accent. 12/8 is four groups of three, and 7/8 starts as 2 + 2 + 3.

Things to try

Frequently asked questions

What does BPM mean in 6/8 or 12/8 here?

Every dot gets one click, so in x/8 time the BPM counts eighth notes. If a piece is marked dotted quarter = 60, set 180 BPM, because a dotted quarter holds three eighths.

Why does it stop when I switch tabs?

Browsers slow down timers in hidden tabs, so clicks could no longer be booked in time, and a page you cannot see should not keep making sound. Press Start when you come back.

Is the flash exactly in time with the sound?

It is drawn from the booked click times on the audio clock, so on most devices it matches the sound to within one screen frame. Wireless headphones add a delay that the browser may not report in full, so with them the click can arrive slightly after the flash.

Does it need an internet connection?

No. All four sounds are synthesized in your browser with the Web Audio API; there are no audio files to download.

More free games and simulators