I’ve ported JUCE AudioProcessor and friends to WebAssembly and AudioWorklet. The port turned out to be quite straight forward, and consists of three modules: core, events and audio (fusing audio_basics and audio_plugin_client).
AudioWorklet is pretty cool as it lives in browser’s audio thread, and with 128 sample buffer size latency is at decent levels. However, since it runs in a sandbox (worklet) inside a sandbox (browser), JUCE features need to be split in two parts: DSP in worklet and GUI + other stuff in browser’s main thread or web worker.
The port is still unoptimized, I’m learning as I go on. More info and couple of JUCE plugin demos are at the links below. We are targeting a community controlled open API to run VST-like plugins in browsers. Would be great to hear your feedback!
Or if you have a JUCE plugin that you’d like to port and need help, let me know. The only thing that needed to be changed in plugin DSP code was to comment out the GUI. GUI port required most effort for sure, but that was kind of fun as well. Yes, I’m a geek.
Please note that the demos require latest Chrome canary (64.0.3275 or later).