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

HeaderNamespaceResponsibilityPage
common.hppwauvioConstants, Config, Buffer/StereoBuffer, buffer helpers, panningcommon
osc.hppwauvio::oscWaveforms (naive and PolyBLEP), Oscillator, Supersaw, WavetableOscillator, NoiseGeneratorosc
env.hppwauvio::envADSR, DAHDSR, LoopableEnvelopeenv
mod.hppwauvio::modLFO, automation curvesmod
filter.hppwauvio::filterSVFilter, one-pole filters, BiquadEQ, ParametricEQfilter
synth.hppwauvio::synthFMSynth, Voice, VoiceManagersynth
fx_basic.hppwauvio::fx::basicDistortion, delay, reverb, chorus, flanger, phaser, sidechain compressorfx_basic
theory.hppwauvio::theorymidi_to_freq and the notes frequency tabletheory
seq.hppwauvio::seqNote, Instrument, Track, DrumSequencer, MasterBusseq
io.hppwauvioWAV export and asynchronous playbackio

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 inline or defined in a class body; there is nothing to link except winmm.lib on Windows.
  • Offline buffers first. Most APIs render whole buffers (render(seconds, sample_rate)). Stateful tick() methods exist on oscillators, envelopes, LFOs, filters and effects for sample-by-sample use.
  • Sample-rate default. Any function taking int sample_rate = 0 falls back to global_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. Buffer is std::vector<float>; samples are nominally in [-1, 1].