Standalone (miniaudio)¶
Generates self-contained CLI audio applications using miniaudio (public domain, single-header, zero-dependency). Processes real-time audio from the system's default input/output devices.
OS support: macOS (CoreAudio), Linux (ALSA/PulseAudio), Windows (WASAPI)
Prerequisites¶
- Python >= 3.10
- C++ compiler (
c++org++) - make
- curl (for downloading miniaudio.h at build time)
Quick Start¶
# From a gen~ export
gen-dsp ./my_export -n myeffect -p standalone
cd myeffect_standalone && make all
# Run
./myeffect -p revtime 0.8 -p roomsize 0.5
# List parameters
./myeffect -l
From a graph source:
python examples/graph/fm_synth.py -p standalone -b
./build/examples/fm_synth_standalone/fm_synth -p gate 1 -p freq 440 -p amp 0.3
CLI Flags¶
| Flag | Description | Default |
|---|---|---|
-sr <rate> |
Sample rate in Hz | 44100 |
-bs <frames> |
Block size in frames | 256 |
-p <name> <value> |
Set parameter (repeatable) | -- |
-l |
List parameters and exit | -- |
-h |
Show help | -- |
How It Works¶
gen_ext_standalone.cppimplementsmain()with miniaudio audio callback, CLI argument parsing, and audio device setup_ext_standalone.cppwraps genlib (header isolation pattern)- miniaudio.h is downloaded at build time via
curl(not bundled) - Mono gen~ outputs are automatically duplicated to stereo for device compatibility
- Audio I/O conversion: miniaudio delivers interleaved float; the callback deinterleaves for gen~'s per-channel
float**layout