include Yin pitch tracking algo

This commit is contained in:
Trent
2017-06-26 22:30:05 -04:00
parent 025d7cd6aa
commit 7db2d6c00b
10 changed files with 324 additions and 172 deletions

26
Source/Yin.h Normal file
View 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;
};