view src/Voice.h @ 36:f973f0cc743b

Merge.
author samer
date Wed, 15 Feb 2012 12:26:10 +0000
parents 06a2fdb333ca
children
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   isVisible;
	bool   isActive;
	bool   inTriangle;
	int    octave;
	double amplitude;
	enum   status status;
	float  truex, truey;
};