hekeus@6: hekeus@6: hekeus@6: #include "ofMain.h" hekeus@6: #include "Voice.h" hekeus@6: hekeus@6: #include "ofxOsc.h" hekeus@6: hekeus@6: hekeus@6: hekeus@6: hekeus@6: hekeus@6: class melodyTriangle : public ofBaseApp{ hekeus@6: hekeus@6: public: hekeus@8: melodyTriangle(const char *host, int port, int numVoices, bool enableKeys, int voiceIdOffset, int receivePort); hekeus@6: hekeus@6: void setup(); hekeus@6: void update(); hekeus@6: void draw(); hekeus@6: hekeus@6: void keyPressed(int key); hekeus@6: void keyReleased(int key); hekeus@6: void mouseMoved(int x, int y ); hekeus@6: void mouseDragged(int x, int y, int button); hekeus@6: void mousePressed(int x, int y, int button); hekeus@6: void mouseReleased(int x, int y, int button); hekeus@6: void windowResized(int w, int h); hekeus@6: int numVoices; hekeus@6: int voiceIdOffset; hekeus@6: bool enableKeys; hekeus@6: float counter; hekeus@6: bool bSmooth; hekeus@6: //Voice *voices[NUMVOICES]; hekeus@6: Voice *voices[10]; hekeus@6: hekeus@6: int x1,y1,x2,y2,x3,y3;//Triangle Coords hekeus@6: int triangleHeight; hekeus@6: int voiceGrabbed; hekeus@6: void sendStatus(Voice v); hekeus@6: bool isInTriangle(int x, int y); hekeus@6: hekeus@6: hekeus@6: private: hekeus@6: ofxOscSender sender; hekeus@8: ofxOscReceiver receiver; hekeus@6: };