 	return rad/180.0*3.1415926;
 }
 
-vec4 bgbox(vec2 p, float deg, float length)
+vec4 bgbox(vec2 p, float deg, float length) // return black color if p is inside box in background
 {
 	return box((translate(rotate(p, degtorad(deg)), vec2(10.5, 0.0))), length, 0.5, grey(0.0, 1.0));
 }
 
-float inside(float r, float range)
+float inside(float r, float max)
 {
-	if (r<=range)
+	if (r<=max)
 		return 1.0;
 
 	return 0.0;
 }
 
-float inrange(float r, float low, float high)
+float inrange(float r, float min, float max)
 {
-	if (low <= r && r <= high)
+	if (min <= r && r <= max)
 		return 1.0;
 
 	return 0.0;
 }
 
-vec4 bgshade(vec2 p)
+vec4 bgshade(vec2 p) // darkens bottom quarter of bg
 {
 	vec2 rp = rotate(p, degtorad(-135.0));
 

// generate : knobster -g -k generators/fm8_knob.frag -w 29 -h 29 -o 15 -n 128 -f knob.png
// display  : knobster -d -k generators/fm8_knob.frag -w 29 -h 29 -o 15

float saturate(float v)
{
	return clamp(v,0.0,1.0);
}

float dist(vec2 p)
{
	return sqrt(p.x*p.x + p.y*p.y);
}

vec4 grey(float v, float a)
{
	return vec4(v*0.97, v, v*1.03, a); // slightly blue teint
//	return vec4(v, v, v, a);
}

vec4 overlay(vec4 under, vec4 over)
{
	vec4 c;


	return c;
}

float insideblurcircle(vec2 p, float r, float b)
{
	float r_ = length(p);
	return mix(1.0, 0.0, saturate((r_ - r + b)/(b*2)));
}

float outsideblurcircle(vec2 p, float r, float b)
{
	return 1.0 - insideblurcircle(p, r, b);
}

vec4 box(vec2 p, float width, float height, vec4 col) // return color if point p is inside origo-centered box with width and height
{
	if (p.x<width && p.x>-width && p.y<height && p.y>-height)
		return col;
