FAUST
Run a FAUST DSP program from a compiled WASM module and process audio through it.
What it does
FAUST loads a compiled FAUST DSP program and runs it as a live audio node in the graph. The DSP is written and compiled elsewhere (faust.grame.fr, or the faust compiler targeting WASM); this node points at the resulting .wasm file, runs it in real time and streams the result out as stereo audio.
A FAUST program's own parameters vary from patch to patch, so the node exposes three generic numeric knobs (Param 0–2) that map onto whatever controls the loaded DSP exposes, plus the sample rate it runs at. Wire audio into Audio In to run the module as an effect (a filter, distortion or delay processing an existing signal). Leave Audio In unwired to run the module as a generator (a synth or oscillator producing sound from nothing).
When to use it
Running a built or downloaded FAUST DSP patch live inside a graph
A synthesiser or effect that is not among the built-in audio nodes: FAUST covers filters, physical models and synths
Driving a custom DSP algorithm's parameters from the rest of the graph
| Parameter | Type | Default |
|---|---|---|
wasm_file | String | "" |
param_0 | Number | 0.500 |
param_1 | Number | 0.500 |
param_2 | Number | 0.500 |
sample_rate | Number | 44100 |
audio_in | NumberArray | — |
Gotchas
Param 0, 1 and 2 are generic slots and carry none of the real control names from the patch. Check the Param Info output, or the DSP source, for what each slot drives.
Audio In is optional. Disconnected, the patch runs as a self-contained generator; wired, it processes the incoming signal as an effect.
A companion .json file is expected next to the .wasm, the usual output of the FAUST WASM compiler. It carries the parameter and I/O metadata needed to run the module correctly.
Changing the WASM file, or nudging Sample Rate, reloads the DSP module from scratch. Internal state the patch was holding (envelopes, delay lines, filter memory) resets at that point.
Worked example
Compile the
.dspfile to WASM (e.g. via faust.grame.fr) and add a FAUST node.Set Wasm File to the compiled
.wasmpath, keeping its companion.jsonalongside it.Adjust Param 0–2 to taste, checking Param Info for what each one controls.
Optionally wire an audio signal into Audio In to run the patch as an effect; otherwise it runs as a generator.
Take Audio Left / Audio Right into a Mixer or straight to output.
See also
Audio Mixer · Additive Synth · Audio Analysis · Numbers, signals & audio