Mercurial > hg > btrack
diff src/OnsetDetectionFunction.h @ 20:baf35f208814 develop
Replaced switch statements in OnsetDetectionFunction with enums. Renamed lots of functions so that they have better names, in camel case. Added some unit tests for initialisation of BTrack.
| author | Adam <adamstark.uk@gmail.com> | 
|---|---|
| date | Thu, 23 Jan 2014 15:31:11 +0000 | 
| parents | 73c64ca0ed23 | 
| children | a8e3e95d14e4 | 
line wrap: on
 line diff
--- a/src/OnsetDetectionFunction.h Thu Jan 23 12:17:06 2014 +0000 +++ b/src/OnsetDetectionFunction.h Thu Jan 23 15:31:11 2014 +0000 @@ -24,6 +24,31 @@ #include "fftw3.h" +//======================================================================= +enum OnsetDetectionFunctionType +{ + EnergyEnvelope, + EnergyDifference, + SpectralDifference, + SpectralDifferenceHWR, + PhaseDeviation, + ComplexSpectralDifference, + ComplexSpectralDifferenceHWR, + HighFrequencyContent, + HighFrequencySpectralDifference, + HighFrequencySpectralDifferenceHWR +}; + +//======================================================================= +enum WindowType +{ + RectangularWindow, + HanningWindow, + HammingWindow, + BlackmanWindow, + TukeyWindow +}; + class OnsetDetectionFunction { public:
