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.

Concepts

ConceptWhat it isPage
Traj, ModParameter trajectories over normalised time, and stateless LFOsRecipes
Recipe, LayerSpecPlain-data description of an effect: layers, each with one source and a processor chainRecipes
render(), RenderSettings, RenderedTurn a recipe into audio, deterministically from a seedEngine
Preset, Registry, EffectParametrised recipes with metadata; the tunable handle you actually usePresets
LayeredComposite of several presets/effects/audio with offsets, pitch and panPresets
Parameter dictionaryThe shared vocabulary of preset parametersParameters
wauvio_sfx_toolCLI: list, search, info, render, catalogTool
ExamplesEight annotated programsExamples

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).