You're the author of Glicol, right? I've definitely had my eye on trying it out for a while. The karplus-stress-tester is great; I'm currently using message ports, because they seemed most accessible at first, but I'm happy to know there are other, and better options. I have done quite a bit of hand-optimizing of the code here, and while I think there's probably juice left to squeeze, it has become apparent to me that wasm is probably my next stop.
I've written one other AudioWorklet at this point, which just runs "inference" on a single-layer RNN given a pre-trained set of weights: https://blog.cochlea.xyz/rnn.html. It has similarly mediocre performance.
Thanks for all the great tips, and for your work on Glicol!
I used to do some web audio and tonejs works, but later switched to rust and glicol for sound synthesis.
For example, this handwritten dattorro reverb:
https://glicol.org/demo#handmadedattorroreverb
This karplus-stress-tester may also be interesting to you.
https://jackschaedler.github.io/karplus-stress-tester/
In short, I think to study more powerful physics synthesis, you need to consider the technology stack of
- rust -> wasm - audioworklet - sharedarraybuffer
Visual can rely on wgpu. Of course, webgl is enough in this case imho.
If it is purely desktop, you can consider using the physics library in bevy.