Very neat! Though I got prominent clicks and artifacts in both chrome and firefox.
If anyone's interested, some years ago I made a wrapper library for things like this, to wallpaper over the famously hairy WebAudio synthesis API. Basically you pass in a static object describing the audio graph and parameters you want, and the lib creates the WebAudio nodes and then cleans them up after the sound releases (hopefully without clicks, unless you specifically want them).
clicks are challenging for web audio. your project looks great.
I have a similar work here. Hopefully it can achieve performant audio synthesis in browsers:
If anyone's interested, some years ago I made a wrapper library for things like this, to wallpaper over the famously hairy WebAudio synthesis API. Basically you pass in a static object describing the audio graph and parameters you want, and the lib creates the WebAudio nodes and then cleans them up after the sound releases (hopefully without clicks, unless you specifically want them).
https://github.com/fenomas/wasgen