annotate 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
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;
samer@14 39 void sendPosition(Voice v);
samer@12 40 void sendCalibrate();
samer@12 41 void sendPeriod(int id, int num, int den);
samer@12 42 void sendShift(int id, int num, int den);
samer@12 43 void sendOctave(int id, int oct);
samer@13 44 void sendAmplitude(int id, float amp);
hekeus@6 45 bool isInTriangle(int x, int y);
hekeus@6 46
hekeus@6 47
hekeus@6 48 private:
hekeus@6 49 ofxOscSender sender;
hekeus@8 50 ofxOscReceiver receiver;
hekeus@6 51 };