Archive: Post the code for your favourate movement, superscope, etc.


17th May 2001 20:43 UTC

If you've made any cool stuff in the avs, like superscopes, and movements, post the code here, maybe we can start like a code library... When I learn hpe to make my own stuff, I will post...



P.S. Hey, winamp people, Make a section dedicated to the avs codes, like people can send in, and you can have your own, and a how to code section to :)


17th May 2001 21:03 UTC

I think you now have more threads than post, newbie:p


17th May 2001 21:04 UTC

hi Kloque
Well welcome to the WinAmp forums :)

you can check out my pack on my site at http://www.andysplace.fsnet.co.uk there is a wide selection of packs there so have a look

If you are gonna use some of the idea's from other peoples pack then please tell them or mention their names on the avs pack i.e. coments

BlueTape2k1


17th May 2001 21:06 UTC

There used to be an avs preset section. I think it went wrong.

Have a look at blue's site for some avs info -
http://www.andysplace.fsnet.co.uk/new_page_1.htm

You can get my presets there. A bit crappy and simple but they demonstrate some of the movement effects.

There is some more stuff in the developer section here -
http://www.winamp.com/nsdn/wvs/


I don't use AVS much or make many presets now but more help on the avs commands would be good. Why can't it have it's own forum? NSIS and Milkdrop get one. Or does no one like avs :D?

EDIT - Oh blue already linked his site. Nevermind :)


18th May 2001 03:41 UTC

Originally posted by Matt
Why can't it have it's own forum? NSIS and Milkdrop get one.
Whatcha talkin' about, Willis? Milkdrop doesn't have a forum.

18th May 2001 03:48 UTC

Whatcha talkin' about, Willis? Milkdrop doesn't have a forum.
actually, it _sorta_ does. But it's only accessible through the MilkDrop webpage (ie. it uses the winamp forums, but it doesn't have a defined section).

MilkDrop Webpage:
http://firehose.net/free/milkdrop

MilkDrop Forum:
http://forums.winamp.com/forumdisplay.php?forumid=82

:D

-- Jarsonic

[Edited by jarsonic on 05-18-2001 at 12:19 AM]

18th May 2001 03:51 UTC

Dang. Quit confusing me.


24th September 2002 21:34 UTC

I just figured out what the dang variables mean (with some help from this forum) so here goes...


This SuperScope is a simple one. Draws a circle of varying diameter, based on the 'V' input variable (music value). Changes the color on beat, as well as doubling the size of the circle on beat. This is the basis for an AVS file I posted called "Gastronomy" that is currently under review and should be available in the Visualizations section of this site. Look for a "**** AVS II" component.



Anyway, here's the code:

-----------------------------------
INIT:
n=64;rot=0;rad=0;

ON BEAT:
rad=v*2;cr=rand(100)/100;cg=rand(100)/100;cb=rand(100)/100;

PER FRAME:
rad=v/1.5;red=cr;green=cg;blue=cb;

PER POINT:
rot=i*360;
x=sin(rot)*rad;
y=cos(rot)*rad;

SETTINGS:
Source data: Waveform
Draw as: Lines

-----------------------------------


24th September 2002 22:19 UTC

I forgot where I found this movement, or if I made this one. If you recognise this as yours, please say so I can know if I made it or not.

d=.05;x=sin(d)

Looks really good, even as simple as it is.


25th September 2002 00:36 UTC

Favorite SSC: Color-changing forward (orthogonal) projection 4D rotating cube

Lines

Init
:
n=58;sqrt2=sqrt(2);pit=acos(-1)/3;iwxt=rand(100)/1000-0.05;iwyt=rand(100)/1000-0.05;iwzt=rand(100)/1000-0.05;ixyt=rand(100)/1000-0.05;ixzt=rand(100)/1000-0.05;iyzt=rand(100)/1000-0.05;hue=rand(100)/20;sr=rand(100)/100;sg=rand(100)/100;sb=rand(100)/100;s=0.01;

Beat:
iwxt=rand(100)/1000-0.05;iwyt=rand(100)/1000-0.05;iwzt=rand(100)/1000-0.05;ixyt=rand(100)/1000-0.05;ixzt=rand(100)/1000-0.05;iyzt=rand(100)/1000-0.05;hue=rand(100)/20;sr=rand(100)/100;sg=rand(100)/100;sb=rand(100)/100;s=-s;

Frame:
p=0;wxt=wxt+iwxt;wyt=wyt+iwyt;wzt=wzt+iwzt;xyt=xyt+ixyt;xzt=xzt+ixzt;yzt=yzt+iyzt;cwx=cos(wxt);swx=sin(wxt);cwy=cos(wyt);swy=sin(wyt);cwz=cos(wzt);swz=sin(wzt);cxy=cos(xyt);sxy=sin(xyt);cxz=cos(xzt);sxz=sin(xzt);cyz=cos(yzt);syz=sin(yzt);sr=sr*0.94;sg=sg*0.94;sb=sb*0.94;hue=hue+s;

Point:
p=p+1;
w1=equal(p,2)+equal(p,9)+equal(p,15)+equal(p,21)+equal(p,22)+equal(p,23)+equal(p,24)+equal(p,25)+equal(p,26)+equal(p,28)+equal(p,29)+equal(p,30)+equal(p,31)+equal(p,32)+equal(p,34)+equal(p,35)+equal(p,36)+equal(p,37)+equal(p,38)+equal(p,39)+equal(p,40)+equal(p,42)+equal(p,43)+equal(p,44)+equal(p,45)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,56)+equal(p,57)+equal(p,58)-0.5;
x1=equal(p,4)+equal(p,11)+equal(p,17)+equal(p,18)+equal(p,19)+equal(p,20)+equal(p,21)+equal(p,26)+equal(p,27)+equal(p,28)+equal(p,29)+equal(p,30)+equal(p,31)+equal(p,40)+equal(p,41)+equal(p,42)+equal(p,43)+equal(p,44)+equal(p,45)+equal(p,46)+equal(p,48)+equal(p,49)+equal(p,50)+equal(p,51)+equal(p,52)+equal(p,53)+equal(p,55)+equal(p,56)+equal(p,57)+equal(p,58)-0.5;
y1=equal(p,6)+equal(p,13)+equal(p,14)+equal(p,15)+equal(p,16)+equal(p,17)+equal(p,25)+equal(p,26)+equal(p,27)+equal(p,28)+equal(p,30)+equal(p,31)+equal(p,32)+equal(p,33)+equal(p,34)+equal(p,36)+equal(p,37)+equal(p,38)+equal(p,45)+equal(p,46)+equal(p,47)+equal(p,48)+equal(p,50)+equal(p,51)+equal(p,52)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,57)+equal(p,58)-0.5;
z1=equal(p,8)+equal(p,9)+equal(p,10)+equal(p,11)+equal(p,12)+equal(p,13)+equal(p,19)+equal(p,23)+equal(p,31)+equal(p,32)+equal(p,33)+equal(p,34)+equal(p,35)+equal(p,36)+equal(p,38)+equal(p,39)+equal(p,40)+equal(p,41)+equal(p,42)+equal(p,44)+equal(p,45)+equal(p,46)+equal(p,47)+equal(p,48)+equal(p,49)+equal(p,50)+equal(p,52)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,56)+equal(p,57)-0.5;
w2=w1*cwx+x1*swx;x2=w1*swx-x1*cwx;
w3=w2*cwy+y1*swy;y2=w2*swy-y1*cwy;
w4=w3*cwz+z1*swz+sqrt2;z2=w3*swz-z1*cwz;
x3=x2*cxy+y2*sxy;y3=x2*sxy-y2*cxy;
x4=x3*cxz+z2*sxz;z3=x3*sxz-z2*cxz;
y4=y3*cyz+z3*syz;
x=x4;y=y4;
red=abs(sin(hue+sr));
green=abs(sin(hue+sg+pit));
blue=abs(sin(hue+sb+pit*2));
Favorite DM: Somethin for a swirling pulsating mass
Rectangularcoordinates,bilinearfilteringandwrapenabled(16x12gridsize)

Frame:
xt1=xt1+ixt1;xt2=xt2+ixt2;xt3=xt3+ixt3;
yt1=yt1+iyt1;yt2=xt2+ixt2;yt3=yt3+iyt3;
bf=bf*0.9;

Beat:
xf1=rand(20)/3;xf2=rand(20)/3;xf3=rand(20)/3;
ixt1=rand(100)/500-0.1;
ixt2=rand(100)/500-0.1;
ixt3=rand(100)/500-0.1;
yf1=rand(20)/3;yf2=rand(20)/3;yf3=rand(20)/3;
iyt1=rand(100)/500-0.1;
iyt2=rand(100)/500-0.1;
iyt3=rand(100)/500-0.1;
bf=1;

Pixel:
y=y*(0.94-bf/10)+(sin(x*xf1+xt1)+sin(x*xf2+xt2)+sin(x*xf3+xt3))/20*bf;
x=x*(0.94-bf/10)+(sin(y*yf1+yt1)+sin(x*yf2+yt2)+sin(x*yf3+yt3))/20*bf;
But don't you dare use either of them in your packs without giving me full credit :hang:

25th September 2002 02:08 UTC

CHIRST ATERO, U MADE THIS WINDOW WIIIIIIIIIIIIIIIIIIDE

lol :D

my favorite is a
Trans->movement

d=d/(0.92-cos(r-1.0+3.14159)*0.1);r=r+5;


25th September 2002 04:50 UTC

Favorite SSC :



Frame : p=0

Pixel :

p=p+1;
x1=if(equal(p%18,1)+equal(p%18,2)+equal(p%18,5)+equal(p%18,6)+equal(p%18,7)+equal(p%18,10)+equal(p%18,16)+equal(p%18,17),r,-r)+p1/2+1.1-pp*2.5;
y1=if(equal(p%18,1)+equal(p%18,4)+equal(p%18,5)+equal(p%18,6)+equal(p%18,9)+equal(p%18,10)+equal(p%18,11)+equal(p%18,12),r,-r)+pp/2-1.6;
z1=if(below(p%18,6)+equal(p%18,12)+equal(p%18,13)+equal(p%18,16),r,-r)+getosc(p1/25,0,0);

c=1-(equal(p%18,16)+below(p%18,2));
red=c;
blue=c;
green=c;



The rest is the 3D SSC code. It's a wee little cube generator which I'm too lazy to optimize =P Not exactly my *favorite*... there's too many for me to choose from =D

Of course, I should have a glass-ish framed cube coming somtime later...

Of course, I could've posted the Beat Counter, but it's holyf***ing long...

Oh, what the heck!


BEAT : b1=1;

FRAME : nn=if(above(nn,9),nn-10,nn+b1);n=if(bor(bor(equal(nn,0),equal(nn,2)),bor(equal(nn,4),equal(nn,5))),7,if(equal(nn,1),2,if(equal(nn,3),10,if(bor(equal(nn,6),above(nn,7)),8,4))));b1=0;

PIXEL :
p=n*i-i;
x=if(equal(nn,9),if(bor(band(above(p,1),below(p,5)),equal(p,7)),0.25,0),if(equal(nn,8),if(bor(bor(below(p,3),equal(p,5)),equal(p,6)),0,0.25),if(equal(nn,7),if(above(p,1),0.25,0),if(equal(nn,6),if(bor(band(above(p,1),below(p,5)),equal(p,7)),0,0.25),if (equal(nn,5),if(bor(bor(equal(p,1),equal(p,4)),equal(p,5)),0.25,0),if(equal(nn,4),if(below(p,3),0,0.25),if(equal(nn,3),if(equal(p,1),0,if(equal(p,5),0,if(Equal(p,9),0,0.25))),if(equal(nn,2),if(bor(bor(equal(p,1),equal(p,4)),equal(p,5)),0,0.25),if(equ al(nn,1),if(bor(below(p,3),equal(p,5)),0,0.25),if(equal(nn,0),if(bor(below(p,3),equal(p,5)),0,0.25),0))))))))))/3+0.8;
y=if(equal(nn,9),if(below(p,3),0.25,if(bor(equal(p,6),equal(p,7)),0,-0.25)),if(equal(nn,8),if(bor(bor(equal(p,1),equal(p,4)),equal(p,5)),-0.25,if(bor(equal(p,2),equal(p,3)),0.25,0)),if(equal(nn,7),if(below(p,3),-0.25,0.25),if(equal(nn,6),if(below(p,3),-0.25,if(bor(equal(p,6),equal(p,7)),0,0.25)),if(equal(nn,5),if(below(p,3),-0.25,if(bor(equal(p,3),equal(p,4)),0,0.25)),if(equal(nn,4),if(bor(equal(p,1),equal(p,4)),-0.25,if(equal(p,5),0.25,0)),if(equal(nn,3),if(below(p,4),-0.25,if(band(above(p,3),below(p,7)),0,0.25)),if(equal(nn,2),if(below(p,3),-0.25,if(bor(equal(p,3),equal(p,4)),0,0.25)),if(equal(nn,1),if(bor(equal(p,1),above(p,3)),-0.25,0.25),if(equal(nn,0),if(bor(equal(p,1),above(p,3)),-0.25,0.25),0))))))))))/3



That was only the 1's section... I believe you change b1 into 1*(10^-n) for bigger place values (N is any number, not the number of points, of course)

Fav DM?
Sorry, can't decide :p


EDIT : Tell me if you want me to divide that big code into smaller bits...

25th September 2002 08:35 UTC

Favorite SSC:

This one draws a solid triangle with vertices (ax,ay,az), (bx,by,bz), (cx,cy,cz), with some very basic on beat response:


Init: n=21;ax=1;ay=1;az=1;bx=0;by=1;bz=0;cx=1;cy=0;cz=-1;axadd=(ax-cx)/(0.5*(n+1));ayadd=(ay-cy)/(0.5*(n+1));azadd=(az-cz)/(0.5*(n+1));bxadd=(bx-cx)/(0.5*(n+1));byadd=(by-cy)/(0.5*(n+1));bzadd=(bz-cz)/(0.5*(n+1));

On Beat: drz=if(below(drz,0.01),0.2,drz);

Per Frame: drz=drz*0.9;q=0;crz=cos(rz);srz=sin(rz);cry=cos(ry);sry=sin(ry);crx=cos(rx);srx=sin(rx);rx=rx+0.01;ry=ry-0.01;rz=rz+drz;

Per Point:

q=q+1;

x1=if(equal(q%2,0),ax-axadd*(q-2)*0.5,bx-bxadd*(q-1)*0.5);
y1=if(equal(q%2,0),ay-ayadd*(q-2)*0.5,by-byadd*(q-1)*0.5);
z1=if(equal(q%2,0),az-azadd*(q-2)*0.5,bz-bzadd*(q-1)*0.5);

x2=x1*crz-y1*srz;
y2=x1*srz+y1*crz;
z2=z1;

x3=x2*cry+z2*sry;
y3=y2;
z3=-x2*sry+z2*cry;

x1=x3;
y1=y3*crx-z3*srx;
z1=y3*srx+z3*crx;

x=x1/(3+z1);
y=y1/(3+z1);

x=x*h/w;



And my favorite DM has got to be:


Pixel:

d=d/(1+y)


Because it can be changed into so many different and complex 3d forms, with some simple changes, and because it is so much faster than the usual method of generating a plane.

(God damn this window is wide - even at 1280x1024)

2nd October 2002 00:07 UTC

Here's a neat Dynamic Movement that I used in three of my latest AVS files (still under review for publishing). Relatively simple, but kinda neat. Playing with the values yields some neat differences in effect.

------------------------------------

BEAT:

r_mod=(0.5-(rand(100)/100))/10;
d_mod=(0.5-(rand(100)/100))/10;


PIXEL:

r=r-r_mod;
d=d+d_mod;


2nd October 2002 09:43 UTC

Just a note: Damn it's hard to read this thread!

My favorite ssc.. hmm... I love to use circles! You just can do so much things with em! :D

my basic circle code would be:

INIT:
pi=acos(-1) ; n=50 ; t=0.25

ON BEAT:
t=-t ; xts=t+rand(300)/1000-0.15 ; yts=t+rand(300)/1000-0.15

PER FRAME:
xt=xt+xts ; yt=yt+yts ; sz=getosc(0,0,0)*0.2

PER POINT:
z=2-sz ;
x1=sin(i*pi*2) ;
y1=cos(i*pi*2) ;
x=x1/z+sin(xt)*0.75 ;
y=y1/z+cos(yt)*0.75



And my favorite dm... uhm well i use something like this ALOT:
va=va+sin(va2*n+t)*0.1

And here is what they stand for:
va=variable like d,r,y or x
va2=is a "counter-variable" for the first variable like d for r and x for y (and vice versa)
n=times n, depends how many times you want to multiply the va2 value, i usually use over 3 atleast.
t=well of course transition :p Which makes it move. The beat detection you can check from my superscope.

That's it. I use this stuff way too much in my opinion... but i always try to use it differently :D