22#ifndef __ONSETDETECTIONFUNCTION_H
23#define __ONSETDETECTIONFUNCTION_H
42 SpectralDifferenceHWR,
44 ComplexSpectralDifference,
45 ComplexSpectralDifferenceHWR,
47 HighFrequencySpectralDifference,
48 HighFrequencySpectralDifferenceHWR
100 void initialise (
int hopSize,
int frameSize,
int onsetDetectionFunctionType,
int windowType);
120 double energyEnvelope();
123 double energyDifference();
126 double spectralDifference();
129 double spectralDifferenceHWR();
132 double phaseDeviation();
135 double complexSpectralDifference();
138 double complexSpectralDifferenceHWR();
141 double highFrequencyContent();
144 double highFrequencySpectralDifference();
147 double highFrequencySpectralDifferenceHWR();
151 void calculateRectangularWindow();
154 void calculateHanningWindow();
157 void calclulateHammingWindow();
160 void calculateBlackmanWindow();
163 void calculateTukeyWindow();
170 double princarg(
double phaseVal);
172 void initialiseFFT();
179 int onsetDetectionFunctionType;
185 fftw_complex* complexIn;
186 fftw_complex* complexOut;
192 kiss_fft_cpx* fftOut;
193 std::vector<std::vector<double> > complexOut;
199 std::vector<double> frame;
200 std::vector<double> window;
202 double prevEnergySum;
204 std::vector<double> magSpec;
205 std::vector<double> prevMagSpec;
207 std::vector<double> phase;
208 std::vector<double> prevPhase;
209 std::vector<double> prevPhase2;
OnsetDetectionFunctionType
Definition OnsetDetectionFunction.h:38
WindowType
Definition OnsetDetectionFunction.h:54
Definition OnsetDetectionFunction.h:65
void initialise(int hopSize, int frameSize)
Definition OnsetDetectionFunction.cpp:64
double calculateOnsetDetectionFunctionSample(double *buffer)
Definition OnsetDetectionFunction.cpp:179
~OnsetDetectionFunction()
Definition OnsetDetectionFunction.cpp:55
void setOnsetDetectionFunctionType(int onsetDetectionFunctionType)
Definition OnsetDetectionFunction.cpp:173