3 ms·
If you want something really accurate and resistant to any problems with CPU and drift in tickers, then you need to schedule ticks by yourself by reading e.g. p
by sheerun 7y ago
If you want something really accurate and resistant to any problems with CPU and drift in tickers, then you need to schedule ticks by yourself by reading e.g. performance.now(), like so: https://gist.github.com/sheerun/00e358e7bdbcd2088573e4b7b921ce67 https://gist.github.com/sheerun/00e358e7bdbcd2088573e4b7b921...
Above example will indefinitely beat with 60bpm (10ms accuracy)
- jwandborg 7y agoThat's nodejs code. I'm not sure you can compare console.log in nodejs to playing sound in a browser.