annotate melodyTriangle.h @ 1:3b6ab3b28808
Add command line params for disabling keys
author |
Henrik Ekeus <hekeus@eecs.qmul.ac.uk> |
date |
Tue, 24 Jan 2012 13:48:54 +0000 |
parents |
2db9be889344 |
children |
8c4903923021 |
rev |
line source |
hekeus@0
|
1
|
hekeus@0
|
2
|
hekeus@0
|
3 #include "ofMain.h"
|
hekeus@0
|
4 #include "Voice.h"
|
hekeus@0
|
5
|
hekeus@0
|
6 #include "ofxOsc.h"
|
hekeus@0
|
7
|
hekeus@0
|
8
|
hekeus@0
|
9
|
hekeus@0
|
10
|
hekeus@0
|
11
|
hekeus@0
|
12 class melodyTriangle : public ofBaseApp{
|
hekeus@0
|
13
|
hekeus@0
|
14 public:
|
hekeus@1
|
15 melodyTriangle(const char *host, int port, int numVoices, bool enableKeys);
|
hekeus@0
|
16
|
hekeus@0
|
17 void setup();
|
hekeus@0
|
18 void update();
|
hekeus@0
|
19 void draw();
|
hekeus@0
|
20
|
hekeus@0
|
21 void keyPressed(int key);
|
hekeus@0
|
22 void keyReleased(int key);
|
hekeus@0
|
23 void mouseMoved(int x, int y );
|
hekeus@0
|
24 void mouseDragged(int x, int y, int button);
|
hekeus@0
|
25 void mousePressed(int x, int y, int button);
|
hekeus@0
|
26 void mouseReleased(int x, int y, int button);
|
hekeus@0
|
27 void windowResized(int w, int h);
|
hekeus@0
|
28 int numVoices;
|
hekeus@1
|
29 bool enableKeys;
|
hekeus@0
|
30 float counter;
|
hekeus@0
|
31 bool bSmooth;
|
hekeus@0
|
32 //Voice *voices[NUMVOICES];
|
hekeus@0
|
33 Voice *voices[10];
|
hekeus@0
|
34
|
hekeus@0
|
35 int x1,y1,x2,y2,x3,y3;//Triangle Coords
|
hekeus@0
|
36 int triangleHeight;
|
hekeus@0
|
37 int voiceGrabbed;
|
hekeus@0
|
38 void sendStatus(Voice v);
|
hekeus@0
|
39 bool isInTriangle(int x, int y);
|
hekeus@0
|
40
|
hekeus@0
|
41
|
hekeus@0
|
42 private:
|
hekeus@0
|
43 ofxOscSender sender;
|
hekeus@0
|
44 };
|