Reverb
FdnReverb
An 8-line feedback delay network reverb.
| Field | Default | Meaning |
|---|---|---|
decay_s | 2.5 | Low-frequency RT60, 0.1–30 s |
predelay_ms | 15 | |
size | 1.0 | Scales delay lengths (0.4 small room … 2.5 huge hall) |
damping_hz | 6000 | High frequencies decay faster above this; 0 = none |
diffusion | 0.6 | 0..1 input smearing |
mod_depth_ms, mod_rate_hz | 0.25, 0.35 | Delay-length wobble against metallic ringing |
width | 1.0 | Wet stereo width |
lowcut_hz, highcut_hz | 80, 12000 | Wet filtering |
mix | 0.3 |
Procedural impulse responses — ir::
ir::Params: rt60 1.8, predelay_ms 8, hf_damping 0.5, early 0.5, stereo 1.0, seed 1. ir::make(params, sr) builds a stereo IR from sparse early reflections plus an exponentially decaying, progressively darker Gaussian-noise tail; identical params and seed give an identical IR. Presets:
| Preset | rt60 (s) | predelay (ms) | hf_damping | early |
|---|---|---|---|---|
room() | 0.6 | 3 | 0.55 | 0.7 |
chamber() | 1.3 | 6 | 0.45 | 0.55 |
hall() | 2.8 | 22 | 0.5 | 0.35 |
cathedral() | 6.0 | 35 | 0.65 | 0.25 |
plate() | 2.0 | 0 | 0.15 | 0.0 |
ConvolutionReverb
Uniform-partitioned overlap-save FFT convolution (512-sample partitions; latency 512 samples, compensated by Chain). A stereo IR convolves left with left and right with right; a mono IR is used for both. Set the IR with set_ir(StereoBuffer, sr), set_ir(Buffer, sr), set_ir(ir::Params) (generated at the render rate on prepare) or load_ir(path) (WAV, resampled if needed). Fields: mix 0.3, predelay_ms, wet_gain_db, normalize_ir (unit energy).
Full API listing
wauvio/fx/effects/reverb.hpp
wauvio::fx::class FdnReverb
class FdnReverb : public Effect
public:
double decay_s = 2.5; ///< RT60 at low frequencies, 0.1 .. 30 s (damping makes highs shorter)
double predelay_ms = 15.0;
double size = 1.0; ///< scales all delay lengths (0.4 small room .. 2.5 huge hall)
double damping_hz = 6000.0; ///< high frequencies decay faster above this; 0 = no damping
double diffusion = 0.6; ///< 0..1, input smearing (allpass chain)
double mod_depth_ms = 0.25; ///< slow delay-length wobble; breaks up metallic ringing (0 = off)
double mod_rate_hz = 0.35;
double width = 1.0; ///< wet stereo width: 0 = mono, 1 = full
double lowcut_hz = 80.0; ///< wet high-pass (0 = off)
double highcut_hz = 12000.0; ///< wet low-pass (0 = off)
double mix = 0.3;
std::string name() const override { return "FdnReverb"; }
double tail_seconds() const override { return predelay_ms * 0.001 + std::min(30.0, std::max(0.1, decay_s)) * 1.1; }
void reset() override
using Effect::process;
void process(float* L, float* R, size_t n) override
struct Params
double rt60 = 1.8; ///< seconds to -60 dB
double predelay_ms = 8.0;
double hf_damping = 0.5; ///< 0 = bright tail, 1 = very dark tail
double early = 0.5; ///< early-reflection level 0..1 (0 = none)
double stereo = 1.0; ///< 0 = both channels identical, 1 = fully decorrelated
uint64_t seed = 1;
inline Params room() { Params p; p.rt60 = 0.6; p.predelay_ms = 3; p.hf_damping = 0.55; p.early = 0.7; return p; }
inline Params chamber() { Params p; p.rt60 = 1.3; p.predelay_ms = 6; p.hf_damping = 0.45; p.early = 0.55; return p; }
inline Params hall() { Params p; p.rt60 = 2.8; p.predelay_ms = 22; p.hf_damping = 0.5; p.early = 0.35; return p; }
inline Params cathedral() { Params p; p.rt60 = 6.0; p.predelay_ms = 35; p.hf_damping = 0.65; p.early = 0.25; return p; }
inline Params plate() { Params p; p.rt60 = 2.0; p.predelay_ms = 0; p.hf_damping = 0.15; p.early = 0.0; return p; }
/// Stereo impulse response: sparse early reflections + a gaussian-noise tail that
/// decays exponentially and gets darker over time. Same params + seed = same IR.
inline StereoBuffer make(const Params& p, int sr)
wauvio::fx::class ConvolutionReverb
// ConvolutionReverb - uniform-partitioned overlap-save FFT convolution
// Stereo IR: left input * IR left, right input * IR right. Mono IR: used on both.
// Latency = partition size (512 samples); Chain compensates it.
class ConvolutionReverb : public Effect
public:
double mix = 0.3;
double predelay_ms = 0.0;
double wet_gain_db = 0.0;
bool normalize_ir = true; ///< scale IR to unit energy so wet level ~ input level
std::string name() const override { return "ConvolutionReverb"; }
size_t latency_samples() const override { return B; }
double tail_seconds() const override { return ir_seconds_ + predelay_ms * 0.001; }
void set_ir(const StereoBuffer& ir, int ir_sr) { ir_[0] = ir.L; ir_[1] = ir.R; ir_sr_ = ir_sr; dirty_ = true; update_len(); }
void set_ir(const Buffer& mono, int ir_sr) { ir_[0] = mono; ir_[1] = mono; ir_sr_ = ir_sr; dirty_ = true; update_len(); }
/// Procedural IR (see ir::room() etc.). Generated at the current sample rate on prepare.
void set_ir(const ir::Params& p) { proc_ = p; use_proc_ = true; dirty_ = true; ir_seconds_ = p.predelay_ms * 0.001 + p.rt60 * 1.15; }
/// Load a WAV impulse response (mono or stereo; resampled to the render rate if needed).
void load_ir(const std::string& path)
void reset() override
using Effect::process;
void process(float* L, float* R, size_t n) override