Mercurial > hg > screen-ui
view src/melodyTriangle.h @ 19:055d7524bae4
Adjusted colours, reduced buffer zone.
author | samer |
---|---|
date | Tue, 31 Jan 2012 23:44:01 +0000 |
parents | 9d7e139cd0a3 |
children | 4dcc4312b5fa |
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[10]; int x1,y1,x2,y2,x3,y3;//Triangle Coords int triangleHeight; int voiceGrabbed; void sendPosition(Voice v); void sendCalibrate(); void sendPeriod(int id, int num, int den); void sendShift(int id, int num, int den); void sendOctave(int id, int oct); void sendAmplitude(int id, float amp); private: ofxOscSender sender; ofxOscReceiver receiver; int DX13, DY13, SQLEN13; bool clipToTriangle(int *cx, int *cy); };