Skip to main content

vec_comb_coupled

Function vec_comb_coupled 

Source
pub fn vec_comb_coupled(
    bufs: &mut [&mut [f32]],
    positions: &mut [usize],
    damp: &mut [OnePoleState],
    dst: &mut [&mut [f32]],
    src: &[&[f32]],
    time: &[&[f32]],
    matrix: &[f32],
    damping: f32,
)
Expand description

Coupled comb filter (FDN): N delay lines with an N×N mixing matrix.

Each sample: reads N taps with interpolated modulated delay, applies one-pole damping, multiplies through the mixing matrix, then writes src[line] + mixed[line] back into each buffer. Outputs the damped taps (pre-matrix) so the caller can weight them for stereo.

The mixing matrix encodes both the cross-coupling pattern and feedback gain. For a standard FDN, use a normalized Hadamard matrix scaled by the desired feedback coefficient.

Use for: FDN reverbs (Hadamard, householder), Dattorro plate reverb, any architecture where delay lines cross-feed.

Maximum N is 16. Panics if bufs.len() exceeds this.