Pitch Perfector
A real-time pitch-shifting microphone project at the University of Glasgow
 All Classes Functions
fft.h
1 #pragma once
2 
3 #include <RtAudio.h>
4 #include <fftw3.h>
5 #include "voxFilter.h"
6 
7 const int AUDIO_BUFFER_SIZE = 512;
8 const int FFT_BUFFER_SIZE = AUDIO_BUFFER_SIZE/2 + 1;
9 
10 class VoxFilter;
11 class fft {
12  public:
13  int nBufferFrames;
14  double in[AUDIO_BUFFER_SIZE];
15  fftw_complex out[FFT_BUFFER_SIZE];
16  fftw_complex inverse_in[FFT_BUFFER_SIZE];
17  double inverse_out[AUDIO_BUFFER_SIZE];
18  int samplingRate;
19  fftw_plan my_plan;
20  fftw_plan inverse_plan;
21  VoxFilter* voxFilter;
22 
23  fft(int nBufferFrames, int samplingRate);
24  void executefft(double* inputBuffer);
25  void executeInverse_fft(fftw_complex* fourierSpectrum);
26 };
27 
fft(int nBufferFrames)
Construct the fftw3 plans for the object.
Definition: fft.cpp:6
Definition: voxFilter.h:12
Class for performing fourier transforms using FFTW3.
Definition: fft.h:17
void executeInverse_fft(fftw_complex *fourierSpectrum)
Definition: fft.cpp:23
void executefft(double *inputBuffer)
Definition: fft.cpp:18