4 ms·
The timing inaccuracy across similar projects is due to the internal inaccuracy of the JavaScript timer methods- setTimeout and setInterval; not because of the
by turntayble81 16y ago
The timing inaccuracy across similar projects is due to the internal inaccuracy of the JavaScript timer methods- setTimeout and setInterval; not because of the HTML5 audio tag. If you notice in my app, the keys of the keyboard can be tapped to play sounds. The bass drum and snare are generally on the left, and hi hats/cymbals generally on the right so you can tap out some pretty funky beats. You will notice the timing is very accurate when tapping out beats. I tried a few html5-specific solutions to produce rock-solid timing, but the spec is simply not there yet, and variances between browsers are unacceptable. I have been playing around with the FF4 beta apis a bit, and there are definitely some promising enhancements coming.
Keep me posted on the progress of your project! :)