A reverb whose state carries between calls: Freeverb, eight comb filters into four allpasses on each channel.
reverb = TuningFork.Reverb.new(44_100)
{wet, reverb} = TuningFork.Reverb.run(reverb, pcm, 2, 0.3, 0.6)
Summary
Types
@type channel() :: %{ combs: [{:queue.queue(float()), float()}], allpasses: [:queue.queue(float())] }
@type t() :: %TuningFork.Reverb{ left: channel(), rate: pos_integer(), right: channel() }
Functions
@spec new(pos_integer()) :: t()
A silent room at rate samples per second.
Run pcm through the room and return the wet signal and the state to carry to the next
call.
mix is how much of the room comes back, 0.0 to 1.0, and size how long the room rings,
in seconds to silence, 0.1 to 10.
channels is how the PCM is interleaved: stereo goes through a left and a right room that
differ slightly, mono through the left. A mix at or below zero returns the input
untouched and leaves the state as it was.
The room's own sound for pcm and nothing of pcm itself, for a caller mixing the two in
its own proportions. channels and size are as run/5 takes them.