2 Home
David Daily edited this page 2020-05-19 01:59:47 -05:00

Home

What does this do?

This AHK script converts the MIDI output of a Korg nanoKontrol2 (Amazon | Official website) to AHK, which then controls VoiceMeeter (I am using the Banana variant, but you can use whichever one you want).

Here is what my setup looks like

Important note: The MIDI signals can only go to one program at a time.

To write the scene to the MIDI Controller, you need to close the running AHK script, then the port will be open to be written to. After writing the scene data, I would recommend saving the scene and restarting the AHK script.

Since the MIDI signals are going to AHK, you can pass anything on to a different program by doing gosub, SendNote for a note, gosub, SendCC for a Control Change, and gosub, SendPC for a Program Change. I would highly recommend reading MidiRules.ahk if you are going to do any advanced things that are outside of the scope of this project.

How the hell?

MIDI:

(With this part I'm just referring to the installing of the Korg software and its configuration)

It was pretty easy to go through and rename everything to a more sensible numbering scheme than everything being on one channel with a different CC for each control. I guess if you have multiple MIDI devices this might be an issue, but if you do that you're probably smart enough to figure out how to code it differently.

AHK:

I have no idea how the MIDI part works. I sent it to one of the AHK wizards in the discord that have made a Custom Language -> AHK -> Machine Code compiler, and they were lost as well. As far as I know, anything in Midi_under_the_hood.ahk shouldn't be touched unless you really know what you're doing.

VoiceMeeter:

This part is pretty simple. VoiceMeeter comes with all the neccessary DLLs to be able to control anything at all in the whole software through some DLL calls in AHK. All I had to do was look at some examples and figure out how to pass the correct info to the DLL call. The manual for VoiceMeeter also contains all the info you need to change any of the settings you would like.