Mercurial > hg > screen-ui
view 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 |
line wrap: on
line source
/* * Voice.h * MelodyTriangle * * Created by Henrik Ekeus on 12/01/2012. * Copyright 2012 Queen Mary University of London. All rights reserved. * */ #include "ofMain.h" #define RADIUS 12 class Voice { public: Voice(int id); enum status { clear, pending, waiting, moved }; bool isInVoice(int x, int y) { return (ofDist(x, y, posx, posy)<=RADIUS); }; //void setPos(int x, int y) { posx=x; posy=y; status=pending; } double louder(); double quieter(); void draw(bool highlight); void draw_alt(bool highlight); int id; int posx,posy; bool isActive; bool inTriangle; int octave; double amplitude; enum status status; float truex, truey; };