View Single Post
Old 22nd November 2017, 18:44   #182
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 826
Hi Fumbling_Foo

Surprise ! Your star forge presets looks entirely different sometimes. First I thought I had confused it with a different preset, but no... then I thought it must be the music, but that would not explain such a big difference... just when I thought I must be going nuts, I found the issue. But before starting a long winded explanation, I attach a version of v3 as I get to see sometimes, so you can watch for yourself. I tweaked it deliberately to make the change permanent. It is rather flashy and maybe a bit wild - but I like it. In fact, this is the version I saw and which I commented on
Still, this is presumably different from what you had intended.

The issue is probably a bug in milkdrop. I had never noticed this before, but your preset reveals it... you should be proud of that . The problem is in the q variables: these have a a lifetime of a frame, and are normally implicitly zeroed before the code in the per frame section is executed. Therefore usually if we need values to be remembered, we use our own variables, and assign them to the q variables somewhere, preferrably at the end of the per frame section.

For some reason however, after having run a few presets and possibly done a few mashup, the automatic zeroing of the q variables goes tits up, and they are instead assigned an arbitrary value - in my case for instance, q32 is set to 32. This would not normally be a problem, as we overwrite the q variables anyway; however in your code there is a line where you rely on the previous value of q32:

code:
q32 = q32*0.9328 + 0.0666*q3*(bass_att*bass_att + treb_att*treb_att)*.5*(.001*q4);



I do not know what your intention was, but it is bad code: this is the first assignment to q32 and it uses q32, so the result entirely depends on what value milkdrop decided to assign. In case it is zero, the q32*0.9328 is also zero and superflous anyway. But it happens to be 32 on my machine sometimes, so as a result, your q32 never becomes zero but is always around 30-50. The result is attached.

Best
Martin
Nitorami is offline   Reply With Quote