|
ASPiK SDK
|
The FastFFT provides a simple wrapper for the FFTW FFT operation - it is ultra-thin and simple to use. More...
#include <fxobjects.h>
Public Member Functions | |
| void | initialize (unsigned int _frameLength, windowType _window) |
| initialize the Fast FFT object for operation | |
| void | destroyFFTW () |
| destroys the FFTW arrays and plans. | |
| fftw_complex * | doFFT (double *inputReal, double *inputImag=nullptr) |
| perform the FFT operation | |
| fftw_complex * | doInverseFFT (double *inputReal, double *inputImag) |
| perform the IFFT operation | |
| unsigned int | getFrameLength () |
Protected Attributes | |
| fftw_complex * | fft_input = nullptr |
| array for FFT input | |
| fftw_complex * | fft_result = nullptr |
| array for FFT output | |
| fftw_complex * | ifft_input = nullptr |
| array for IFFT input | |
| fftw_complex * | ifft_result = nullptr |
| array for IFFT output | |
| fftw_plan | plan_forward = nullptr |
| FFTW plan for FFT. | |
| fftw_plan | plan_backward = nullptr |
| FFTW plan for IFFT. | |
| double * | windowBuffer = nullptr |
| buffer for window (naked) | |
| double | windowGainCorrection = 1.0 |
| window gain correction | |
| windowType | window = windowType::kHannWindow |
| window type | |
| unsigned int | frameLength = 0 |
| current FFT length | |
The FastFFT provides a simple wrapper for the FFTW FFT operation - it is ultra-thin and simple to use.
Audio I/O:
Control I/F:
| void FastFFT::destroyFFTW | ( | ) |
destroys the FFTW arrays and plans.
destroy FFTW objects and plans
| fftw_complex * FastFFT::doFFT | ( | double * | inputReal, |
| double * | inputImag = nullptr |
||
| ) |
perform the FFT operation
do the FFT and return real and imaginary arrays
| inputReal | an array of real valued points |
| inputImag | an array of imaginary valued points (will be 0 for audio which is real-valued) |
| fftw_complex * FastFFT::doInverseFFT | ( | double * | inputReal, |
| double * | inputImag | ||
| ) |
perform the IFFT operation
do the IFFT and return real and imaginary arrays
| inputReal | an array of real valued points |
| inputImag | an array of imaginary valued points (will be 0 for audio which is real-valued) |
|
inline |
get the current FFT length
| void FastFFT::initialize | ( | unsigned int | _frameLength, |
| windowType | _window | ||
| ) |
initialize the Fast FFT object for operation
setup the FFT for a given framelength and window type
| _frameLength | the FFT length - MUST be a power of 2 |
| _window | the window type (note: may be set to windowType::kNone) |