No announcement yet.

MilkDrop2077 : a free and open-source presets masher and randomizer for MilkDrop

  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    ok your error come from MILKFLOAT3 (the procedure to randomize colors).
    can you un-check the 1st checkbox 'randomize colors' and try again to see if it works?

    I've updated the code to v2.0.2:
    I removed s : string from public variables (to maybe avoid your error, it crashed on the string 's')
    I've put a try except end; when clicking on GO, so if one preset crash, the error will be skipped and the rest should carry on (when running the exe alone without lazarus).

    Also try my exe compiled to with lazarus 32bits to see if you still have errors!


    • #47
      Just a quick test with a fresh github download

      Your exe seems to work but I don't trust it, that may be random.

      Recompiled with Lazarus x68_64 V2.0.0
      - All checks OFF: No crash but presets generation reliably ceases after a random number of presets, in general less than 10.
      - Range checks ON: Same. At least no range check error anymore.
      - trash variables ON: Hard crash on GO. You most definitely still have uninitialised variables somewhere.
      - unticked "randomize colors": Seems to run through.


      • #48
        I messed with your code a bit more.

        The missing indentation makes it bad to read. For heaven's sake, use indentation. If you are too lazy to do it, simply run a code formatter over the source.

        Putting everything into huge try-except blocks is also a bad idea because this swallows all exceptions including those generated by FPC's range check. Always test a program thoroughly with range checks ON, before putting everything into try/except blocks. Range check is REALLY REALLY useful to detect progamming errors.

        I guess you also call Milkfloat3 from inside a try/except or try/finally block, and therefore you were never warned of the range violations within it. After having crashed my machine a few times, I found two further instances of
        for j := 0 to something do if s[j]...
        within Milkfloat3 on manual inspection. I changed these to start at 1, and now THAT crash is gone.

        But there is more... In procedure MILKDROP, line 1281, you access s[1] without knowing if s has at least length 1. To gloss over any problems, you put it all within a large try-except block. But you probably call MILKDROP from inside yet another try-except block -> Crash!

        And you are using GOTOs... these may be considered evil or not, there have been endless discussions on the subject - but GOTO together with try/except is really a very bad idea.


        • #49
          The missing indentation makes it bad to read. For heaven's sake, use indentation. If you are too lazy to do it, simply run a code formatter over the source.
          oh yea sorry my code is probably horrible to read, I'm not a professional coder at all (I cook french food for a living lol), I'm self-learning coding on the fly
          I've tried the CTRL+D to format the code but I don't like it, code looks even bigger, I prefer my big blocks of code so I've putted the string function in STRING.INC and all the interface stuff in INTERFACE.INC. Now Unit1 looks easier and a little cleaner I think.

          I've changed the for j := 0 to something do if s[j]... to 1!
          I don't think s[1] could have been empty if you look just a few lines before, but just in case I added a check,
          I also removed the try-except,
          and I removed the GOTO!

          v2.0.3 is up!


          • #50
            I think 99.5%+ of the presets generated are now bug free btw!

            I've created a zip ( with 100.000 presets mashed from CreamOfTheCrop_20200216 with the warp+comp shader from my 200 presets included with MilkDrop2077 with ~30% of values changed up to - or + 20%. I took 28 minutes to create all the presets Results are pretty fun.

            I've checked the first 500, 0 errors but 2 are making winamp crashing hard and WACUP freeze and close (#204 and #281).

            I'd like to know what makes milkdrop to crash if someone have an idea


            • #51

              I added a F10 hotkey to force closing winamp/wacup in case milkdrop crash.
              It work really well even if milkdrop is completely unresponsive and you can't call the taskmanager because you're in fullscreen mode, just press the key F10 and winamp will be closed.
              the formStyle is changed to fsNormal so you can keep MilkDrop2077 easily open when using milkdrop.


              • #52
                Hi Serge
                I don't think s[1] could have been empty if you look just a few lines before, but just in case I added a check,
                Yes it could, I added "if length(s)=0 then halt;" and the program halted.

                On the crash of #204 and #281: These contain fragments of my mandelbox code in the per frame and preset init sections. In the original code, the preset on startup first calculates a free position in the mandelbox space by try and error. If you make minor changes to it, the code may simply not find such a free position, and keep searching forever.
                The mashup option was really devised at earlier milkdrop versions, which allowed only very limited and linear programming by the user: 32 variables, hardly any dependencies, no loops, no conditional jumps. But later, a proper programming language (ns-eel) was added, which extended the coding possibilities quite dramatically by providing loops, a global memory space, conditional jumps etc. And it also introduced the possibility of endless loops, and made mashing more risky. The reason why most of your mashups are stable is that these amendmends came rather late, where milkdops had already passed its zenith, and only a few individuals still made presets and used the new features.

                The F10 option is brillant, and it really works


                • #53
                  I made a little video from randomized versions of Goody + martin - crystal palace :

                  I think this is pretty cool how MilkDrop2077 can create different variants of the same preset


                  • #54
                    Those are some interesting variants of the 'crystal palace'. Would you be willing to share the presets?


                    • #55
                      isosceles I'll do a video tutorial soon about how to make it

                      I did a big upgrade, version 3.0 is here!

                      -50% more presets included in the exe file (100 new really cool ones, I mashed most of them)
                      -fixed a tones of TStringList bugs
                      -auto-generate really works 100% now, I'm super happy with the results.
                      -much faster randomize everything code, much more stable
                      this is now my favorite option, you can get crazy results!
                      -added procedure 'Change bits of Code' : replace a 'cos' with a 'tan' ect..

                      overall the code is much more stable and faster, and better!


                      • #56
                        Cool! Very nice update.

                        Can you share some info about the MilkDrop 2077+.exe app?


                        • #57
                          I had to disable the Change bits of Code procedure btw, it's not ready yet I had a few errors.

                          MilkDrop 2077+ is this


                          • #58
                            Originally Posted by neebster View Post
                   awesome it would be if someone applies all the modern advancements in AI/ML/DNN such as generative adversarial networks to Milkdrop and create a distributed system (like electric sheep) or a cloud based engine that would take contemporary zeitgeist as input to give us unlimited visuals... intelligently blend visuals for a seamless transition.
                            So glad to discover that it is actually something people are working on (not on Milkdrop but music visualization in general)!