Mercurial > hg > multitrack-audio-matcher
diff src/testApp.h @ 0:c4f9e49226eb
Initialising repository. Live osc input registered. Files analysed offline.
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Tue, 31 Jan 2012 13:54:17 +0000 |
parents | |
children | 852173ca8365 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/testApp.h Tue Jan 31 13:54:17 2012 +0000 @@ -0,0 +1,84 @@ +#ifndef _TEST_APP +#define _TEST_APP + + +#include "ofMain.h" +#include "sndfile.h" +#include "ofxFileDialogOSX.h" +#include "LoadedAudioHolder.h" +//#include "ofxSoundFileLoader.h" +#include "AudioEventMatcher.h" + +#include "LoadedAudioHolder.h" + +#include "ofxOsc.h" +#define PORT 10874 + + +//note the dependency on sndfile (libsndfile library needs to be accessible) +//also the file dialogue addon + +//main commands: +//O: open a new file +//see the key pressed function for other bits - e.g. can view spectral difference + +//TO DO +//Move all the soundfile stuff to the ofxSoundFileLoader +//can hold the player, the audio samples and the onset class there + +//length in terms of frames (at 512 samples per frame - there are 90 per second) => 900: 10 seconds + +class testApp : public ofBaseApp{ + + public: + + + void setup(); + void update(); + void draw(); + + void keyPressed (int key); + void keyReleased(int key); + void mouseMoved(int x, int y ); + void mouseDragged(int x, int y, int button); + void mousePressed(int x, int y, int button); + void mouseReleased(int x, int y, int button); + void windowResized(int w, int h); + + void audioRequested (float * input, int bufferSize, int nChannels); + + void checkForOSCmessages(); + + bool getFilenameFromDialogBox(string* fileNameToSave); + void openNewAudioFileWithdialogBox(); + void loadNewAudio(string soundFileName); + + typedef vector<LoadedAudioHolder> AudioFileVector; +// AudioFileVector loadedAudioFiles; + + AudioEventMatcher eventMatcher; + + LoadedAudioHolder* loadedAudioPtr; + int numberOfAudioTracks; + + LoadedAudioHolder loadedAudioFiles[5]; + +// LoadedAudioHolder audioFilePlayer; + +// LoadedAudioHolder bassFilePlayer; + + ofxOscReceiver receiver; + + +//live audio input + float pan; + int sampleRate; + bool bNoise; + float volume; + float * lAudio; + float * rAudio; + + +}; + +#endif