#include <Convolver.h>
|
| int | setup (const std::string &filename, unsigned int blockSize, unsigned int maxLength=0) |
| int | setup (const std::vector< std::vector< float > > &irs, unsigned int blockSize) |
| void | process (float *out, const float *in, unsigned int frames, unsigned int channel=0) |
| void | processInterleaved (float *out, const float *in, unsigned int frames, unsigned int outChannels, unsigned int inChannels) |
|
void | cleanup () |
| unsigned int | getChannels () |
Convolve a monophonic input signal with one or more impulse responses.
- Examples
- terminal-only/filter-FIR/render.cpp.
◆ setup() [1/2]
| int Convolver::setup |
( |
const std::string & | filename, |
|
|
unsigned int | blockSize, |
|
|
unsigned int | maxLength = 0 ) |
Use this to load an impulse response from an audio file. Every channel in the audio file corresponds to a convolution channel.
- Parameters
-
| path | to the audio file to use as an impulse response |
| blockSize | the maximum number of frames passed to process...() |
| maxLength | the max length of the impulse response. If filename contains more than maxLength frames, it will be truncated. |
◆ setup() [2/2]
| int Convolver::setup |
( |
const std::vector< std::vector< float > > & | irs, |
|
|
unsigned int | blockSize ) |
Use this to set up a multi-channel impulse response from memory.
- Parameters
-
| irs | a vector of vectors, each of which correponds to the impulse response for one channel. The length of irs is the maximum number of input channels to be passed to process...(). |
| blockSize | the maximum number of frames passed to process...() |
◆ process()
| void Convolver::process |
( |
float * | out, |
|
|
const float * | in, |
|
|
unsigned int | frames, |
|
|
unsigned int | channel = 0 ) |
Process a block of samples through the specified convolution channel.
- Parameters
-
| out | pointer to the output buffer. |
| in | pointer to the input buffer. |
| frames | the number of frames to process. |
| channel | which convolution channel to use. |
◆ processInterleaved()
| void Convolver::processInterleaved |
( |
float * | out, |
|
|
const float * | in, |
|
|
unsigned int | frames, |
|
|
unsigned int | outChannels, |
|
|
unsigned int | inChannels ) |
Process a block of interleaved samples. Each input channel is processed through the convolver channels, and the output of each convolution is written into the respective channel of out.
- Parameters
-
| out | pointer to the output buffer. |
| in | pointer to the input buffer. |
| frames | the number of frames to process. |
| outChannels | the number of channels in out. |
| inChannels | the number of input channels in in. |
◆ getChannels()
| unsigned int Convolver::getChannels |
( |
| ) |
|
|
inline |
Return the number of channels in the convolver.
The documentation for this class was generated from the following files:
- libraries/Convolver/Convolver.h
- libraries/Convolver/Convolver.cpp