
Web Audio Scheduling Drift: Right in Code, Late in the Room
A Web Audio metronome on setTimeout drifts because the JavaScript timer and the audio clock are two clocks. A lookahead scheduler on currentTime fixes it, measured before and after.
0%
0000000
0x00
Posts tagged Tone.js on abchaudary.me.

A Web Audio metronome on setTimeout drifts because the JavaScript timer and the audio clock are two clocks. A lookahead scheduler on currentTime fixes it, measured before and after.

A Web MIDI app has three states to track: permission, device and connection. When an input disconnects, release every note it started, or the note sticks after the device returns.