A window is a rule for feedback, not a reflex score.

A rhythm target is a moment, but a tap arrives somewhere around it. The simplest model stores the signed difference: negative for early, positive for late. A judgement then measures the absolute distance from the target. Close taps are Perfect, a wider band is Good, and anything outside is Miss.

This separates two questions that are easy to mix up. “How far away was the tap?” is a measurement. “What should the game call it?” is a design rule. Keeping the millisecond value beside the label lets you inspect the rule instead of treating Perfect as a mysterious property of the player.

The demo uses a 600 ms interval, equivalent to 100 beats per minute. That number is only 60,000 ÷ 600; it does not imply a preferred tempo. Start with the default windows, tap with Space or the large button, and compare raw and corrected deviations after each input.

Original interactive / Local millisecond timing

Tap the beat.
Inspect the signed error.

Every target is 600 ms apart. Negative means early and positive means late. The judge uses the absolute corrected error; the sign remains visible so you can diagnose a consistent direction.

Adjustable timing windowsPerfect spans plus or minus 45 milliseconds. Good extends to plus or minus 120 milliseconds. Outside that is Miss.-240-180-120-60060120180240PERFECT ±45MISS / EARLYLATE / MISS
12345678

Calibration offset: +0 ms
The highlighted beat number is a static indicator, not a moving animation. Use headphones or your usual output, start calibration, and tap at least four times. The median raw offset is subtracted in later rounds.

No audio files are loaded. Starting a round creates or resumes Web Audio from that click. Sound is optional; visual timing works while muted. Nothing is recorded on a server.

Start an eight-beat round, then press Space or Tap. The first beat arrives after a short count-in.

Perfect 0Good 0Miss 0

No taps yet. A finished round also lists missed beats, without assigning them a made-up millisecond value.

Signed error first, label second.

For target time t, input time i and calibration offset c, the demo calculates raw = i − t and corrected = raw − c. The grade comes from |corrected|. If the offset is +30 ms, a later tap is reduced by 30 ms; an early tap becomes more negative. Calibration changes the centre, not the width of either window.

The target is the nearest beat after correction, with one result accepted per beat. This prevents a rapid second press from replacing the first result. A finished round adds Miss for an untouched beat but deliberately shows no millisecond deviation for it: no input time exists, so inventing a number would be misleading.

Both window boundaries are inclusive. At the defaults, +45 or −45 ms is still Perfect, while +120 or −120 ms is Good. Only an absolute corrected error beyond 120 ms becomes Miss. The diagram and settings show half-windows, so the full Perfect band is twice the displayed ± value.

Window width changes what the feedback teaches.

An extremely narrow window can turn a readable rhythm into repeated rejection, especially when the player cannot tell whether the tap was early, late or affected by output timing. A wider Good band can preserve a useful distinction: the input was close enough to recognise, even if it was not Perfect. The signed measurement still supports improvement.

Width is not generosity for its own sake. If Good covers almost the whole interval between beats, the label stops distinguishing deliberate timing from an arbitrary tap. Overlapping targets also make the choice of nearest beat more important. A useful window leaves room for learning while preserving a meaningful difference between adjacent moments.

Change only Perfect first and predict how a known ±45 ms tap will be classified. Then restore it and change Good. Because the demo enforces a gap between the two, Good always remains the wider category. These are not recommendations for other games or devices.

Calibrate a repeatable offset, not a person.

Suppose every tap arrives roughly 30 ms after its nearest target. Subtracting a +30 ms calibration would centre that pattern without changing its spread. The demo’s calibration round ignores any existing correction, collects raw signed offsets and uses their median. Four valid taps are required; more taps can provide a less fragile estimate. The median limits the influence of one unusually early or late attempt.

  1. Use the input and sound output you intend to keep. You can also stay muted and follow the static beat numbers.
  2. Start calibration and tap along with at least four of the ten beats. Do not chase individual corrections between taps.
  3. Read the estimated offset and spread. Apply it automatically to a new round, then compare raw and corrected columns.
  4. Repeat after changing headphones, speakers, input device or browser conditions. Clear the offset rather than carrying it into an unrelated setup.

This is a practical compensation experiment, not an exact hardware-latency measurement. Output, input and human response are combined in the result. Web Audio exposes an outputLatency estimate for part of the audio path, but that property does not include every cause of a tapping offset. Sound here is optional and synthesised only after you click Start; volume defaults to 25% and can be muted.

Repeat the comparison before drawing a conclusion.

Keep tempo, windows and input method fixed while testing calibration. Then keep calibration fixed while changing one window. A smaller spread suggests more consistent taps; a shifted centre suggests an offset. A single Perfect result cannot distinguish either pattern, so inspect the whole list rather than celebrating one label.

To explore the interval as a musical quantity, read tempo and BPM explained. Syncopation explained shows why a target need not sit only on the strongest beat, while Rhythm and fractions offers another way to discuss subdivisions. For movement-side allowances rather than beat judgements, compare jump feel, coyote time and buffering.

Keep experimenting.

Compare another model in How games work, make a drawing or rhythm in our original browser studios, or follow a longer project in the guides.

Questions about timing windows.

Is Perfect decided from the absolute or signed error?

It is decided from the absolute corrected error in this demo. Early and late taps therefore receive the same label at the same distance from the target. The signed value remains beside the label because knowing the direction helps you change your next tap or investigate a consistent offset.

What happens exactly on a window boundary?

The boundary is included. With Perfect set to ±45 ms, a corrected error of +45 or −45 ms is Perfect. With Good set to ±120 ms, +120 and −120 ms are Good. Anything beyond ±120 ms is Miss. These are this demo’s settings, not universal standards.

Does calibration measure the exact latency of my device?

No. It estimates the median signed offset of your taps in this page, which can combine output timing, input timing and your own consistent response. It cannot separate those causes. Browser audio-latency properties describe parts of the output path, but they do not turn this tapping exercise into a hardware measurement.

Should I use calibration to make every result Perfect?

No. Use it to remove a repeatable offset, then look at the remaining spread. A stable correction may centre the results; it cannot make variable taps identical. Keep it small enough to be plausible, repeat the measurement, and clear it when your device, output or input conditions change.

Sources and method.

Judgement, nearest-target selection, median calibration and summaries are original pure functions with boundary tests. MDN’s performance.now() reference documents the monotonic millisecond clock used for local input comparisons. Its Web Audio best practices explain user-gesture start and volume or mute controls, and the outputLatency reference defines that narrower audio-path estimate.

Catalog names and links were checked against the public catalog API and its cursor pagination on 5 December 2026. No catalog game’s internal timing values are claimed or inspected. Read our editorial standards for the broader approach to evidence and original interactive material.