SFX engine (wauvio/sfx)
SFX engine overview
The SFX engine (wauvio/sfx.hpp, namespace wauvio::sfx) designs and renders sound effects — risers, impacts, glitches, textures, bass FX, ear candy, vocal FX, rhythmic FX, synthetic percussion, experimental sounds, tonal motion and reverses. It ships a catalog of 190 presets in 12 categories, a low-level recipe language to build your own, a layering composer and a command-line tool.
See it in action: Find a preset and tweak it · Layer effects on a timeline · Build a sound from scratch
Concepts
| Concept | What it is | Page |
|---|---|---|
Traj, Mod | Parameter trajectories over normalised time, and stateless LFOs | Recipes |
Recipe, LayerSpec | Plain-data description of an effect: layers, each with one source and a processor chain | Recipes |
render(), RenderSettings, Rendered | Turn a recipe into audio, deterministically from a seed | Engine |
Preset, Registry, Effect | Parametrised recipes with metadata; the tunable handle you actually use | Presets |
Layered | Composite of several presets/effects/audio with offsets, pitch and pan | Presets |
| Parameter dictionary | The shared vocabulary of preset parameters | Parameters |
wauvio_sfx_tool | CLI: list, search, info, render, catalog | Tool |
| Examples | Eight annotated programs | Examples |
Quick start
#include "wauvio/sfx.hpp"
namespace sfx = wauvio::sfx;
sfx::Effect hit = sfx::make("cinematic_impact"); // throws sfx::Error (with suggestions) on unknown ids
hit.set("duration", 3.0).set("tail", 4.0).seed(1234);
sfx::Rendered audio = hit.render(); // 44.1 kHz stereo, peak normalised to -1 dBFS
audio.save("impact.wav");
Design principles
- Deterministic. Every random decision derives from a seed; the same recipe, seed and settings give the same audio. (Floating-point results can differ between platforms/compilers.)
- Strict validation. Parameter values outside their range and non-finite numbers throw
sfx::Error; nothing is silently clamped. - Data-driven. Recipes are plain structs; presets are functions that fill a recipe from parameters, so you can add presets to your own
Registry. - Tempo aware. Effects accept a tempo and durations in beats; gates, LFOs and layered offsets can lock to it.
- Offline. Rendering is whole-buffer, with a memory guard (
max_seconds, default 120 s).
Include order (sfx.hpp)
core (sfx_common, sfx_traj, sfx_params, sfx_recipe, sfx_helpers) → render (sources, processors, engine) → presets/registry → layers/layered → presets/builtin (registers all 12 category files).