Log inGet started
Package

clock.module

Newest version

README.md

clock

The beat clock: song time locked to the music that is actually playing. Clock.new({ entity }) reads the mixer's playback position of that entity's Audio every tick(), free-runs on the wall clock between reports and pulls back onto each one (snapping when more than 50 ms off), so a hitch costs one frame and nothing drifts. Count-in (start({ lead }), wantsAudio()), pause holding, seek snapping, the browser's one-block lag (#21478), and stats() (block, mean and worst error, resyncs). source and now can be any functions, which is how the tests drive it. Used by downbeat.rhythm and downbeat.calibrate.