Old 31st May 2003, 06:31   #1
[Ishan]
Major Dude
 
[Ishan]'s Avatar
 
Join Date: Mar 2003
Location: India
Posts: 1,156
Send a message via Yahoo to [Ishan]
Multi_DM

Just this new multi functional DM i created, was the easiest i ever did.
Would like to have your sugggestions to make it better.
Requires colormap.
Attached Files
File Type: zip random intelligent visualizer ii.zip (1.4 KB, 129 views)


Amateur AVS'er. All over again.

Last AVS Pack :
Resurgence

[Ishan] is offline   Reply With Quote
Old 31st May 2003, 14:30   #2
shreyas_potnis
Major Dude
 
shreyas_potnis's Avatar
 
Join Date: Jan 2003
Location: Mumbai, India
Posts: 787
Well, yeah, the dm can be optimized to a great extent, especially the pixel part. What have you done here is:
x1=...
y1=...
x2=...
y2=...
...
and then
x=if(..,x1,x);
y=if(..,y1,y);

now suppose x1=sin(t)*x, suppose...
so directly you can write:
x=if(..,sin(t)*x,x); instead of calculating this and storing it in one variable. In this way only one out of 7 x's and y's are calculated.
and then instead of calculating above(bt,change)... per pixel, you can calculate it per-frame and then save it to one variable.

Here' the multi-flow dm base I created:

Init:
¤ Change this var : ;BEATSKIP=20; ¤Dont change this;NFEFFECTS=7;cb=rand(100)%NFEFFECTS;

Frame:
c0=equal(cb,0);c1=equal(cb,1);
c2=equal(cb,2);c3=equal(cb,3);
c4=equal(cb,4);c5=equal(cb,5);
c6=equal(cb,6);....go on adding this till the no. of flows you have

Beat:
cb1=(cb1+1)%BEATSKIP;
cb=if(bnot(cb1),(cb+1)%NFEFFECTS,cb);

Pixel:
¤ Flow 1;
r=if(c0,ADD STUFF HERE,r);d=if(c0,ADD STUFF HERE,d);
¤ Flow 2;
r=if(c1,ADD STUFF HERE,r);d=if(c1,ADD STUFF HERE,d);
¤ Flow 3;
r=if(c2,ADD STUFF HERE,r);d=if(c2,ADD STUFF HERE,d);
¤ Flow 4;
r=if(c3,ADD STUFF HERE,r);d=if(c3,ADD STUFF HERE,d);
¤ Flow 5;
r=if(c4,ADD STUFF HERE,r);d=if(c4,ADD STUFF HERE,d);
¤ Flow 6;
r=if(c5,ADD STUFF HERE,r);d=if(c5,ADD STUFF HERE,d);
¤ Flow 7;
r=if(c6,ADD STUFF HERE,r);d=if(c6,ADD STUFF HERE,d);

NEFFECTS stands for the number of flow patterns you are having.
Instead of r,d you can use x,y also. I know this can be reduced to just a couple of statements using nested if's, but that would be too confusing. If the no. of flow patterns are too large then you need'nt use c1,c2,c3...just use equal(cb,...) in the pixel part. Otherwise, there are changes that winamp would crash if the no. of variables is too large.

http://home.iitb.ac*****~shreyaspotnis
shreyas_potnis is offline   Reply With Quote
Old 31st May 2003, 14:38   #3
unripeLemon
Senior Member
 
unripeLemon's Avatar
 
Join Date: Mar 2003
Location: some place thats green
Posts: 134
Send a message via AIM to unripeLemon
OOOOOOOOOOOOOOOOOOOH! (mouth watering) Thats realy nice a bit on the slow side though
unripeLemon is offline   Reply With Quote
Old 31st May 2003, 14:54   #4
[Ishan]
Major Dude
 
[Ishan]'s Avatar
 
Join Date: Mar 2003
Location: India
Posts: 1,156
Send a message via Yahoo to [Ishan]
Thanks unripelemon for the comments but i get around 20-30 fps on my comp, and shreyas must say your DM base is really good! I'l try and use it next time
(but i really do find my DM very easy to use)


Amateur AVS'er. All over again.

Last AVS Pack :
Resurgence

[Ishan] is offline   Reply With Quote
Old 1st June 2003, 04:38   #5
dirkdeftly
Forum King
 
dirkdeftly's Avatar
 
Join Date: Jun 2001
Location: Cydonia, Mars
Posts: 2,651
Send a message via AIM to dirkdeftly
undefined: alledgedly the if(a,b,c) statement calculates b and c regardless of a. so in all honesty i doubt there's much optimization you can do with those psuedoif statements. however there is something to be said about saving variables, which i believe decreases ram useage and is somewhat of a speedup (but what do i know)

as for the dm, multifunctional dm's (and scopes) have been around for a while - but it's still cool to get one to work yourself

"guilt is the cause of more disauders
than history's most obscene marorders" --E. E. Cummings
dirkdeftly is offline   Reply With Quote
Old 1st June 2003, 05:46   #6
[Ishan]
Major Dude
 
[Ishan]'s Avatar
 
Join Date: Mar 2003
Location: India
Posts: 1,156
Send a message via Yahoo to [Ishan]
yeah i guess it has been done many times before but i just wanted to make one myself that's it


Amateur AVS'er. All over again.

Last AVS Pack :
Resurgence

[Ishan] is offline   Reply With Quote
Old 2nd June 2003, 03:22   #7
S-uper_T-oast
Forum King
 
S-uper_T-oast's Avatar
 
Join Date: May 2003
Location: Fnord?!
Posts: 2,657
I really like the way the dynamic move looks with those colors put over, but I like this more for the colors then the movements, some of the movements you get in this are good, but I still don't like how this worked out, I prefer fluid dynamic movements, not these "jittery" ones that change from preset movement to preset movement every N-beats, just a personal taste. Nice job with the all around coding though.
S-uper_T-oast is offline   Reply With Quote
Old 2nd June 2003, 08:02   #8
[Ishan]
Major Dude
 
[Ishan]'s Avatar
 
Join Date: Mar 2003
Location: India
Posts: 1,156
Send a message via Yahoo to [Ishan]
So you say you dont like Multi DM's that change movement every N beats ??
Perhaps you like Dm's which change movements every M beats


Amateur AVS'er. All over again.

Last AVS Pack :
Resurgence

[Ishan] is offline   Reply With Quote
Old 2nd June 2003, 12:40   #9
Tuggummi
Bin King
 
Tuggummi's Avatar
 
Join Date: Mar 2001
Location: Finland
Posts: 2,179
Pretty sweet preset, the code could be optimized a bit yes, but i doubt there is much you can do there, other than what shreyas already suggested.
btw. Using notepad to code multimovement dm's helps a lot

Besides the multimovement, i really like the color trick here, it's pretty sweet Great work

Texer Resources

Im retarded... err i mean retired!
Probably both...
Tuggummi is offline   Reply With Quote
Old 3rd June 2003, 06:28   #10
[Ishan]
Major Dude
 
[Ishan]'s Avatar
 
Join Date: Mar 2003
Location: India
Posts: 1,156
Send a message via Yahoo to [Ishan]
Thanks i'm working on it to make it more customizable and nice, i post it here when it is done.


Amateur AVS'er. All over again.

Last AVS Pack :
Resurgence

[Ishan] is offline   Reply With Quote
Old 4th June 2003, 08:53   #11
shreyas_potnis
Major Dude
 
shreyas_potnis's Avatar
 
Join Date: Jan 2003
Location: Mumbai, India
Posts: 787
Just one question - in if(a,b,c) why is b calculated if a=0?

http://home.iitb.ac*****~shreyaspotnis
shreyas_potnis is offline   Reply With Quote
Old 4th June 2003, 09:00   #12
[Ishan]
Major Dude
 
[Ishan]'s Avatar
 
Join Date: Mar 2003
Location: India
Posts: 1,156
Send a message via Yahoo to [Ishan]
I thought that if(a,b,c) c is calculated if a=0,


Amateur AVS'er. All over again.

Last AVS Pack :
Resurgence

[Ishan] is offline   Reply With Quote
Old 4th June 2003, 10:37   #13
sidd
Major Dude
 
sidd's Avatar
 
Join Date: May 2003
Location: Australia
Posts: 1,353
if(a,b,c) performs b if a<>0 and c if a==0

BUT, apparantly, (and i cant remember where this first came up) both b and c are calculated no matter what a is. This is because its not actually compiled language, its just text that is examined in and then used as instructions for the program.

Calculated does not mean performed, it just means that the code is run through even if it is not used.

Atero's comment meant that it doesnt save you any fps because avs still has to run through all of the code.

(btw, i dont actually know if this is the truth, i had heard of it vaguely before, and atero seems to have heard it aswell, but i dont know if its true.
sidd is offline   Reply With Quote
Old 4th June 2003, 15:05   #14
Zevensoft
Major Dude
 
Zevensoft's Avatar
 
Join Date: Apr 2002
Location: Ballarat, Australia
Posts: 529
You can reduce n=0 on SSC's per frame for optimizing.

1 | 2 | 3 | 4 | 3W | 4WW
Zevensoft is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > AVS > AVS Presets

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump