Mercurial > hg > btrack
diff src/OnsetDetectionFunction.h @ 57:296af6af6c3d
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 Stark <adamstark@users.noreply.github.com> |
---|---|
date | Thu, 23 Jan 2014 15:31:11 +0000 |
parents | 338f5eb29e41 |
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: