Mercurial > hg > screen-ui
annotate 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 |
rev | line source |
---|---|
hekeus@6 | 1 |
hekeus@6 | 2 |
hekeus@6 | 3 #include "ofMain.h" |
hekeus@6 | 4 #include "Voice.h" |
hekeus@6 | 5 |
hekeus@6 | 6 #include "ofxOsc.h" |
hekeus@6 | 7 |
hekeus@6 | 8 |
hekeus@6 | 9 |
hekeus@6 | 10 |
hekeus@6 | 11 |
hekeus@6 | 12 class melodyTriangle : public ofBaseApp{ |
hekeus@6 | 13 |
hekeus@6 | 14 public: |
hekeus@8 | 15 melodyTriangle(const char *host, int port, int numVoices, bool enableKeys, int voiceIdOffset, int receivePort); |
hekeus@6 | 16 |
hekeus@6 | 17 void setup(); |
hekeus@6 | 18 void update(); |
hekeus@6 | 19 void draw(); |
hekeus@6 | 20 |
hekeus@6 | 21 void keyPressed(int key); |
hekeus@6 | 22 void keyReleased(int key); |
hekeus@6 | 23 void mouseMoved(int x, int y ); |
hekeus@6 | 24 void mouseDragged(int x, int y, int button); |
hekeus@6 | 25 void mousePressed(int x, int y, int button); |
hekeus@6 | 26 void mouseReleased(int x, int y, int button); |
hekeus@6 | 27 void windowResized(int w, int h); |
hekeus@6 | 28 int numVoices; |
hekeus@6 | 29 int voiceIdOffset; |
hekeus@6 | 30 bool enableKeys; |
hekeus@6 | 31 float counter; |
hekeus@6 | 32 bool bSmooth; |
hekeus@6 | 33 //Voice *voices[NUMVOICES]; |
hekeus@6 | 34 Voice *voices[10]; |
hekeus@6 | 35 |
hekeus@6 | 36 int x1,y1,x2,y2,x3,y3;//Triangle Coords |
hekeus@6 | 37 int triangleHeight; |
hekeus@6 | 38 int voiceGrabbed; |
hekeus@6 | 39 void sendStatus(Voice v); |
hekeus@6 | 40 bool isInTriangle(int x, int y); |
hekeus@6 | 41 |
hekeus@6 | 42 |
hekeus@6 | 43 private: |
hekeus@6 | 44 ofxOscSender sender; |
hekeus@8 | 45 ofxOscReceiver receiver; |
hekeus@6 | 46 }; |