annotate src/Voice.h @ 22:4dcc4312b5fa

Bit of a tidy up, adding text display, added full screen toggle and window resize handler.
author samer
date Thu, 02 Feb 2012 18:17:24 +0000
parents 9a414ea6880d
children 460c05dd74d0
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"
hekeus@6 10 class Voice {
hekeus@6 11 public:
samer@22 12 Voice(int id);
hekeus@6 13
samer@18 14 enum status {
samer@18 15 clear,
samer@18 16 pending,
samer@18 17 waiting,
samer@18 18 moved
samer@18 19 };
samer@18 20
samer@13 21 bool isInVoice(int x, int y) { return (ofDist(x, y, posx, posy)<=radius); };
samer@22 22 void setPos(int x, int y) { posx=x; posy=y; }
samer@13 23 double louder();
samer@13 24 double quieter();
samer@13 25 void draw();
hekeus@6 26
hekeus@6 27 int id;
hekeus@6 28 int posx,posy;
hekeus@6 29 bool isActive;
hekeus@6 30 bool inTriangle;
hekeus@6 31 int radius;
hekeus@6 32 int octave;
hekeus@6 33 bool highlight;
samer@13 34 double amplitude;
samer@18 35 enum status status;
hekeus@6 36 };