Hacker News new | ask | show | jobs
by dyltur 1754 days ago
Ah I'm sorry you're having that problem. The audio is scheduled accurately with the web audio api (using Tone.js), but on some devices performance could still be an issue. The best experience is definitely with Chrome or Firefox on desktop/laptop (Safari or mobile devices may not work as well). If you think your device should be capable of running it smoothly (or the frame rate is good, but the audio isn't) it could help me out to know which OS and Browser you're using.
3 comments

This link posted above stutters reliably on my box, always at the same spots: https://go.ludotune.com/hui4

Win10, FF 91.0.1 64-bit

Stutters at ~24 seconds, ~32, maybe 1:30ish, 5 seconds after that... then I lost track. Not very often but when it does it's very jarring. Happens if it's running in the foreground or background, even if I'm not moving around or anything, just listening with tab in focus.

Thanks for this! The detail is much appreciated, I'll investigate.
An idea is to have a lookahead buffer, if the simulation is causing the issue
Linux, firefox 91, gtx 1660 ti, ryzen 3550h.

I think it should run smooth because I can play minecraft at 1440p at around 100 fps.

For me the Mad World one stutters before a single note is played: the repeater/clock seems to run, then stop, then "catches up", then stutters again, then one cycle smooth, etc. Sometimes notes are also just skipped, or only the last part of the soundbite is played.

I looked at cpu usage and it pegs a single thread to about 90% so maybe that explains it.

Listen the fact you can get good and compatible experience on Tone.js at any level is hugely impressive!

I have given up on any Web Audio that is not a single AudioWorklet with some kind of self contained wasm ugen