News for hackers. Stuff that matters.
Re:Building a musical instrument with the Web Audio API by fenomas on Friday May 13, 2022 @08:54AM (#31366946)
> when there are some heavy stuff on the main thread the audio may get glitches

Where have you seen that? TFA is just using oscillators, not ScriptProcessor or anything, so one would expect all the heavy audio work to be happening outside the main thread.

Personally I use webaudio to do dynamic music for a game, and even though the game is reasonably heavy (3D, physics, etc) I've not noticed any particular glitching.

Re:Building a musical instrument with the Web Audio API by chaosprint on Friday May 13, 2022 @09:13AM (#31367139)
You are right! I should say ScriptProcessor there. But for heavy use of audio, especially when there are lots of interactions (often you want your own abstraction rather than the built-in nodes) and sample-level time should be taken into account, WASM+AudioWorklet should definitely be the first choice: https://youtu.be/GfC2WTStW8M?t=1084