This project is a proof of concept for porting audio processing software made in C++ to Web Audio. Web Audio utilizes processing nodes written in JavaScript. Using a compiling tool called "Emscripten" is is possible to compile C/C++ into Web Assmembly (WASM), and then from WASM into JavaScript. To test this process, I took a distortion effect I made a few years ago, compiled it into WASM, and wrapped it into a Web Audio AudioProcessorNode in JavaScript. I also made a simple mono sine MIDI synth in JavaScript to provide audio input for the effect.
To use this effect, plug in a MIDI keyboard of your choice, and press "Start". The distortion effect is off initially, use the "Bypass" button to toggle the effect on/off. To change the amount of distortion, or the cutoff frequency, just enter a new value, and press "Set". Enjoy! [Note that due to limitations of the Web MIDI API, this app will only work correctly in Google Chrome.]
Thanks to Hongchan Choi, the Web Audio and Web MIDI APIs, Kripken from Emscripten, and XingXing from CCRMA