annotate src/Voice.h @ 38:330f2746fedd
tip
Added keys help in a smaller font; changed loadness keyboard controls.
author |
samer |
date |
Mon, 27 Feb 2012 20:09:10 +0000 |
parents |
06a2fdb333ca |
children |
|
rev |
line source |
hekeus@6
|
1 /*
|
hekeus@6
|
2 * Voice.h
|
hekeus@6
|
3 * MelodyTriangle
|
hekeus@6
|
4 *
|
hekeus@6
|
5 * Created by Henrik Ekeus on 12/01/2012.
|
hekeus@6
|
6 * Copyright 2012 Queen Mary University of London. All rights reserved.
|
hekeus@6
|
7 *
|
hekeus@6
|
8 */
|
hekeus@6
|
9 #include "ofMain.h"
|
samer@23
|
10 #define RADIUS 12
|
samer@23
|
11
|
hekeus@6
|
12 class Voice {
|
hekeus@6
|
13 public:
|
samer@22
|
14 Voice(int id);
|
hekeus@6
|
15
|
samer@18
|
16 enum status {
|
samer@18
|
17 clear,
|
samer@18
|
18 pending,
|
samer@18
|
19 waiting,
|
samer@18
|
20 moved
|
samer@18
|
21 };
|
samer@23
|
22
|
samer@23
|
23 bool isInVoice(int x, int y) { return (ofDist(x, y, posx, posy)<=RADIUS); };
|
samer@23
|
24 //void setPos(int x, int y) { posx=x; posy=y; status=pending; }
|
samer@13
|
25 double louder();
|
samer@13
|
26 double quieter();
|
samer@23
|
27 void draw(bool highlight);
|
samer@25
|
28 void draw_alt(bool highlight);
|
hekeus@6
|
29
|
samer@25
|
30 int id;
|
samer@25
|
31 int posx,posy;
|
samer@32
|
32 bool isVisible;
|
samer@25
|
33 bool isActive;
|
samer@25
|
34 bool inTriangle;
|
samer@25
|
35 int octave;
|
samer@13
|
36 double amplitude;
|
samer@25
|
37 enum status status;
|
samer@25
|
38 float truex, truey;
|
hekeus@6
|
39 };
|