class
SushiDSP::PartitionedConvolution
Uniform-partitioned overlap-add FFT convolution against a fixed impulse response.
- Declared in
include/SushiDSP/math/PartitionedConvolution.hpp
The impulse response is split into partition_count() blocks of partition_size samples, each transformed once in the constructor. Every process() call transforms one input block, stores it in a circular history of past input spectra, accumulates the partition products in the frequency domain, and overlap-adds the inverse transform against the tail saved by the previous call. Allocation-free after construction.
Public member functions
PartitionedConvolution(std::uint32_t partition_size, const float *impulse_response, std::uint32_t impulse_length)Precomputes the FFT of every impulse-response partition.
Parameters
partition_sizeBlock size in frames; also the FFT half-size (fft_size = 2*partition_size). Must be a power of two so that the doubled transform size is one too.
impulse_responseThe impulse response samples.
impulse_lengthNumber of samples in impulse_response.
void process(const float *input, float *output)Processes one block, convolving it against the impulse response.
Parameters
inputpartition_size input samples.
outputpartition_size output samples (overlap-added).
Note
input and output must not alias each other.
std::uint32_t partition_size() constThe block size this instance was constructed for.
Returns
The partition size in frames.
std::uint32_t partition_count() constThe number of impulse-response partitions.
Returns
The partition count.
void reset()Clears the spectrum history and overlap tail, as if freshly constructed.
The impulse-response partitions themselves are untouched.

