include Yin pitch tracking algo
This commit is contained in:
26
Source/Yin.h
Normal file
26
Source/Yin.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
//#include "WProgram.h"
|
||||
|
||||
class Yin{
|
||||
|
||||
public:
|
||||
Yin();
|
||||
Yin(float sampleRate,int bufferSize);
|
||||
void initialize(float sampleRate,int bufferSize);
|
||||
float getPitch(float* buffer);
|
||||
float getProbability();
|
||||
|
||||
private:
|
||||
float parabolicInterpolation(int tauEstimate);
|
||||
int absoluteThreshold();
|
||||
void cumulativeMeanNormalizedDifference();
|
||||
void difference(float* buffer);
|
||||
|
||||
double threshold;
|
||||
int bufferSize;
|
||||
int halfBufferSize;
|
||||
float sampleRate;
|
||||
float* yinBuffer;
|
||||
float probability;
|
||||
};
|
Reference in New Issue
Block a user