Why browser pianos feel laggy (it's probably your speakers)

4 jul 2026 · recital notes

key ~5 ms this page <1 ms audio engine 3–20 ms bluetooth 100–300 ms the entire problem, usually
three links whisper. one link shouts.

"Your piano is laggy" is the most common complaint every virtual piano receives, and the diagnosis is almost always the same — so here is the whole chain from fingertip to eardrum, with numbers, so you can find your own bottleneck in about a minute.

The chain, link by link

Input (~5 ms): your keyboard or touchscreen reports the press to the browser. Gaming keyboards shave this; it was never the problem. The page (<1 ms): when you press, this piano schedules oscillators immediately — synthesis has no file to fetch, which is one quiet advantage over sample-players that may stream their recordings. The audio engine (3–20 ms): the operating system mixes audio in small buffers; the measured figure shows under the keys once you play. Wired output on a modern machine sits at the low end. The output device: here the road forks. Wired headphones and built-in speakers add essentially nothing. Bluetooth adds 100 to 300 milliseconds — the codec compresses, transmits, decompresses, buffers — and there is nothing any web page can do about it.

Why 200 ms ruins playing but not videos

Videos survive bluetooth because players delay the picture to match the sound — everything stays in sync, just slightly later. An instrument can't do that: your finger is the timeline. At 30 ms, press-to-sound feels instant. At 100, the piano feels underwater. At 250, your brain refuses to believe it caused the note — the feedback loop that makes an instrument an instrument is severed. Musicians' tolerance here is brutal: drummers notice 10 ms.

The one-minute fix

Play three notes, then: on bluetooth anything? Unpair it — laptop speakers beat AirPods for playing, every time, and it isn't close. Still sluggish on wired? Close the forty-tab browser next door; starved CPUs stretch audio buffers. Check the measured latency under the keys — under 20 ms and green, the chain is healthy and any remaining lag is nerves, which practice fixes cheaper than hardware.