------------------------------------------------------------------------------------
This is a set of GUI objects built with processing.js, designed for use with WebPd.
They should work fine in both Loop() and noLoop() modes. Unless for some reason you
need constant updating of the screen, stick to noLoop(); it saves drastic amounts of
cpu power.
Use them as you like, except to make a profit.

Copyright 10-28-2010 - Brandon James -- xBrandonJamesx@gmail.com
-----------------------------------------------------------------------------------

All objects work the same way:
 -Right click drag relocates the object.
 -Middle click drag resizes the object.
 -Left click activates the control.
 -You can get the value of the control in js with "obj.output" (except ADSR)
 -Every control has at least these methods(functions), called as follows with no args:
  ---These MUST be called for every object---
	-obj.display(); --goes in void draw()
	-obj.click();   --goes in void mousePressed()
	-obj.unclick(); --goes in void mouseReleased()
	-obj.drag();    --goes in void mouseDragged()

These are the current objects included, their parameters etc. are listed below.
 -Slider
 -Button
 -HRadio
 -VRadio
 -Knob
 -ADSR

---Slider---
This is a "smart' slider. It automatically switches between vertical and 
horizontal modes based on the ratio of width to height.

Parameters(in order):
	01)X Position (pixels);
	02)Y Position (pixels);
	03)Width (pixels);
	04)Height (pixels);
	
	05)Background Color;
	06)Foreground Color;
	
	07)Low Value;
	08)High Value;
	09)Default Value;
	
	10)Name of PureData receive object to send to.
	
	
---Button---
Button works like both a toggle and a bang, depending on it's "mode" property.
In bang mode it still sends the hi and lo values, not "bang". The blink time can be 
changed with "obj.blink" and is set in milliseconds.

Parameters(in order):
	01)X Position (pixels);
	02)Y Position (pixels);
	03)Width (pixels);
	04)Height (pixels);
	
	05)Background Color;
	06)Foreground Color;
	
	07)Low Value;
	08)High Value;
	09)Default Value;
	
	10)Name of PureData receive object to send to;
	
	11)Mode -- 0=Toggle 1=Bang;
	
---HRadio---
Like the Pd version, but doesn't have to be square. Output is 0 to n-1.

Parameters(in order):
	01)X Position (pixels);
	02)Y Position (pixels);
	03)Width of each cell (pixels);
	04)Height of each cell (pixels);
	05)Space between cells (pixels);
	06)Number of cells.
	
	07)Background Color;
	08)Foreground Color;
	
	09)Default Value;
	
	10)Name of PureData receive object to send to;
	
---VRadio---
Same as HRadio, but vertical.

---Knob---
A circular slider.

Parameters(in order):
	01)X Position (pixels);
	02)Y Position (pixels);
	03)Size (pixels);
	
	04)Angle offset (degrees). This sets the useful display range of the knob,
	   as an offset from straight down(180deg).
	   ie. "45" will set the range from 225deg to 135deg
		   "90" sets the range from 270deg to 90deg etc.	
	05)Sensitivity . This number controls how quickly the knob turns.
	   Smaller numbers make it MORE sensitive. A good value here is 100.
	   
	06)Line Thickness (pixels);
	07)Line Length (ratio of radius)0 to 1;
	
	08)Background Color;
	09)Foreground Color;

	07)Low Value;
	08)High Value;
	09)Default Value;
	
	10)Name of PureData receive object to send to;
	
---ADSR---
This control is designed to control a [line~] object. Check the example patch to see how to
set it up. It can be triggered with its "obj.on()" and "obj.off()" functions.

Parameters(in order):
	01)X Position (pixels);
	02)Y Position (pixels);
	03)Width (pixels);
	04)Height (pixels);
	
	05)Background Color;
	06)Active Color;
	07)Foreground Color;
	
	08)Retrigger -- true or false;
	
	09)Attack (ms);
	10)Decay (ms);
	11)Sustain (0 to 1);
	12)Release (ms);
	
	13)Low limit for time values(ms). 
	14)High limit for time values(ms). 
	Note:  These limits affects mouse input only. 
		   The low and high values can be exceeded with an external control.
		   ie. "eg1.att=knob1.output" 
		   In the example, the blue knob is linked to the attack in this way.
		   
	15)Name of PureData receive object to send the time to;
	16)Name of PureData receive object to send the destination value to;
	
