PDA

View Full Version : Saving blend state


unchained
18th August 2001, 15:53
I usually run winamp with constant transitions and a long (10+ seconds) blend time. Having a hotkey to save the current blend as a preset, or at least to somehow dump the variables would be spiffy.

ryan
9th June 2002, 07:10
Not to bring up old threads or anything... But I also was wanting a feature like this.

geiss
20th June 2002, 01:04
I've thought about this before... it would be cool. The only problem is, you'd have to save the two (separate) sets of per-frame, per-pixel, and init code, and then blend between them in the new preset. But then, what happens if you blend one of THOSE with another one like it? You now have 4 sets of code running, all being blended together, and so on. Doesn't seem very feasible...

Of course, you could just pick the code for the preset that is more preset (>50%) at the time, but that defeats some of the purpose; the preset won't look the same.

Any other ideas?
-Ryan

unchained
20th June 2002, 02:03
Hooks/triggers relating to the blend state inside of preset codes.

Putting more meta-language in general into the preset scripts, so that you could (for example) load sub-presets, or put entire blocks inside of an if to optimize.

Suppose for example that I had two completely independant color-cycling schemes that I wanted to flip/flop between without having to compute the one I'm using...I need at least 2 extra ifs as it stands, more if I'm like most coders and use variables like they were candy.

Krash
21st June 2002, 14:31
As far as I know, the blends are simply calculated by running the two presets simulatneously. All the effects from preset 1 are multipled by x percent, and all the effects of preset 2 are multiplied by (100-x) percent, and the effects are added together.
Assuming this is correct, what Ryan said will hold true.

for example, if you had this line in preset 1:
zoom = 1 + 0.1*sin(time);

and in preset 2:
zoom = 1 + 0.1*sin(bass);

if you dumped the variables exactly halfway through the blend, the resulting preset would have to have the line:

zoom = 0.5*(1 + 0.1*sin(time)) + 0.5*(1 + 0.1*sin(bass));

now, a human mathematician can simplify this equation with relative ease, but getting a computer to do it is extremely difficult, if not impossible. If you then blended the blended preset to another preset, the code become more and more complicated, and gets ridiculous.

As good an idea as dumping a blend is, I can't think of any way to make it really work. The best you could really do is dump out all the equations as above, and trust the users to go through the blended preset and optimise it. Not really feasible though. =\

- Krash

Rovastar
21st June 2002, 15:25
Actually Krash as an author I actually want this.

Press a keyand MD dumps the current state of all the variables to a file and I can myself go through it all. Or if I wanted to use that preset dump (blend of the 2 presets) obviously the unedited version will be inefficent and really slow but sometimes getting that random effect will be useful. If only as a starting point.

It should be easy to have a dump of the states of all the variables at a given time.

Krash
22nd June 2002, 10:35
it's more than just the variable though - it has to save all the equations as well, and that's where the problems come up.

it would be nice, but I can see n00bs abusing it

- Krash