Pitch Perfector
A real-time pitch-shifting microphone project at the University of Glasgow
 All Classes Functions
Public Member Functions | Public Attributes | List of all members
fft Class Reference

Class for performing fourier transforms using FFTW3. More...

#include <fft.h>

Public Member Functions

 fft (int nBufferFrames)
 Construct the fftw3 plans for the object.
 
void executefft (double *inputBuffer)
 
void executeInverse_fft (fftw_complex *fourierSpectrum)
 
 fft (int nBufferFrames)
 
void executefft (double *inputBuffer)
 
void executeInverse_fft (fftw_complex *fourierSpectrum)
 
 fft (int nBufferFrames, int samplingRate)
 
void executefft (double *inputBuffer)
 
void executeInverse_fft (fftw_complex *fourierSpectrum)
 

Public Attributes

int nBufferFrames
 
double * in
 
fftw_complex * out
 
fftw_complex * inverse_in
 
double * inverse_out
 
fftw_plan my_plan
 
fftw_plan inverse_plan
 
double in [AUDIO_BUFFER_SIZE]
 
fftw_complex out [FFT_BUFFER_SIZE]
 
fftw_complex inverse_in [FFT_BUFFER_SIZE]
 
double inverse_out [AUDIO_BUFFER_SIZE]
 
int samplingRate
 
VoxFiltervoxFilter
 

Detailed Description

Class for performing fourier transforms using FFTW3.

Allows for the set-up of a fftw3 plan (the most time consuming part of the process) when the class instantiated, allowing the performance of forward and inverse fast fourier transforms with minimal computational cost inside the RtAudio Callback when the methods are called.

Member Function Documentation

void fft::executefft ( double *  inputBuffer)

Execute the forward fourier transform and update generate the frequncy spectrum for the data input

void fft::executeInverse_fft ( fftw_complex *  fourierSpectrum)

Execute the inverse fourier transform to reconstruct a time-series signal from the input frequency spectrum. Data is then scaled back to the appropriate size.


The documentation for this class was generated from the following files: