Old 29th January 2003, 21:01   #1
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
2 presets in one.

Trying to work on a way to have 2 presets
Im still tyring to find a way to do it alot easier (leaving aside thef act that there would be alot !MORE! of those dirty little "if" statements
But thats not coming along so great.. So I did this.
But if either presets use some kind of special code (Such as beat codes or others) the other has to also..


I also included the 2 original presets (Both unreleased).


Includes!

idiot - 2 presets in 1
idiot - merchandise
idiot - Some big word i learned
Attached Files
File Type: zip 2in1.zip (3.4 KB, 127 views)
ryan is offline   Reply With Quote
Old 29th January 2003, 21:06   #2
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
hmm... Guess it should be Two presets in one eh?
ryan is offline   Reply With Quote
Old 30th January 2003, 01:06   #3
Zylot
Major Dude
 
Zylot's Avatar
 
Join Date: Jul 2001
Location: Pa, US(of)A
Posts: 803
WTF DO YOU THINK YOU ARE SAYING HERE!!!!!!!!!!!!

If's are NOT dirty, they are lovely.

-------------
What do you wish for?
--Instrumentality
Zylot is offline   Reply With Quote
Old 30th January 2003, 15:08   #4
nil
Junior Member
 
Join Date: Dec 2002
Posts: 16
The double zoom and 2 in 1 were both cool.

Something I considered doing was to take two similar presets and use if's and "frame%2" to alternate between them in a single new preset.

Then I realized this would be nearly impossible except maybe in a few rare cases.

Probably wouldn't look great anyway. Or is it worth a try?
nil is offline   Reply With Quote
Old 30th January 2003, 20:58   #5
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
Try this
z1 = zoom line 1;
z2 = zoom line 2;
zoom=if(equal(frame%2,frame%1),z1,z2);
The %2 and %1 can be higher to make them change slower.
ryan is offline   Reply With Quote
Old 31st January 2003, 10:05   #6
Krash
Major Dude
 
Krash's Avatar
 
Join Date: Jun 2001
Location: Sydney, Australia
Posts: 977
Quote:
Originally posted by idiot24-7
Try this
z1 = zoom line 1;
z2 = zoom line 2;
zoom=if(equal(frame%2,frame%1),z1,z2);
The %2 and %1 can be higher to make them change slower.
neater code:
myvariable = frame%2
zoom = if(myvariable,z1,z2)

If you want to alternate more things, you'll need nested ifs.
Either way, the '%' function seems to take a reasonably hefty toll on the system. performing the function only once, and then accessing the variable 10 times is alot faster than doing the function 10 times. Depending on what you're doing with it, you might not notice a difference.

Anecdote:
While making duelling blossoms and octopus duel, all of a sudden my framerate dropped to about 35-40 (down from around 80). I deleted chunks of code, trying to figure out what was slowing it down, and nothing changed. I closed milkdrop and reloaded the preset - it was still slow. I started afresh with a blank preset, and recoded it *exactly the same*, and I was back to getting very high frame rates again.

Weird.

- Krash

Eighty-three percent of all statistical quotes are made up on the spot.
Krash is offline   Reply With Quote
Old 31st January 2003, 20:22   #7
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
I was trying that Krash but I kept getting code errors..
What exactly does zoom=if(myvariable,z1,z2) do?
ryan is offline   Reply With Quote
Old 31st January 2003, 22:28   #8
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
"But if either presets use some kind of special code (Such as beat codes or others) the other has to also.."

Do'h I just noticed you can treat Q's like any other vars q1=if(Above(v1,v2),code1,code2);

It would just take some editing of the codes.

[edit](The zoom rot etc code not the "special code")[/edit]
ryan is offline   Reply With Quote
Old 2nd February 2003, 01:14   #9
Krash
Major Dude
 
Krash's Avatar
 
Join Date: Jun 2001
Location: Sydney, Australia
Posts: 977
Quote:
Originally posted by idiot24-7
I was trying that Krash but I kept getting code errors..
What exactly does zoom=if(myvariable,z1,z2) do?
the if function works like this:

if(conditon,then,else);

if the condition equals zero, the 'else' code is run. If the condition is not equal to zero (1, 10, 542347, whatever), then the 'then' code is run.

In the above, 'myvariable' is equal to frame%2. Which is the number of frames, divided by 2, and take the remainder. Meaning 'myvariable' can be 0 or 1 (even or odd numbers). So it's not necessary to do a equal(myvariable,1), because my variable itself already alternates between 0 and 1, which is all we need.

- Krash

Eighty-three percent of all statistical quotes are made up on the spot.
Krash is offline   Reply With Quote
Old 2nd February 2003, 06:27   #10
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
So.. If condition is above 0 then is run and if its 0 else is run?
ryan is offline   Reply With Quote
Old 2nd February 2003, 12:51   #11
Rovastar
Moderator
 
Join Date: Jun 2001
Location: London, England
Posts: 3,632
Send a message via AIM to Rovastar
Or below 0.

"Rules are for the guidance of wisemen and the obedience of fools"

Visuals - Morphyre www.Morphyre.com
Rovastar is offline   Reply With Quote
Old 3rd February 2003, 03:17   #12
ryan
not fucked, not quite.
(Forum King)
 
ryan's Avatar
 
Join Date: Feb 2002
Location: Tn
Posts: 8,798
Send a message via AIM to ryan
agreed
ryan is offline   Reply With Quote
Old 3rd February 2003, 22:48   #13
nil
Junior Member
 
Join Date: Dec 2002
Posts: 16
Quote:
Originally posted by Krash

If you want to alternate more things, you'll need nested ifs.
Either way, the '%' function seems to take a reasonably hefty toll on the system. performing the function only once, and then accessing the variable 10 times is alot faster than doing the function 10 times.
Oh, yeah. I was planning on using the variable, and I'm sure the code will/would be spaghetti.

Your anecdote reminds me, when I change the zoom exponent on my first preset Into My Hypersphere by just .001 and back, certain areas turn solid red, and it stays that way with changing splotches of red for a while or until I reload. They're circular so "rad" prolly has something to do with it. Leaving it changed makes almost everything a solid red eventually. If I cancel (ESC), it changes right back to normal, no matter what. Weirdness.
nil is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Visualizations > MilkDrop > MilkDrop 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 On
HTML code is Off

Forum Jump