Mercurial > hg > drum-timing-analyser
diff DrumTimingLoader_OF/ofxAudioFileLoader/AudioFile.h @ 0:82352cfc0b23
Added files from ISMIR groove drum timing work
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Mon, 01 Oct 2012 22:24:32 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DrumTimingLoader_OF/ofxAudioFileLoader/AudioFile.h Mon Oct 01 22:24:32 2012 +0100 @@ -0,0 +1,44 @@ +/* + * audioFile.h + * audioFileLoader3 + * + * Created by Andrew on 31/07/2011. + * Copyright 2011 QMUL. All rights reserved. + * + */ + +//Holds the actual samples loaded in from the audio file +//in a double matrix, so multilpe channels used + + +#ifndef AUDIOFILE_H +#define AUDIOFILE_H + +#include "ofMain.h" + + +class AudioFile +{ +public: + AudioFile(); // constructor +// ~AudioFile(); + + + + void drawAudioVectorMillis(double startTimeMillis, double endTimeMillis); + void drawAudioVectorSamples(double startTimeSample, double endTimeSample); + double getPosition(int index); + + typedef std::vector<double> DoubleVector; + typedef std::vector<DoubleVector> DoubleMatrix; + DoubleVector audioVector; + DoubleMatrix audioMatrix; + + double screenHeight; + int length; + double audioScaleSamples; + double playPosition;//in samples + +}; + +#endif \ No newline at end of file