#include <IFFT.h>
Public Member Functions | |
IFFT (int fftSize=1024, bool zeroPhase=true) | |
~IFFT () | |
void | process (const MatrixXC &fft, MatrixXR *frame) |
int | fftSize () const |
void | setFftSize (int size, bool callSetup=true) |
bool | zeroPhase () const |
void | setZeroPhase (bool zeroPhase, bool callSetup=true) |
The IFFT is a fast implementation of an Inverse Discrete Fourier Transform (IDFT). The algorithm takes as input (M / 2 + 1) point vectors of Complex values (M being the FFT size), and returns N point vectors of Real values (N being the frame size).
The input of the IFFT is assumed to be the positive frequencies half of an M point magnitude symmetric and phase antisymmetric FFT. Therefore the result is a Real value vector.
Note that N can be smaller than M. In this case the last ( M - N ) coefficients will be discarded, since it assumes that zero padding has been made at the end of the frame prior to the forward FFT transform.
Alternatively the algorithm can undo the center zeropadding and the N/2 rotation if done durnig the FFT forward transform. This is specified by using the setZeroPhase() method.
IFFT | ( | int | fftSize = 1024 , |
|
bool | zeroPhase = true | |||
) |
Constructs an IFFT object with the specified fftSize and zeroPhase setting.
fftSize | size of the IFFT transform must be > 0, it is the target size of the transform. The algorithm performs faster for sizes which are a power of 2. | |
zeroPhase | specifies whether or not the zero phase method was performed. |
References setFftSize(), and setZeroPhase().
void process | ( | const MatrixXC & | fft, | |
MatrixXR * | frame | |||
) |
Performs a Inverse Fast Fourier Transform on each of the rows of fft and puts the resulting IFFT in the rows of frames.
fft | matrix of Complex values. The number of columns of fft must be equal to the (fftSize / 2) + 1, where fftSize is parameter of the constructor or specified by setFftSize(). | |
frame | pointer to a matrix of Real values for the output. The matrix should have the same number of rows as fft and fftSize columns. |
Note that if the output matrix is not of the required size it will be resized, reallocating a new memory space if necessary.
Referenced by Correlation::process(), and Autocorrelation::process().
int fftSize | ( | ) | const |
void setFftSize | ( | int | size, | |
bool | callSetup = true | |||
) |
bool zeroPhase | ( | ) | const |
void setZeroPhase | ( | bool | zeroPhase, | |
bool | callSetup = true | |||
) |