andrew@0: #ifndef _TEST_APP andrew@0: #define _TEST_APP andrew@0: andrew@0: andrew@0: //midieventholder - newMidiEvents() sent there andrew@0: //create cannamMidiLoader for cannamMainfunction andrew@0: andrew@0: andrew@0: //check new prior offset function - how is used? andrew@0: andrew@0: andrew@0: andrew@0: //check the widening function - adding decay noise andrew@0: //ticksperscreen could be better as millis per screen andrew@0: andrew@0: andrew@0: andrew@2: //uses ftmMidiPlay in max5 via osc to communicate notes in andrew@0: andrew@0: #include "ofMain.h" andrew@0: andrew@0: #include "MIDIFileReader.h" andrew@0: #include "ofxFileDialogOSX.h" andrew@0: #include "drawMidiNotes.h" andrew@0: #include "DynamicBayesianArray.h" andrew@2: #include "CannamMidiFileLoader.h" andrew@0: #include andrew@0: #include "midiEventHolder.h" andrew@0: andrew@0: #include "ofxOsc.h" andrew@0: #define PORT 12121 andrew@0: andrew@0: using namespace std; andrew@0: using namespace MIDIConstants; andrew@0: andrew@0: class testApp : public ofBaseApp{ andrew@0: andrew@0: public: andrew@0: void setup(); andrew@0: void update(); andrew@0: void draw(); andrew@0: andrew@0: void keyPressed (int key); andrew@0: void keyReleased(int key); andrew@0: void mouseMoved(int x, int y ); andrew@0: void mouseDragged(int x, int y, int button); andrew@0: void mousePressed(int x, int y, int button); andrew@0: void mouseReleased(int x, int y, int button); andrew@0: void windowResized(int w, int h); andrew@0: andrew@0: void startPlaying(); andrew@0: void stopPlaying(); andrew@0: bool getFilenameFromDialogBox(string* fileNameToSave); andrew@0: andrew@0: typedef std::vector IntVector; andrew@0: typedef std::vector DoubleVector; andrew@0: // typedef std::vector IntMatrix; andrew@0: IntVector v; andrew@0: andrew@0: midiEventHolder midiEvents; andrew@0: andrew@0: int cannamMainFunction(); andrew@0: string midiFileName; andrew@0: andrew@0: bool playing; andrew@0: //drawMidiNotes drawer; andrew@0: andrew@0: // BayesianArrayStructure bayesStruct; andrew@0: andrew@0: int screenWidth, screenHeight; andrew@2: CannamMidiFileLoader fileLoader; andrew@0: andrew@0: private: andrew@0: ofxOscReceiver receiver; andrew@0: andrew@2: andrew@2: andrew@0: }; andrew@0: andrew@0: #endif