Mercurial > hg > precise-onset-detection
view src/PreciseOnsetLocator.h @ 4:93b9a9471011
Changes to precise onset
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Mon, 06 Jan 2014 18:10:01 +0000 |
parents | 7ec1ed0b2eb0 |
children | 184a7c232049 |
line wrap: on
line source
/* * PreciseOnsetLocator.h * peakOnsetDetector * * Created by Andrew Robertson on 21/09/2012. * Copyright 2012 QMUL. All rights reserved. * */ #ifndef PRECISE_ONSET_LOCATOR #define PRECISE_ONSET_LOCATOR #include <vector.h> class PreciseOnsetLocator{ public: PreciseOnsetLocator(); ~PreciseOnsetLocator(); int bufferSize; vector <double> onsetSamples;//holds the audio samples when onset is found vector <double> recentBufferSamples; double getLastEnergySum(const int& startIndex, const int& vectorSize); int findExactOnset(double* frame); int exactOnsetIndex; void setup(const int& size); void storeSamples(double* newSamples); }; #endif