Core engine (wauvio/core)
Core overview
The core is the foundation every other Wauvio module builds on. It lives in wauvio/core/, is header-only, depends only on the C++17 standard library (plus WinMM on Windows), and is pulled in all at once by the umbrella header wauvio.hpp. Every part can also be included alone.
Parts and namespaces
| Header | Namespace | Responsibility | Page |
|---|---|---|---|
common.hpp | wauvio | Constants, Config, Buffer/StereoBuffer, buffer helpers, panning | common |
osc.hpp | wauvio::osc | Waveforms (naive and PolyBLEP), Oscillator, Supersaw, WavetableOscillator, NoiseGenerator | osc |
env.hpp | wauvio::env | ADSR, DAHDSR, LoopableEnvelope | env |
mod.hpp | wauvio::mod | LFO, automation curves | mod |
filter.hpp | wauvio::filter | SVFilter, one-pole filters, BiquadEQ, ParametricEQ | filter |
synth.hpp | wauvio::synth | FMSynth, Voice, VoiceManager | synth |
fx_basic.hpp | wauvio::fx::basic | Distortion, delay, reverb, chorus, flanger, phaser, sidechain compressor | fx_basic |
theory.hpp | wauvio::theory | midi_to_freq and the notes frequency table | theory |
seq.hpp | wauvio::seq | Note, Instrument, Track, DrumSequencer, MasterBus | seq |
io.hpp | wauvio | WAV export and asynchronous playback | io |
Include dependencies
common.hpp is the root. env, osc, filter and theory include only it; mod includes osc and filter; synth, seq and fx_basic pull in the primitives they use; io sits on top of common. The richer instrument and arrangement types are not part of the core: they live in wauvio::music (see ext).
Two effects namespaces.
wauvio::fx::basic (this page group) is the small effect set bundled into the core. The full effects suite (EQ, dynamics, saturation, modulation, delay, stereo, reverb, mastering, mixer) lives in wauvio/fx/ and is documented under FX suite.Design conventions
- Header-only. Everything is
inlineor defined in a class body; there is nothing to link exceptwinmm.libon Windows. - Offline buffers first. Most APIs render whole buffers (
render(seconds, sample_rate)). Statefultick()methods exist on oscillators, envelopes, LFOs, filters and effects for sample-by-sample use. - Sample-rate default. Any function taking
int sample_rate = 0falls back toglobal_config().sample_rate(44100 unless changed). - Parameters are public fields. Classes expose configuration as plain members; where coefficients are cached, call the matching
update_coeffs()/init()after changing them (details per class). - Buffers are plain data.
Bufferisstd::vector<float>; samples are nominally in [-1, 1].