comparison src/Voice.h @ 25:f4ebb87adec1

Added code to keep track of true position of voices in information space; Two voice drawing methods display both true position target position while dragging; string to Voice::status code no longer required; refactored OSC message sending code; added keys to control subdivision ratio for period and shift controls.
author samer
date Sun, 05 Feb 2012 18:13:30 +0000
parents 460c05dd74d0
children 06a2fdb333ca
comparison
equal deleted inserted replaced
24:328822cd308c 25:f4ebb87adec1
18 pending, 18 pending,
19 waiting, 19 waiting,
20 moved 20 moved
21 }; 21 };
22 22
23 class bad_status : public std::exception {
24 string str;
25 public:
26 bad_status(string s): str(s) {}
27 ~bad_status() throw() {}
28 const char *what() const throw();
29 };
30
31 static status stringToStatus(string str) throw(bad_status);
32 bool isInVoice(int x, int y) { return (ofDist(x, y, posx, posy)<=RADIUS); }; 23 bool isInVoice(int x, int y) { return (ofDist(x, y, posx, posy)<=RADIUS); };
33 //void setPos(int x, int y) { posx=x; posy=y; status=pending; } 24 //void setPos(int x, int y) { posx=x; posy=y; status=pending; }
34 double louder(); 25 double louder();
35 double quieter(); 26 double quieter();
36 void draw(bool highlight); 27 void draw(bool highlight);
28 void draw_alt(bool highlight);
37 29
38 int id; 30 int id;
39 int posx,posy; 31 int posx,posy;
40 bool isActive; 32 bool isActive;
41 bool inTriangle; 33 bool inTriangle;
42 int octave; 34 int octave;
43 double amplitude; 35 double amplitude;
44 enum status status; 36 enum status status;
37 float truex, truey;
45 }; 38 };