No announcement yet.

BeatDrop2077 : my small attempt to make BeatDrop a little better :)

  • Filter
  • Time
  • Show
Clear All
new posts

  • BeatDrop2077 : my small attempt to make BeatDrop a little better :)

    Hey lovely people,

    I managed to recompile BeatDrop Music Visualizer with Microsoft Visual Studio 2019.
    It took me a week just for that as I don't code in c++

    To recompile the exe without any fatal error, you'll need to install too the DirectX SDK (DXSDK_Jun10.exe)
    from here:
    (Windows Update needs to be enabled for installing the DirectX SDK)

    Here is what I had to change to be able to recompile BeatDrop:
    [replaced, line:10] #include "afxres.h" >>> #include "WinResrc.h"

    [added,line:41] #include <string>
    [replaced,line:431] std::wstring >>> std::string

    [replaced, line:17] <WindowsTargetPlatformVersion>10.0.14393.0 >>> <WindowsTargetPlatformVersion>10.0
    [replaced, line:22] <PlatformToolset>v141 >>> <PlatformToolset>v142
    [replaced, line:28] <PlatformToolset>v141 >>> <PlatformToolset>v142
    [replaced, line:132] <AdditionalIncludeDirectories>..\..\musikcube\src;C:\Program Files >>> <AdditionalIncludeDirectories>C:\Program Files
    [added,line:146] <DisableSpecificWarnings>4996</DisableSpecificWarnings>

    [removed,line:1065] m_presetHistory[i] = L"";
    [removed,line:6298] m_presetHistory[0] = m_szCurrentPresetFile;
    [removed,line:6873] LoadPreset( m_presetHistory[m_presetHistoryPos].c_str(), fBlendTime);
    [removed,line:6915] LoadPreset( m_presetHistory[m_presetHistoryPos].c_str(), fBlendTime);
    [removed,line:7185] m_presetHistory[m_presetHistoryPos] = szPresetFilename;
    As you can see I had to remove a few lines in the plugin.cpp file for the m_presetHistory,
    I had this error example for the line 1065 : C2679 binary '=': no operator found which takes a right-hand operand of type 'const wchar_t [1]' (or there is no acceptable conversion)
    Any idea how to fix that?

    Here is the list of tweaks I added:
    m_max_fps_fs = 0; (0 for 'unlimited')
    m_max_fps_w = 0; (0 for 'unlimited')
    m_show_press_f1_msg = 0;
    m_save_cpu = 0;
    m_nCanvasStretch = 100; (100=None, much better quality)
    m_nTexSizeX = -1; (-1 = exact match to screen, much better quality)
    m_nTexSizeY = -1; (-1 = exact match to screen, much better quality)
    m_nGridX = 64; (nMeshSize)
    m_nMaxImages = 64;
    m_nMaxBytes = 2000000000;
    So technically, BeatDrop2077 should run better than the normal version!

    Download :
    it comes with 10 epic presets

    Please if you code in c++ and see something wrong let me know!
    I would like to add the latest small update from wacup to BeatDrop (like see more lines of text),
    shouldn't be too hard comparing the code from with right?

  • #2
    Hey guys I did a big upgrade on BeatDrop2077:

    first I managed to compile the original files changing less code :
    [added,line:41] #include <string>

    [replaced, line:10] #include "afxres.h" >>> #include<windows.h>
    OR thick the box when installing visual studio 2019: "C++ MFC for v142 build tools (x86 & x64)" and you don't need to change anything in plugin.rc!
    That's it!

    then I managed to update the font size, and be able to see more lines when loading a preset, in defines.h:
    #define SIMPLE_FONT_DEFAULT_SIZE 12 >>> 24
    #define DECORATIVE_FONT_DEFAULT_SIZE 22 >>> 24
    #define HELPSCREEN_FONT_DEFAULT_SIZE 12 >>> 24
    #define PLAYLIST_FONT_DEFAULT_SIZE 16 >>> 24

    #define MAX_PRESETS_PER_PAGE 32 >>> 128
    I've changed a few keys too:
    F4 Show preset name
    F5 Show FPS
    F6 Show preset rating

    Now BeatDrop2077 looks way better than the original version of BeatDrop.
    Unlimited FPS, no more CanvasStretch or messy nTexSize, everything looks sharper!!!
    Download v2.0 here:
    it come with an epic collection of 300+ presets!!!


    • #3
      I have a bug that I can't fix myself, I need help for that:

      when loading the menu with 'm' and choosing 'do a preset mash-up',
      the names of the presets chosen are not displaying, instead I can see some Chinese character:

      Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	224.8 KB
ID:	4466634

      I believe it may have something to do with the #include <string> that I added in plugin.h messing with the std::wstring, but as I don't code in C++ it's hard for me.
      Any ideas why? thanks


      • #4
        I made a version 2.2 that support Always On Top window and multiple monitor stretching
        new key mapping :

        ALT+SHIFT toggle multiple monitor stretching
        F1 help
        F4 Show preset name
        F5 Show FPS
        F6 Show preset rating
        F7 Always on top
        F10 Pause


        • #5
          Greetings and thanks for all your hardwork. Is it possible to include a compiled .exe in your github?



          • #6
            by the way I've just noticed I've uploaded an exe with debug infos that didn't run without Visual Studio installed

            here is the new link that work on every computer (you just need the directx files installed from the folder Redist\DirectX\DXSETUP.exe included in the zip file:

            edit : this fixed the bug I had displaying the Chinese character !!!


            • #7
              Great! Works as intended! Thanks!


              • #8

                I released a version 2.9 with many fixes.
                So many keys were not working in BeatDrop,
                the mashup key 'A' (never mashed something, just loaded a random preset), 'D', '@' (randomize comp shader), '!' (randomize warp shader) ect... never worked.
                it's all working now!

                Now you can double click to enter or exit full-screen mode.

                F1 help
                F2 change max FPS
                F3 change time between preset
                F4 show preset name
                F5 show FPS
                F6 show preset rating
                F7 always on top
                F10 pause

                For the first time, MilkDrop can run alone (not launched as a plugin) at full speed with all the options/button working, and I think this good news.

                it's super easy to re-compile (the MilkDrop dll was always a nightmare to compile), and with ChatGPT available, I believe anyone could add something.

                I will add new functionality in the next version that I thought it would have been impossible just few months ago. ChatGPT is a game changer

                Click image for larger version

Name:	ChatGPT.jpg
Views:	1
Size:	108.1 KB
ID:	4466695
                Last edited by serge000; 4 January 2023, 03:15.


                • #9
                  Huh, this is pretty cool. Works fine in Windows 11. Would it be possible to have a desktop mode? That's one of the things that makes Milkdrop through Winamp amazing imho.

                  Desktop mode or not, I'm definitely using this. Thanks for your work and sharing with us.


                  • #10
                    somebody still using the desktop mode??
                    I'll look into that, I think this was completely skipped for BeatDrop.

                    I would like to encourage people adding or optimizing stuff for MilkDrop with chatGPT.
                    it's insane what you can do.

                    for example I've modified the basic search function (when you are in the loading presets menu by pressing 'L').
                    original code:
                    HTML Code:
                    void CPlugin::SeekToPreset(wchar_t cStartChar)
                    	if (cStartChar >= L'a' && cStartChar <= L'z')
                    		cStartChar -= L'a' - L'A';
                    	for (int i = m_nDirs; i < m_nPresets; i++)
                    		wchar_t ch = m_presets[i].szFilename.c_str()[0];
                    		if (ch >= L'a' && ch <= L'z')
                    			ch -= L'a' - L'A';
                    		if (ch == cStartChar)
                    			m_nPresetListCurPos = i;
                    I've asked chatGPT to change this function to search for multiple letter instead of one if a few letters were typed fast,
                    and also to search the whole line not just the first letter if not found.

                    this is what chatGPT made:
                    HTML Code:
                    void CPlugin::SeekToPreset(wchar_t c) 
                    	using namespace std::chrono_literals;
                    	static std::wstring searchString;
                    	static std::chrono::steady_clock::time_point lastInputTime = std::chrono::steady_clock::now();
                    	std::chrono::steady_clock::time_point currentTime = std::chrono::steady_clock::now();
                    	if (currentTime - lastInputTime > 1000ms)
                    	lastInputTime = currentTime;
                    	searchString += c;
                    	bool found = false;
                    	for (int i = m_nDirs; i < m_nPresets; i++)
                    		std::wstring ch = m_presets[i].szFilename.substr(0, searchString.length());
                    		if (ch.length() == searchString.length())
                    			std::transform(ch.begin(), ch.end(), ch.begin(), ::toupper);
                    			std::transform(searchString.begin(), searchString.end(), searchString.begin(), ::toupper);
                    			if (ch == searchString)
                    				m_nPresetListCurPos = i;
                    				found = true;
                    	if (!found)
                    		for (int i = m_nDirs; i < m_nPresets; i++)
                    			std::wstring ch = m_presets[i].szFilename;
                    			std::transform(ch.begin(), ch.end(), ch.begin(), ::toupper);
                    			std::transform(searchString.begin(), searchString.end(), searchString.begin(), ::toupper);
                    			if (ch.find(searchString) != std::string::npos)
                    				m_nPresetListCurPos = i;
                    now we can search for anything in the presets list.
                    you can type 'mar' for martin's presets.
                    you can even type 'kings' if you search for 'martin - kings cross' for example.
                    It would have take me hours to this on my own. And it took 2 mintues with chatGTP.

                    and the best part, you can just ask chatGPT to optimize some code for you.
                    and you can go crazy and ask to optimize some complex code from the ns-eel2 VM.
                    and it works! just copy/paste a whole function and ask to optimize it!


                    • #11
                      It's a crazy feeling for me to see milk milkdrop and chatGPT talked about in the same sentence - two times of my life that feel so far apart!

                      I've just followed a chain of threads from 2021 to here - I had no idea milkdrop2077 and beatdrop2077 existed until today.

                      Thanks for your work and persistence! I cant wait to try this out.
                      Telek Sterling
                      Dilettante Extraordinaire


                      • #12
                        Technically today someone could train a small AI to create new milkdrop presets
                        MilkDrop3 is a much more advanced version of Beatdrop2077 btw


                        • #13
                          After using the player recently I noticed a couple of things.

                          If a preset has a technical issue, a warning/error in red will be displayed at the top of the screen. Often these are redundant as the preset works fine in any case. For general viewing in my setup I have disabled these messages by including the following line in the 'milk2.ini' file:


                          I noticed that this line placed in 'milk3.ini' will also disable these messages in MilkDrop3. Perhaps a toggle in the F1 menu could allow user to enable/disable these messages as required.

                          Secondly, on first use, how is the user's optimum frame rate determined? Is there a way of permanently setting this up or is it detected automatically so no need to do so? In a traditional 'milk2.ini' file you would add the following to ensure a consistent setting.


                          Otherwise, all looks good.


                          • #14
                            Hey NeonAngel I'm working on MilkDrop 3.21 and it will fix all these issues, it's almost ready!
                            I completely rewrite how the 'milk2.ini' file is working. Now you can save the window position too and every single option you can toggle.