annotate src/PreciseOnsetLocator.h @ 8:184a7c232049 tip

changed files since updating computer
author Venetian
date Thu, 14 Aug 2014 17:53:57 +0100
parents 7ec1ed0b2eb0
children
rev   line source
andrew@0 1 /*
andrew@0 2 * PreciseOnsetLocator.h
andrew@0 3 * peakOnsetDetector
andrew@0 4 *
andrew@2 5 * Created by Andrew Robertson on 21/09/2012.
andrew@0 6 * Copyright 2012 QMUL. All rights reserved.
andrew@0 7 *
andrew@0 8 */
andrew@0 9
andrew@0 10
andrew@0 11 #ifndef PRECISE_ONSET_LOCATOR
andrew@0 12 #define PRECISE_ONSET_LOCATOR
andrew@0 13
andrew@0 14 #include <vector.h>
andrew@0 15
andrew@0 16 class PreciseOnsetLocator{
andrew@0 17 public:
andrew@0 18
andrew@0 19 PreciseOnsetLocator();
andrew@0 20 ~PreciseOnsetLocator();
andrew@0 21
andrew@0 22 int bufferSize;
andrew@0 23
andrew@0 24 vector <double> onsetSamples;//holds the audio samples when onset is found
andrew@0 25 vector <double> recentBufferSamples;
andrew@0 26
andrew@0 27 double getLastEnergySum(const int& startIndex, const int& vectorSize);
Venetian@8 28
Venetian@8 29 int findExactOnset();
Venetian@8 30 int findExactOnset(float* frame);
andrew@0 31 int findExactOnset(double* frame);
andrew@0 32
andrew@0 33 int exactOnsetIndex;
andrew@0 34
andrew@0 35 void setup(const int& size);
andrew@0 36 void storeSamples(double* newSamples);
andrew@0 37
andrew@0 38 };
andrew@0 39 #endif