Archive: SS for those VJ's out there.


22nd April 2002 08:53 UTC

SS for those VJ's out there.
This will enable you to mix 4 waveforms into one SS, with interpolation between presets, added Hue Saturation Brightness colour option, and onBeat Rotation/Scaling offsets.

Init: cb=1;cb2=1;bb=1;bb2=1;ti=20;ts=50;pi=acos(-1);rs=.01;zt=.01;zs=.5

Beat: bt=bt+1;bb=if(above(bt,ti-1),1-bb,bb);bt=if(above(bt,ti-1),0,bt);bt2=bt2+1;bb2=if(above(bt2,ti*2-1),1-bb2,bb2);bt2=if(above(bt2,ti*2-1),0,bt2);rs=rand(100)/500-.1;zt=rand(100)/100+.5

Frame: cb=(cb*(ts-1)+bb)/ts;cb2=(cb2*(ts-1)+bb2)/ts;cf=if(above(cf,1),0,cf+.01);ra=if(above(ra,1),-1,ra+rs);za=(za+zt*zs)/(zs+1)

Point: x1=(cos(i*pi*2)/(v*2+2));y1=(sin(i*pi*6)/(v*2+2));
x2=i*2-1;y2=v/2;
x3=v*cos(i*pi*2);y3=v*sin(i*pi*2);
x4=v/2;y4=i*2-1;
x5=x1*cb2+x2*(1-cb2);y5=y1*cb2+y2*(1-cb2);
x6=x3*cb2+x4*(1-cb2);y6=y3*cb2+y4*(1-cb2);
xx=x5*cb+x6*(1-cb);yy=y5*cb+y6*(1-cb);
x=xx*cos(ra*pi)*za-yy*sin(ra*pi)*za;y=xx*sin(ra*pi)*za+yy*cos(ra*pi)*za;
h=((i+cf)*4);s=(v/4+.75);b=abs(cf-.5)+.5;
red=((.5+sin((h+(2/3))*pi)/2)*s+(.5+sin((h)*pi)/2)*(1-s)+(.5+sin((h-(2/3))*pi)/2)*(1-s))*b;
green=((.5+sin((h)*pi)/2)*s+(.5+sin((h+(2/3))*pi)/2)*(1-s)+(.5+sin((h-(2/3))*pi)/2)*(1-s))*b;
blue=((.5+sin((h-(2/3))*pi)/2)*s+(.5+sin((h)*pi)/2)*(1-s)+(.5+sin((h+(2/3))*pi)/2)*(1-s))*b;

Explanations of variables:
cb,cb2,bb,bb2,bt,bt2,za,ra - Do not touch these.
ti - Amount of beats per preset (includes time taken for interpolation).
ts - Amount of frames it takes per interpolation.
rs - Current rotation speed.
zt - Next zoom level 'target'
zs - Amount of frames required to reach zoom 'target'
h - Hue of current point ([R,G,B] = [0,0.33,0.66])
s - Saturation of current point (-1..1)
b - Brightness of current point (0..1)
cf - Reciprocal of current frame out of 100 (0..1)

x1,y1,x2,y2,x3,y3,x4,y4 - Set these in pairs per waveform.

Hope this makes some things easier for a few of you :D

Newbie Tip. Using clear every frame on the main option, and an effect list with an adjustable blend input(Set nearly all to the right), and clear every frame enabled on the EL, will work as a fadeout.


22nd April 2002 10:22 UTC

I didn't quite get your newbie tip... if both main and the effect list have 'clear every frame' checked, then the result of the blend will of course always be black, right?

In any case, an adjustable blend combined with 'clear every frame' should definately be slower than a regular trans / fadeout... T/F blends to a constant colour for each pixel, while adjustable blend has totally different inputs for each pixel. Not to mention the minor overhead you'd get from setting the buffer to zero ('clear every frame').


26th April 2002 09:11 UTC

Oops, I meant that the preset was NOT being cleared every frame, and BTW it's a divisional fade to black, rather than the normal fadeout.


26th April 2002 10:37 UTC

Ah ok... actually I didn't think the difference between linear fadeout and a decaying fadeout would be noticable. Is it? And I wonder if it justifies the extra slowdown :).

By the way, you seem to know your way around AVS's code... have you been AVSing for a long time and/or have you released presets?


26th April 2002 11:34 UTC

I haven't 'released' any presets, but I do muck around a fair bit experimenting with this and that.