annotate 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
rev   line source
andrew@0 1 /*
andrew@0 2 * audioFile.h
andrew@0 3 * audioFileLoader3
andrew@0 4 *
andrew@0 5 * Created by Andrew on 31/07/2011.
andrew@0 6 * Copyright 2011 QMUL. All rights reserved.
andrew@0 7 *
andrew@0 8 */
andrew@0 9
andrew@0 10 //Holds the actual samples loaded in from the audio file
andrew@0 11 //in a double matrix, so multilpe channels used
andrew@0 12
andrew@0 13
andrew@0 14 #ifndef AUDIOFILE_H
andrew@0 15 #define AUDIOFILE_H
andrew@0 16
andrew@0 17 #include "ofMain.h"
andrew@0 18
andrew@0 19
andrew@0 20 class AudioFile
andrew@0 21 {
andrew@0 22 public:
andrew@0 23 AudioFile(); // constructor
andrew@0 24 // ~AudioFile();
andrew@0 25
andrew@0 26
andrew@0 27
andrew@0 28 void drawAudioVectorMillis(double startTimeMillis, double endTimeMillis);
andrew@0 29 void drawAudioVectorSamples(double startTimeSample, double endTimeSample);
andrew@0 30 double getPosition(int index);
andrew@0 31
andrew@0 32 typedef std::vector<double> DoubleVector;
andrew@0 33 typedef std::vector<DoubleVector> DoubleMatrix;
andrew@0 34 DoubleVector audioVector;
andrew@0 35 DoubleMatrix audioMatrix;
andrew@0 36
andrew@0 37 double screenHeight;
andrew@0 38 int length;
andrew@0 39 double audioScaleSamples;
andrew@0 40 double playPosition;//in samples
andrew@0 41
andrew@0 42 };
andrew@0 43
andrew@0 44 #endif