Mercurial > hg > precise-onset-detection
view src/PreciseOnsetLocator.h @ 2:7ec1ed0b2eb0
Added offline precise onset detection, outputting precise locations in seconds to text file
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Mon, 30 Dec 2013 14:08:42 +0000 |
parents | 3dcbd77efc94 |
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