OfficialIncubo/BeatDrop-Music-Visualizer

Hardcut Modes!

Closed this issue · 1 comments

I tried to recreate the hardcut modes based on the beat detection, like Milkdrop 3!
My implementation gone sucky and unstable.

My code is:

        case VK_F11:   //NOT FUNCTIONAL BECAUSE EXECUTED ONE TIME
        {
            HardcutMode++;
            if (HardcutMode == 1)
                {
                    m_bHardCutsDisabled = false;
                    wsprintfW(m_szSongTitle, L"Hardcut Mode: Normal"); LaunchSongTitleAnim();
                }
            if (HardcutMode == 2) //WIP: Bass Blend
            {
                m_bHardCutsDisabled = true;
                int upd = GetTime();
                if (upd % 1 == 0) timetick += 0.1;
                if ((double)mysound.imm_rel[0] > 1.8 && timetick >= 1 && !m_bPresetLockedByCode)
                {
                    if (m_nLoadingPreset == 0)
                    LoadRandomPreset(m_fBlendTimeAuto);
                    timetick = 0;
                }
                wsprintfW(m_szSongTitle, L"Hardcut Mode: Bass Blend"); LaunchSongTitleAnim();
            }

            if (HardcutMode == 3)
            {
                m_bHardCutsDisabled = true;
                wsprintfW(m_szSongTitle, L"Hardcut Mode: Bass"); LaunchSongTitleAnim();
            }
            if (HardcutMode == 3)
            {
                if ((double)mysound.imm_rel[0] > 2 && !m_bPresetLockedByCode)
                {
                    if (m_nLoadingPreset == 0)
                        LoadRandomPreset(0.0f);
                }
            }

            if (HardcutMode == 4)
            {
                HardcutMode = 0;
                m_bHardCutsDisabled = true;
                wsprintfW(m_szSongTitle, L"Hardcut Mode: OFF"); LaunchSongTitleAnim();
            }
        }   //WORK IN PROGRESS

I initialized HardcutMode, timetick as int. I need to press F11 to change hardcut modes without freezing BeatDrop! That was a very hard challenge for me to implement it. I want every hardcut mode to be worked on every frame.

Milkdrop2077 (serge000) told me on Twitter DM:
image

Very hard to do :(

Okay, I retried today to implement this feature and that worked.
Now the hardcut modes feature are now ready to use!

BeatDropPresetStartup.HardcutModesDemo.mp4

GitHub only supports 10MB video file. If you hate the video compression, please try this demo on Twitter.