Old 17th November 2021, 16:32   #1
Junior Member
Join Date: Mar 2018
Posts: 6
MIDI Library that compiles w/ 2.25c in VS2008

Sorry for the vague subject. Can't summarize this in one line.

I'm working in VS2008 because that what seems to be the most hassle-free environment for the included 2.25c solution.

Before anyone suggests, I'm avoiding ProjectM for now due to the fact that it doesn't always render the same as the WinAmp version, and that's important to me.

My goal is to add granular MIDI control to Milkdrop, i.e. real-time, performance oriented preset editing, mashup control, parameter changes, etc.

I'd like to be able to use a 61 key MIDI keyboard (with various assignable knobs/buttons/sliders/etc) as a 'visual instrument'.

Also critical is the ability to 'sequence' Milkdrop visuals in something like Ableton, Cubase, etc., which would include the ability to be able to record/edit/playback a full Milkdrop 'performance' in perfect sync w/ the audio.

I can handle the MIDI part of this, and I'm pretty confident I can get the right hooks in the right places in the Milkdrop source.

What I have NOT been able to do so far is get a MIDI library wrapper to compile after adding it to the Milkdrop project in VS. I'm not even talking about modifying any Milkdrop code.

I've been working w/ rtMIDI, and have been able to write/compile a few console things in VS2008, ie grabbing MIDI input & displaying it, translating MIDI events to system-wide keyboard events even if the console window does not have focus.

Yeah, I could hack this by re-purposing/creating more keyboard hooks in milkdrop for my desired functionality, then using my stand-alone 'MIDI translator' (Yeah, I know about Bome, et al) to fake keystrokes to Milkdrop, but I really want to add native MIDI (perhaps someday OSC) to Milkdrop. It has been my dream since the first time I played w/ Milkdrop 20 years ago. I just fell in love with it, plain & simple, and nothing else 'does it' for me.

I don't care about forward compatibility with future versions of Windows, VS, WinAmp, etc. Dirt-cheap Refurbed fast Win7 compatible hardware (and video cards) on Amazon/Ebay are not going extinct anytime soon, and I'm a believer in dedicated hardware(computers) for audio/visual applications.

It's for me & my music, but I'll be happy to share the source and/or dll if I ever get it working.

At this point, I'm really begging anyone with more VS/dll/C++ experience than me to please give me the 'push start' of helping me to get the MIDI callback into the VS2008 project. After that, I think I'm good to go.

Sorry for the long post, thanks for reading.

P.S. You may stumble on this post elsewhere. Hope you can forgive it. As I said, I'm desperate, and it's not like there's any searchable information AT ALL on this.
ForestCat is offline   Reply With Quote
Old 29th December 2021, 20:12   #2
Junior Member
Join Date: Feb 2020
Posts: 22
On a related note, if you're looking for MIDI control of Milkdrop then you should check out NestDrop. We've included some of the features that you're dreaming of. Here is a tutorial showing MIDI in action - https://youtu.be/r6_RER5Qq5U?t=43
isosceles is offline   Reply With Quote
Old 6th January 2022, 15:31   #3
Junior Member
Join Date: Mar 2018
Posts: 6
I checked out Nestdrop, and saw that video early on in my search. I emailed Patrick about it, since there's no real docs/demo enumerating the full MIDI implementation. I got a brief reply, but no real info. I replied with the following, but never received an answer



Thanks for your reply. A few thoughts. With the goal always to be visuals that respond to music in a complementary and aesthetically pleasing way, I think the initial approach is to start with a small handful of things that provide the most 'bang for the buck", from the standpoint of coding effort and additional ui complexity. The problem with paramater(variable) control via midi (or even arbitrary qwerty key mappings, if that were implemented) as you say, is the huge number of variables, and the wildly varying relevance of any given variable across presets. ie, a variable that is enormously useful for visual jamming in one preset might have no effect in another. One way to deal with this would be to allow preset authors to specify the mappings within each preset file, perhaps within a metadata or special comment area that would not break the preset's compatibility with other milkdrop implementations, if possible. That approach requires ZERO change to the ui, other than perhaps some way to flag a user of duplicate mappings (Midnight version). It could remain a 'hidden' advanced feature, at least initially.

I'm sure you're familiar with the milkdrop mashup feature. One of the most visually radical ways to 'jam' with milkdrop in real time (in Winamp) is in VJ mode, with the video on a second monitor, while "mashing up" in real time, on the beat, in the VJ control window on the primary monitor. It doesn't take very long to find some really awesome combinations..

It would add complexity to the ui, but what about the ability to to create meta-presets (scenes, etc) in nestdrop, which allow 'mashup groups', ie user-selected pools of presets per bin per preset?

It could be implemented like your cue windows, 5 special 'mashup cue' windows representing the 5 'bins' in the winamp milkdrop menu, left-clicking a preset icon within a bin would have the same effect as cursor up-dn on the winamp milkdrop mashup menu

and then allow MIDI control, as follows:

The 5 bins each get a MIDI channel and note range, definable within an .ini/.cfg, a ui could be added later if you desire.
The size of the note range should probably match the capacity of the mashup cue windows mentioned above
For example, if you decide on 12 presets per bin cue window(matches an octave), we could initially put all the bins on the same channel, and 'zone' the notes:
Bin 1= MIDI Note 36-47
Bin 2= MIDI Note 48-59
Bin 3= MIDI Note 60-71
Bin 4= MIDI Note 72-83
Bin 5= MIDI Note 84-95

Which nicely matches a 5 octave MIDI keyboard, giving one a 'visual instrument' with an INSANE amount of realtime visual control/variety that is intuitive to play 'on the beat' or sequence, etc.

I don't know where nestdrop development is on your radar right now. I know these things tend to wax and wane. Like I said, I'd like to get involved. I have zero commercial interest, I make an honest living and I'm not looking to expand that into software sales. It's just for me. I'm a guy with a lot of music that I want to create compelling video from, I keep coming back to milkdrop from touchdesigner, processing, Max, etc, etc. I've been playing w/ the milkdrop source in Visual Studio. I don't want to waste precious time reinventing the wheel if someone(you) has already got the MIDI hooks into the milkdrop core. The majority of my coding has been embedded controller, atmel, Cypress, arduino, etc., creating touch screen controls for my MIDI guitar, pedalboards, etc. I helped shape the Amiga version of Dr. T's KCS (if you're old enough to remember that, lol). Had one of the very first copies available for the C-64, did an album on it which was released on Larry Fast's Audion label in the 80's. I've beta-tested for Kurzweil. I can be trusted with an NDA.
I have no problem purchasing the Midnight version if you'd provide access to the windows source code, with the written understanding that you retain all rights to any ideas that I'm able to implement.

I didn't want to blindly purchase the midnight edition, there's no demo, and the big question is whether the mashup function is still present somehow 'under the hood' in nestdrop midnight. That's critical to what I want to do. How much of the milkdrop 2.xx source/functionality exists in nestdrop midnight?

I've been struggling trying to shoehorn MIDI into the milkdrop source in Visual Studio. I tried the RTMIDI lib, was able to compile some stand-alone MIDI input parser stuff, but can't get it to compile in the milkdrop source.

Even if you have no interest in having me work on nestdrop, would you perhaps sell me a little of your time/code to get some type of MIDI input working in the milkdrop source? I'm assuming you've done that, or at least it would be trivial to translate the MIDI input from nestdrop to MS VC++

BTW, what dev environment are you using for windows?

Sorry for the long-winded mail, thanks so much for reading.


So that's where I'm stuck, trying to find a way to read MIDI data the same way that keys are handled in the various case statements in the HandleRegularKey function, etc in plugin.cpp. In that case, it looks like the grunt work is done by the ms windows libraries, milkdrop only needs to look for a relevant WPARAM.

How can I do that with incoming MIDI data?

ForestCat is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Visualizations > MilkDrop > MilkDrop Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump