annotate DrumTimingLoader_OF/ofxAudioFileLoader/testApp.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 #ifndef _TEST_APP
andrew@0 2 #define _TEST_APP
andrew@0 3
andrew@0 4
andrew@0 5 #include "ofMain.h"
andrew@0 6 #include "sndfile.h"
andrew@0 7 #include "ofxFileDialogOSX.h"
andrew@0 8 #include "LoadedAudioHolder.h"
andrew@0 9 //#include "ofxSoundFileLoader.h"
andrew@0 10 #include "LoadedAudioHolder.h"
andrew@0 11
andrew@0 12 //note the dependency on sndfile (libsndfile library needs to be accessible)
andrew@0 13 //also the file dialogue addon
andrew@0 14
andrew@0 15 //main commands:
andrew@0 16 //O: open a new file
andrew@0 17 //see the key pressed function for other bits - e.g. can view spectral difference
andrew@0 18
andrew@0 19 //TO DO
andrew@0 20 //Move all the soundfile stuff to the ofxSoundFileLoader
andrew@0 21 //can hold the player, the audio samples and the onset class there
andrew@0 22
andrew@0 23 //length in terms of frames (at 512 samples per frame - there are 90 per second) => 900: 10 seconds
andrew@0 24
andrew@0 25 class testApp : public ofBaseApp{
andrew@0 26
andrew@0 27 public:
andrew@0 28
andrew@0 29
andrew@0 30 void setup();
andrew@0 31 void update();
andrew@0 32 void draw();
andrew@0 33
andrew@0 34 void keyPressed (int key);
andrew@0 35 void keyReleased(int key);
andrew@0 36 void mouseMoved(int x, int y );
andrew@0 37 void mouseDragged(int x, int y, int button);
andrew@0 38 void mousePressed(int x, int y, int button);
andrew@0 39 void mouseReleased(int x, int y, int button);
andrew@0 40 void windowResized(int w, int h);
andrew@0 41
andrew@0 42 void audioRequested (float * input, int bufferSize, int nChannels);
andrew@0 43
andrew@0 44 bool getFilenameFromDialogBox(string* fileNameToSave);
andrew@0 45 void openNewAudioFileWithdialogBox();
andrew@0 46 void loadNewAudio(string soundFileName);
andrew@0 47
andrew@0 48 LoadedAudioHolder audioFilePlayer;
andrew@0 49
andrew@0 50
andrew@0 51 //live audio input
andrew@0 52 float pan;
andrew@0 53 int sampleRate;
andrew@0 54 bool bNoise;
andrew@0 55 float volume;
andrew@0 56 float * lAudio;
andrew@0 57 float * rAudio;
andrew@0 58
andrew@0 59
andrew@0 60 };
andrew@0 61
andrew@0 62 #endif