Mercurial > hg > screen-ui
view src/melodyTriangle.h @ 13:9e31c0507e65
Added amplitude control (keys '*' and '/').
author | samer |
---|---|
date | Mon, 30 Jan 2012 13:29:53 +0000 |
parents | 317637282293 |
children | 578c1acf1cc4 |
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); 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; };