WAMs

All posts by jari

Embedding WAMs

WAMs have two incarnations. A headless WebAssembly synth is distributed as a loader script file (e.g., obxd.js), and it implements the synth engine as an AudioWorkletNode – AudioWorkletProcessor pair. The second incarnation adds frontpanel GUI, reusing the headless synth engine implementation. GUI version is distributed as a Web Component (e.g., obxd.html), and loaded using HTML import. I wrote recently also a <wam-host> container to simplify WAM embedding. <wam-host> A) handles synth loading and instantiation, B) provides common patch and midi port management, and C) exposes…

Read More »

AudioWorklet polyfill

OBXD and DEXED demos run now in stable Chrome, Firefox and Safari. Edge testing is still pending, can someone try it please? AudioWorklet polyfill source code is available at github. It is loosely based on Houdini’s AnimationWorklet polyfill, repurposed for running AudioWorkletProcessor (and AudioWorkerGlobalScope) in a Web Worker, and AudioWorkerNode in main thread. Audio output is through main thread ScriptProcessorNode (SPN). Worker and SPN are interconnected via SharedArrayBuffer. SharedArrayBuffer is very cool. Chrome stable seem to work with 256 sample buffer size without audio glitches…

Read More »

webDEXED

The webDEXED port was pretty easy. After some minor modifications in the DEXED codebase I just linked it against the JUCE WebAssembly library (which was created when porting webOBXD). The GUI port was grabbed from my earlier PNaCl implementation. This WAM uses AudioWorklet’s MessagePort that landed in Chrome Canary 64.0.3275.0. If you want to try the demo, please make sure you are running the latest version of canary! DEXED is a DX7 emulation, originally created by Digital Suburban (github). DEXED has two DX engines under the hood. The…

Read More »

VAMP plugins as WAMs

About a year ago I explored how to get VAMP plugins online. As a proof of concept I ported Dan Stowell’s amplitude follower VAMP plugin as a WAM. A demo is available at http://webaudiomodules.org/demos/vamp/vamphost.html This WAM is implemented as a PNaCl module, so it requires Chrome (canary is not necessary). After porting and thinking a bit further, I concluded that desktop browser is actually an excellent platform for hosting VAMPs. Here’s a quick and incomplete list of the benefits. plugin implementation : realtime/offline audio graphs and…

Read More »

webOBXD

I ported a subset of the JUCE library to WebAssembly, and bridged WAM::Processor directly to juce::PluginProcessor. The bridge is a generic wrapper for JUCE plugins. It looks like JUCE C++ code requires only minor changes, if any at all to be used as a WAM. As a proof of concept, I wrapped the OBXD JUCE plugin as a WAM, compiled it in WebAssembly, linked it to the WASM JUCE library, and finally encapsulated the result as an AudioWorklet. A demo is available here. Like webDX7,…

Read More »

webDX7 — AudioWorklet/WASM

A public git repository for our work-in-progress  AudioWorklet/WebAssembly version of webDX7 is now available at github. An early demo works with webMIDI and an embedded onscreen keyboard, and contains couple of DX7 sysex files to play with. Please note that the demo requires Chrome Canary 64 or later, and enabling experimental web platform features in chrome://flags.

Read More »

AudioWorklets and WASM

We are currently migrating our API to v0.2, which will support AudioWorklets and WebAssembly (WASM). The AudioWorklet reduces latency and glitches due to threading conflicts, while WASM increases performance and gives a smaller download size. WASM has been out for quite some time already, and the initial AudioWorklet implementation just landed on Chrome Canary. Exciting times! Also time to start keeping this website up to date. webDX7 has already been compiled in WASM, and it runs as an AudioWorklet. The binary is a neat 25kB package, and it works with 128 sample…

Read More »