Using a combination of MIDI YOKE, MIDIOX, and AutoHotKey, you can route the midi from your controller to both SAC and an AutoHotKey script that will mash what ever buttons that you want.
After doing some sniffing around I came across a forum post Midi Input/Output combined - with System Exclusive! that provided me the base to view the midi messages that were coming in and a method of attaching AutoHotKey actions to them as well as triggering a midi out message with a hot key combo.
My script is still a work in progress, but is ENTIRELY based off of the script found on that forum. The only changes that I've made are to the actual hotkey/midi in command sections. (Linking what I'm getting with what I want it to do)
Here's a section that I added in to the ++hotkey defs+++ section of hotkeyTOmidi_2.ahk
Code:
^!+1::midiOutShortMsg(h_midiout, (channel+143), 0, 127)
^!+q::midiOutShortMsg(h_midiout, (channel+143), 0, 0)
^!+2::midiOutShortMsg(h_midiout, (channel+143), 1, 127)
^!+w::midiOutShortMsg(h_midiout, (channel+143), 1, 0)
^!+3::midiOutShortMsg(h_midiout, (channel+143), 2, 127)
^!+e::midiOutShortMsg(h_midiout, (channel+143), 2, 0)
^!+4::midiOutShortMsg(h_midiout, (channel+143), 3, 127)
^!+r::midiOutShortMsg(h_midiout, (channel+143), 3, 0)
^!+5::midiOutShortMsg(h_midiout, (channel+143), 4, 127)
^!+t::midiOutShortMsg(h_midiout, (channel+143), 4, 0)
This allows me to turn on and off the rdy/rec button lights on a mackie XT
and this code provides for use of the arrows, the jog wheel, the line of buttons below the preprogramed F-keys (as alt F Keys), the control, the alt and the shuttle controls (passes hotkeys to another program (hotkeynet) that then passes commands to Mediamonkey on my server to play set break music)on the MCU.
Code:
if (byte1 = 72 && byte2 = 127) ; test if note message is note number 72 with note on status byte
{
GuiControl,12:, MidiMs, ctrl down ; for display of filtered note passing to gui -testing only
SendEvent {control down}
}
if (byte1 = 72 && byte2 = 0) ; test if note message is note number 72 with note off status byte
{
GuiControl,12:, MidiMs, control up ; for display of filtered note passing to gui -testing only
SendEvent {control up}
}
if (byte1 = 91 && byte2 = 127) ; test if note message is note number 91 with note on status byte
{
GuiControl,12:, MidiMs, MediaMonkey Back ; for display of filtered note passing to gui -testing only
SendEvent ^!b
}
if (byte1 = 92 && byte2 = 127) ; test if note message is note number 92 with note on status byte
{
GuiControl,12:, MidiMs, MediaMonkey Next ; for display of filtered note passing to gui -testing only
SendEvent ^!n
}
if (byte1 = 93 && byte2 = 127) ; test if note message is note number 93 with note on status byte
{
GuiControl,12:, MidiMs, MediaMonkey Stop ; for display of filtered note passing to gui -testing only
SendEvent ^!o
}
if (byte1 = 94 && byte2 = 127) ; test if note message is note number 94 with note on status byte
{
GuiControl,12:, MidiMs, MediaMonkey Back ; for display of filtered note passing to gui -testing only
SendEvent !p
}
if (byte1 = 96 && byte2 = 127) ; test if note message is note number 96 with note on status byte
{
GuiControl,12:, MidiMs, Up Arrow ; for display of filtered note passing to gui -testing only
send {Up}
}
if (byte1 = 97 && byte2 = 127) ; test if note message is note number 97 with note on status byte
{
GuiControl,12:, MidiMs, Down Arrow ; for display of filtered note passing to gui -testing only
send {down}
}
if (byte1 = 98 && byte2 = 127) ; test if note message is note number 98 with note on status byte
{
GuiControl,12:, MidiMs, Left Arrow ; for display of filtered note passing to gui -testing only
send {left}
}
if (byte1 = 99 && byte2 = 127) ; test if note message is note number 99 with note on status byte
{
GuiControl,12:, MidiMs, Right Arrow ; for display of filtered note passing to gui -testing only
send {right}
}
if (byte1 = 62 && byte2 = 127) ; test if note message is note number 62 with note on status byte
{
GuiControl,12:, MidiMs, Alt F1 ; for display of filtered note passing to gui -testing only
SendEvent !{f1}
}
if (byte1 = 63 && byte2 = 127) ; test if note message is note number 63 with note on status byte
{
GuiControl,12:, MidiMs, Alt F2 ; for display of filtered note passing to gui -testing only
SendEvent !{f2}
}
if (byte1 = 64 && byte2 = 127) ; test if note message is note number 64 with note on status byte
{
GuiControl,12:, MidiMs, Alt F3 ; for display of filtered note passing to gui -testing only
SendEvent !{f3}
}
if (byte1 = 65 && byte2 = 127) ; test if note message is note number 65 with note on status byte
{
GuiControl,12:, MidiMs, Alt F4 ; for display of filtered note passing to gui -testing only
SendEvent !{f4}
}
if (byte1 = 66 && byte2 = 127) ; test if note message is note number 66 with note on status byte
{
GuiControl,12:, MidiMs, Alt F5 ; for display of filtered note passing to gui -testing only
SendEvent !{f5}
}
if (byte1 = 67 && byte2 = 127) ; test if note message is note number 67 with note on status byte
{
GuiControl,12:, MidiMs, Alt F6 ; for display of filtered note passing to gui -testing only
SendEvent !{f6}
}
if (byte1 = 68 && byte2 = 127) ; test if note message is note number 68 with note on status byte
{
GuiControl,12:, MidiMs, Alt F7 ; for display of filtered note passing to gui -testing only
SendEvent !{f7}
}
if (byte1 = 69 && byte2 = 127) ; test if note message is note number 69 with note on status byte
{
GuiControl,12:, MidiMs, Alt F8 ; for display of filtered note passing to gui -testing only
SendEvent !{f8}
}
if (byte1 = 60 && byte2 = 1) ; test if note message is note number 60 with note on status byte
{
GuiControl,12:, MidiMs, convert4:%statusbyte% %chan% %byte1% %byte2% ; for display of filtered note passing to gui -testing only
send {Up}
}
if (byte1 = 60 && byte2 = 65) ; test if note message is note number 57 with note on status byte
{
GuiControl,12:, MidiMs, convert4:%statusbyte% %chan% %byte1% %byte2% ; for display of filtered note passing to gui -testing only
send {Down}
}
Connect With Us