|
| | SvfBankT () |
| void | configure (std::size_t voice, Mode mode, SampleType sample_rate, SampleType frequency, SampleType resonance) |
| | Install a coherent mode, rate, cutoff and resonance for one voice (SvfT::configure()).
|
| void | set_sample_rate (std::size_t voice, SampleType sample_rate) |
| void | set_frequency (std::size_t voice, SampleType hz) |
| void | set_resonance (std::size_t voice, SampleType q) |
| void | set_mode (std::size_t voice, Mode mode) |
| Filter::Coefficients | coefficients (std::size_t voice) const |
| | The voice's coefficients (SvfT::design() for its current settings).
|
| void | process (const SampleType *in, SampleType *out) |
| | Advance every voice by one sample: out[v] = voice v's output for in[v].
|
| void | process_voices (SampleType *const *buffers, std::size_t num_samples) |
| | Advance every voice by num_samples samples in place, one buffer per voice (buffers[v] holds voice v's input and receives its output).
|
| void | reset (std::size_t voice) |
| void | reset () |
template<typename SampleType = float, std::size_t Voices = 16>
class pulp::signal::SvfBankT< SampleType, Voices >
Voices independent SvfT voices advanced together.
Contract:
- Each voice's output is bit-identical to an SvfT<SampleType> with the same mode, sample rate, frequency and resonance, driven with the same inputs through SvfT::process(SampleType) from the same reset state, including its per-sample denormal snap. Setters have SvfT's semantics: coefficients come from SvfT::design() and are recomputed by every rate, frequency or resonance change; a default-constructed voice has all-zero coefficients until one of them is set, as SvfT does.
- Voices share nothing but storage, and each has its own mode.
- process() advances every voice by one sample; process_voices() advances every voice by a block, one buffer per voice.
Why it is faster: the voices' state is held in structure-of-arrays form and every step is a loop over independent voices, which the compiler vectorizes; the per-voice mode becomes a per-lane select instead of a branch.
RT contract: storage is fixed-size; every member function allocates no memory.