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
Vocoder Class Reference

Public Member Functions

 Vocoder (int sampleRate, int bufferSize, const double *scaleFrequencies)
 
float binary_search (const float *NotesInKey, float *note, int highest_index, int lowest_index)
 
float noteFinder (const float *NotesInKey, float *note)
 
float SampleToFreq (int sample)
 
void pitchShift_setup (fftw_complex *fft_spectrum)
 
void pitchShift ()
 
void findPeak ()
 
double getClosest (double val1, double val2, double target)
 
double findClosestNote (const double notes[], int n, double target)
 
int FrequencyToIndex (double frequency)
 
void setFourierSpectrum (fftw_complex *fftSpectrum)
 
const char * frequencyToNote (double freq)
 
char * getNote ()
 

Public Attributes

float baseFreq
 
int baseSample
 
int samplerate
 
int bufferSize
 
float frequencyResolution
 
const double * scaleFrequencies
 
float newFreq
 
float difference
 
int binDifference
 
fftw_complex fourierSpectrum [257]
 
double peakFrequency
 
double closestNoteFrequency
 
char currentNote [4]
 
double * peakFrequencyPointer
 

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