"How to do a solid Superscope (with color gradients)?"
Since I received this question via e-mail three or four times during the last weeks I decided to post this one here:
---------------------
Whats helpfull with tries to fill larger areas of the screen is the length of one pixel in screen-coordinates. This is for width wpix = 2 / w and for height hpix = 2 / h
To fill an horizontal SSC all you need is to draw a line to a music value in y then make the next point go one pix right on x and back down to zero on y and then go for the next music value and so on.
So every music value needs two points to be completed which leads to n = w * 2
All values need to be set in FRAME since they are affected by changes in screen-resolution i.e. by switching from windowed to fullscreen mode.
All we need now is a switch which makes the two steps ( music value and then back to zero ) happen ( ct in the following example ).
Gradients in a SSC simply could be achieved by using the sine of i on setting the colors.
So here's the complete basic solid-gradient-SSC setup:
FRAME:
wpix = 2 / w ;
n = w * 2;
xp = -1 ;
ct = 0 ;
fr = fr + 0.02
POINT:
ct = bnot ( ct ) ;
vv = if ( ct , getosc (i , 0.1 , 0 ) , 0 ) ;
xp = if ( bnot ( ct ) , xp + wpix , xp ) ;
x = xp ; y = vv ;
red = abs ( sin ( i * 2 + fr ) ) ;
green = abs ( sin ( i * 3 + 2 * fr ) ) ;
blue = abs ( sin ( i * 4 + 3 * fr ) )
The look of the SSC is changed by manips of the second line in point. Check out these for example:
vv = if ( ct , getosc (i , 0.1 , 0 ) , - vv ) ;
vv = if ( ct , - getspec (i , 0.1 , 0 ) , 0 ) ;
vv = if ( ct , getspec (i , 0.1 , 0 ) , - vv ) ;
The gradient here is very simple. To make it more random you may wish to setup some beat reaction like this:
BEAT:
b1 = rand ( 20 ) / 100 - 0.1 ; i1 = rand ( 6 ) ;
FRAME:
f1=f1+b1
POINT:
red = sin ( i * i1 + f1)
Have fun in experimenting with this basic setup.
Since I received this question via e-mail three or four times during the last weeks I decided to post this one here:
---------------------
Whats helpfull with tries to fill larger areas of the screen is the length of one pixel in screen-coordinates. This is for width wpix = 2 / w and for height hpix = 2 / h
To fill an horizontal SSC all you need is to draw a line to a music value in y then make the next point go one pix right on x and back down to zero on y and then go for the next music value and so on.
So every music value needs two points to be completed which leads to n = w * 2
All values need to be set in FRAME since they are affected by changes in screen-resolution i.e. by switching from windowed to fullscreen mode.
All we need now is a switch which makes the two steps ( music value and then back to zero ) happen ( ct in the following example ).
Gradients in a SSC simply could be achieved by using the sine of i on setting the colors.
So here's the complete basic solid-gradient-SSC setup:
FRAME:
wpix = 2 / w ;
n = w * 2;
xp = -1 ;
ct = 0 ;
fr = fr + 0.02
POINT:
ct = bnot ( ct ) ;
vv = if ( ct , getosc (i , 0.1 , 0 ) , 0 ) ;
xp = if ( bnot ( ct ) , xp + wpix , xp ) ;
x = xp ; y = vv ;
red = abs ( sin ( i * 2 + fr ) ) ;
green = abs ( sin ( i * 3 + 2 * fr ) ) ;
blue = abs ( sin ( i * 4 + 3 * fr ) )
The look of the SSC is changed by manips of the second line in point. Check out these for example:
vv = if ( ct , getosc (i , 0.1 , 0 ) , - vv ) ;
vv = if ( ct , - getspec (i , 0.1 , 0 ) , 0 ) ;
vv = if ( ct , getspec (i , 0.1 , 0 ) , - vv ) ;
The gradient here is very simple. To make it more random you may wish to setup some beat reaction like this:
BEAT:
b1 = rand ( 20 ) / 100 - 0.1 ; i1 = rand ( 6 ) ;
FRAME:
f1=f1+b1
POINT:
red = sin ( i * i1 + f1)
Have fun in experimenting with this basic setup.
Comment