YJ.
Experimental Lab

Web Audio Digital Metronome

A precise, web-based digital metronome built with React and the Web Audio API, featuring customizable time signatures and BPM shortcuts.

React Web Audio API Interactive Tool

This metronome uses the Web Audio API with a lookahead scheduling mechanism. Traditional setInterval loops in JavaScript can suffer from timing drift due to the single-threaded nature of the event loop. By scheduling future notes ahead of time directly on the audio context, we achieve sample-accurate timing regardless of main thread blockage.