DSP runs in C++ compiled to WebAssembly. Click to load the module and grant microphone access.
Requires echo_chamber.js (built via Emscripten) in the same directory.
C++ WebAssembly · delay · convolution reverb · real-time
echo_chamber.cpp compiled to WebAssembly via Emscripten.
The delay line is a power-of-2 RingBuffer with linear interpolation for
sub-sample accuracy — the same structure used in EchoPsychFX (JUCE). The reverb is a
Schroeder network: 4 parallel comb filters (mutually prime lengths, RT60-derived gain)
followed by 2 all-pass diffusors, with a Gardner pre-delay. All parameter changes are
smoothed with a one-pole filter to prevent zipper noise. JS handles only audio I/O and
UI; it writes samples into the WASM linear memory heap and reads results back per block.
Source: github.com/Code4Al1z/echo-chamber
All DSP runs in echo_chamber.cpp compiled to WebAssembly via Emscripten — the JS layer handles only audio I/O and UI. The delay line is a power-of-2 RingBuffer with linear interpolation for sub-sample accuracy, identical in structure to the delay used in EchoPsychFX (JUCE). The reverb is a Schroeder network: 4 parallel comb filters with mutually prime lengths and RT60-derived gain, followed by 2 all-pass diffusors, with a Gardner pre-delay stage. All parameter changes go through a one-pole smoother to eliminate zipper noise on fast sweeps.
JS writes samples into the WASM linear memory heap via Module.HEAPF32, calls EchoChamber_process() in C++, and reads the output buffer back per 128-sample block. The Emscripten SINGLE_FILE build inlines the WASM binary as base64 into the JS glue file — no separate asset fetch, no CORS, no server required.
Note: ScriptProcessorNode is deprecated in favour of AudioWorklet — a production build would move the WASM call off the main thread.
echo_chamber.js.