Mercurial > hg > screen-ui
view src/melodyTriangle.h @ 8:3d9e0db254dc
Added OSC receive
author | Henrik Ekeus <hekeus@eecs.qmul.ac.uk> |
---|---|
date | Thu, 26 Jan 2012 23:42:13 +0000 |
parents | d879a30556f8 |
children | 317637282293 |
line wrap: on
line source
#include "ofMain.h" #include "Voice.h" #include "ofxOsc.h" class melodyTriangle : public ofBaseApp{ public: melodyTriangle(const char *host, int port, int numVoices, bool enableKeys, int voiceIdOffset, int receivePort); 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); int numVoices; int voiceIdOffset; bool enableKeys; float counter; bool bSmooth; //Voice *voices[NUMVOICES]; Voice *voices[10]; int x1,y1,x2,y2,x3,y3;//Triangle Coords int triangleHeight; int voiceGrabbed; void sendStatus(Voice v); bool isInTriangle(int x, int y); private: ofxOscSender sender; ofxOscReceiver receiver; };