Archive: RGB in superscope...


29th December 2001 23:06 UTC

RGB in superscope...
i've got found a usage of Red-, Green- and Blue-Settings in a Superscope... why can't i find that in the expression Help? are there more playthings ;-)?? is there anywhere a expression Help as HTML or TXT so i could write a superScope while the help is open, what i can't do now :-(

thanx

GreatWho


30th December 2001 01:22 UTC

If you read the text in the superscope dialog (not the expression help, the stuff underneath "per point"), it mentions all the variables you can use.

As for the expression help, will this do for you?
http://www.davidmear.com/temp/sshelp.gif


30th December 2001 10:11 UTC

I think not
I think it doesnt help him at all :confused:

But i cant really answer to the question. Wait until Unconed answer to this. He will tell you. i think


30th December 2001 10:45 UTC

thanx for the copy of expression help...i havn't could copy it to a textfile...thanx for your work

i post the preset, where i found the RGB
so you can watch by yourselfe, what i mean, it's in the "perFrame" of the Superscopes....


GreatWho

ps. i thought, i already posted, but it's away :-(


30th December 2001 13:56 UTC

I know about RGB, I use it all the time. Look:
Plasma thingy.

And look. Like I said before, all the variables are mentioned if you'd just bother to read the text:

http://www.davidmear.com/temp/sshelp2.gif

It's all there.

And here, just for you, I'll type out the entire Expression Help.


Format your expressions using a semicolon (;) to delimit between statements.
Use parentheses '( and )' to denote precedence if you are unsure.

The following operators are available:
= : assign
+,-,/,* : plus, minus, divide, multiply
| : convert to integer, and do bitwise or
& : convert to integer, and do bitwise and
% : convert to integer, and get remainder

The following functions are available:
abs(var) : returns the absolute value of "var"
sin(var) : returns the sine of the angle var (expressed in radians)
cos(var) : returns the cosine of the angle var
tan(var) : returns the tangent of the angle var
asin(var) : returns the arcsine of var
acos(var) : returns the arccosine of var
atan(var) : returns the arctangent of var
sqr(var) : returns the square of var
sqrt(var) : returns the square root of var
pow(var,var2) : returns var to the power of var2
log(var) : returns the log base e of var
log10(var) : returns the log base 10 of var
sign(var) : returns the sign of var
min(var,var2) : returns the smallest value
max(var,var2) : returns the greatest value
sigmoid(var,var2) : returns the sigmoid function value of x=var (var2=constraint)
rand(var) : returns a random value between 0 and var
band(var,var2) : boolean and, returns 1 if var and var2 are !=0
bor(var) : boolean or, returns 1 if var or var2 is !=0
bnot(var) : boolean not, returns 1 if var == 0 or 0 if var != 0
if(cond,valtrue,valfalse): if condition is nonzero, returns valtrue otherwise returns valfalse
equal(var,var2) : returns 1 if var=var2, else 0
above(var,var2) : returns 1 if var>var2, else 0
below(var,var2) : returns 1 if var<var2 else 0
getosc(band,width,channel) : returns scope data centered at band, (0..1), width (0..1) wide. cannel 0=c 1=l 2=r. value is -1..1
getspec(band,width,channel) : returns spec data centered at band, (0..1), width (0..1) wide. cannel 0=c 1=l 2=r. value is -1..1


Do you want an explanation of all of that?


31st December 2001 00:38 UTC

an explanation of all would be very helpfull for all beginners, if it makes not to much work for you...but is there nowhere any tutorial about the whole AVS?

so i could maybe find more possibilities to build a preset
a part of my stand now is the attached preset and i would like to grow up ;-)

GreatWho


31st December 2001 00:50 UTC

or take this one


31st December 2001 15:26 UTC

Why tutorials?
There are no complete tutorials on the whole of AVS, but anyway I think it's way more fun to spend some time playing with AVS and figuring everything out yourself. Sure it takes longer, but it's much more fun that way.

Sorta like playing a game yourself or with a walkthrough by your side.


By the way, because the three RGB variables aren't so easy to manipulate, here's some code that provides an (incorrect) Hue/Saturation/Lightness conversion:

(use tpi=acos(-1)*2 for quick access to 2*pi)

hue <- range 0 to 2*pi
lum <- range 0 to 1
sat <- range 0 to 1

red = (sin(hue)+1)*lum*.5+sat;
green = (sin(hue+2.09)+1)*lum*.5+sat;
blue = (sin(hue+4.18)+1)*lum*.5+sat

Normally, saturation is used to define the fullness of color, so that 0 is grey and 1 is full-color. However I haven't really gotten it perfect yet, so the sat in the formulas above is just a factor that is added, which allows you to reach the full spectrum of colors as well.
If you calculate the color like this, your superscope will vary more in color and won't stick to tones of red, green and blue only. A good idea is to let hue increase slowly, and jump onbeat, so that you get color that is never static and responds to the beat.


6th January 2002 21:38 UTC

AVS Tutorials
Maybe posts like this should be bundled and put up somewhere as AVS tutorials? That would help all the people who hate figuring things out themselves. Or maybe this forum needs a topical FAQ.

A while ago I posted a SSC explanation that could be included: http://forums.winamp.com/showthread.php?threadid=61119


6th January 2002 21:50 UTC

that is great... it also shows me again a little bit of algebra... it was a long time ago, i had it in school ;-)