Mercurial > hg > multitrack-audio-matcher
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c4f9e49226eb |
---|---|
1 #ifndef _TEST_APP | |
2 #define _TEST_APP | |
3 | |
4 | |
5 #include "ofMain.h" | |
6 #include "sndfile.h" | |
7 #include "ofxFileDialogOSX.h" | |
8 #include "LoadedAudioHolder.h" | |
9 //#include "ofxSoundFileLoader.h" | |
10 #include "AudioEventMatcher.h" | |
11 | |
12 #include "LoadedAudioHolder.h" | |
13 | |
14 #include "ofxOsc.h" | |
15 #define PORT 10874 | |
16 | |
17 | |
18 //note the dependency on sndfile (libsndfile library needs to be accessible) | |
19 //also the file dialogue addon | |
20 | |
21 //main commands: | |
22 //O: open a new file | |
23 //see the key pressed function for other bits - e.g. can view spectral difference | |
24 | |
25 //TO DO | |
26 //Move all the soundfile stuff to the ofxSoundFileLoader | |
27 //can hold the player, the audio samples and the onset class there | |
28 | |
29 //length in terms of frames (at 512 samples per frame - there are 90 per second) => 900: 10 seconds | |
30 | |
31 class testApp : public ofBaseApp{ | |
32 | |
33 public: | |
34 | |
35 | |
36 void setup(); | |
37 void update(); | |
38 void draw(); | |
39 | |
40 void keyPressed (int key); | |
41 void keyReleased(int key); | |
42 void mouseMoved(int x, int y ); | |
43 void mouseDragged(int x, int y, int button); | |
44 void mousePressed(int x, int y, int button); | |
45 void mouseReleased(int x, int y, int button); | |
46 void windowResized(int w, int h); | |
47 | |
48 void audioRequested (float * input, int bufferSize, int nChannels); | |
49 | |
50 void checkForOSCmessages(); | |
51 | |
52 bool getFilenameFromDialogBox(string* fileNameToSave); | |
53 void openNewAudioFileWithdialogBox(); | |
54 void loadNewAudio(string soundFileName); | |
55 | |
56 typedef vector<LoadedAudioHolder> AudioFileVector; | |
57 // AudioFileVector loadedAudioFiles; | |
58 | |
59 AudioEventMatcher eventMatcher; | |
60 | |
61 LoadedAudioHolder* loadedAudioPtr; | |
62 int numberOfAudioTracks; | |
63 | |
64 LoadedAudioHolder loadedAudioFiles[5]; | |
65 | |
66 // LoadedAudioHolder audioFilePlayer; | |
67 | |
68 // LoadedAudioHolder bassFilePlayer; | |
69 | |
70 ofxOscReceiver receiver; | |
71 | |
72 | |
73 //live audio input | |
74 float pan; | |
75 int sampleRate; | |
76 bool bNoise; | |
77 float volume; | |
78 float * lAudio; | |
79 float * rAudio; | |
80 | |
81 | |
82 }; | |
83 | |
84 #endif |