I have gone far off the OP, SORRY!
Thank you for thoughts.
The snippet idea is interesting.
I have not worked with them at all... perhaps that could work.
I need to look and see if I could just recall the routing only...
Do you know what midi cc will trigger a snippet?
I was just experimenting with
Code:
function Main()
reaper.StuffMIDIMessage(0, -- virt keyboard
0xBF, -- CC statusbyte midi ch 1-16 (0xB0 to 0xBF=16)
88, -- CC number
127) -- CC value
end
Main()
I can get this code to send a midi cc to virt midi keyboard
(taken from
https://forum.cockos.com/showthread.php?t=186540)
I can send this midi to I/O route to midi hardware out...
then try to use the x32midi2osc to convert the message to osc to trigger the change on the mixer.
Wow-that seems tedious and overly complicated. (aka a bad idea...)
Maybe - I could send the midi from my script above to the mixer to change the snippet...
This could be problematic because I use the x32 as daw remote control surface as an mcu with klinke's csurf plugin.
Hmm...
EDIT - does not appear that I can trigger a snippet from midi.
https://behringerwiki.musictribe.com...ementation.pdf
Scenes correspond to program changes, 1-100, however this is old firmware documentation...
I'll keep looking for v4 firmware.
EDI2 - Page 141
https://drive.google.com/file/d/1Snb...hbJpIpD0a/view
Program change 0-99 will - depending on midi channel change scenes or snippets
midi ch 1 = Scenes
midi ch 2 = Snippets
I should be able to save a snippet with routing, hopefully it will remember the PLAY/RECORD toggle - seems like it should.
Code:
--- Send out pc midi message to virtual midi keyboard ----
function Main()
-- can use decimal or hex
midi_out = 0 -- 0 = virt_keyboard (need to figure out how to send other midi)
statusbyte = 0xC0 -- pc statusbyte midi ch 2 (0xC0=1 to 0xCF=16)
data1 = 0 -- 0-99, 1=2
data2 = 0 -- not used in pc message - used in other messages
reaper.StuffMIDIMessage(midi_out, -- virt keyboard
statusbyte+1,-- midi chan 2
data1+1, -- program change # 1
data2) -- not used in pc message
end
Main()
I have an experiment for tomorrow!
If this works, I won't need osc at all!
Thanks