Mercurial > hg > screen-ui
view src/melodyTriangle.h @ 14:578c1acf1cc4
Octave and amplitude now initialised correctly on birth; added binary app.
author | samer |
---|---|
date | Mon, 30 Jan 2012 23:31:39 +0000 |
parents | 9e31c0507e65 |
children | 9d7e139cd0a3 |
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 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); bool isInTriangle(int x, int y); private: ofxOscSender sender; ofxOscReceiver receiver; };