Mercurial > hg > precise-onset-detection
view src/PreciseOnsetLocator.h @ 0:3dcbd77efc94
added files for OF project
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Fri, 21 Sep 2012 16:35:17 +0100 |
parents | |
children | 7ec1ed0b2eb0 |
line wrap: on
line source
/* * PreciseOnsetLocator.h * peakOnsetDetector * * Created by Andrew 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