I'm looking to change banks of control knobs via another controller or keyboard shortcuts, which requires sending a midi message.
I have two Midi Fighter Twister units, which both have four banks of 4x4 knobs. I change that bank with a midi message. This is a control thing.
Right now I'm doing this but the device number changes:
Code:
local function SendMIDI(MIDI_port,MIDI_channel,MIDI_note,MIDI_velocity)
cmdline = [["]] .. reaper.GetResourcePath() .. [[\scripts\sendmidi.exe" --out ]] .. MIDI_port .. [[ --note-on ]] .. MIDI_channel .. [[ ]] .. MIDI_note .. [[ ]] .. MIDI_velocity
reaper.ExecProcess(cmdline,-2)
end
device = 19 -- use lsmidiouts.exe to scan for which port your device is located at
bank = 2 -- 0=bank 1 up to 3=bank4
SendMIDI(device,3,bank,127)
Sendmidi.exe is a simple commandline tool. But of course that fails a lot as I have to change the device number after each reboot. Thus I never use it.
Since Reaper sees these devices, I presumed it could address them. I'm just not sure how. A script would be ideal because I can bind it to anything.
The commands stem from
this manual from DJ Techtools on page 8.