Anyone have success sending a Hex MIDI message using a MIDI Out CHOP? I’m trying to send a message to an ETC Express 24/48 Lighting console if that helps.
What type of message?
You’d probably want to use send() or sendExclusive()
It will have to be done with a python script, in a DAT referring to the MIDI OUT CHOP.
See:
derivative.ca/wiki088/index. … ss#Methods
for examples, including hex notation.
When I try the sendExclusive() method in a script like below, the midiout node doesn’t send anything out and the script may show an error flag and say that it is “Unable to send MIDI command.” When I uncomment the line with the sendControl() method it sends the control change message but still no sysex.
def cook(scriptOP):
scriptOP.clear()
#get input value
v0 = scriptOP.inputs[0][0].eval()*64
#create new out channels
a = scriptOP.appendChan('out1')
#assign out channels
#with below values
a[0] = v0
op('/project1/midiout1').sendExclusive(125,0,1,v0)
#op('/project1/midiout1').sendControl(1,1,v0)
return
Any clues ?
Theres a bug in the existing official that sometimes doesn’t send messages at all, but Im not sure why one type of message works for you, but not the other.
How are you confirming either of the messages are being sent?
If you put a MIDI Event DAT, do you see both sent messages reflected in its output?
We’ll have a build out with the aforementioned bug fixed shortly.
I’m running build 50500. When I send out sysex via a MIDISport 1x1 USB-MIDI interface the out LED doesn’t light up indicating nothing is being sent out. Sending out control change messages does light up the LED. MIDI-OX confirms all this. But the MIDI Event DAT shows the sysex messages are being sent out though. So is this still a bug ?
So you are right, digging deeper, there definitely was an issue with the system exclusive messages not being sent at the driver level, even though they were being picked up by the MIDI Event DAT and elsewhere in the app.
This is now fixed in builds 32840 and later.
Sorry for the delay in finding this!
Rob.
Ok, cool but I was running build 50500 and still encountered this issue …
I re-installed 32840 and can confirm sysex is being sent out, so that’s great ! I guess I’m not understanding the experimental build numbering system … ?
Hey Axel, when we add a fix to official we will also put it in experimental. However in this case we just posted a new official and the next experimental is not ready yet. I next posting will have the fix in it as well.
Ah, cool. It’s great you guys come up so quickly with bug fixes. I hope the next experimental comes out soon too because I can’t actually work with build 32840 anymore as I was already working with 50880. The network I’ve made in build 50880 that uses the Serial DAT (and which network I want to adapt to use MIDI so that it works with our MIDI digitizers) doesn’t seem to want to load in 32840 (Touchdesigner just hangs), so I went back to 50880.
Send sysex programs via touchdesigner:
Open midi out and define the device.
Open script chop write this code and them click setup (Setup Parameters) in script chop.
Go to sysex send and pulse. This was made for Novation Launchpad mini.
In Launchpad, the SysEx programs start in the same way, and you can change how and where the program is directed:
Selected = 7F
Drums = 04
Keys = 05
User = 06
Change the string of the sysex file with the program hex fiend :
F0002029 020D2000 45407F
F0002029 020D2000 454004
F0002029 020D2000 454005
F0002029 020D2000 454006
# me - this DAT
# scriptOp - the OP which is cooking
# press 'Setup Parameters' in the OP to call this function to re-create the parameters.
def onSetupParameters(scriptOp):
page = scriptOp.appendCustomPage('Sysex send')
# Create Pulse
page.appendPulse('Launchpad1')
page.appendPulse('Launchpad2')
page.appendPulse('Launchpad3')
return
# called whenever custom pulse parameter is pushed
def onPulse(par):
# Midi out
n = op('midiout1')
# Replace this with your hexadecimal SysEx string
hex_prog_1 = "F0002029 020D2000 45400420 05414445 30312101 00490002 01002040 004A0000 49010201 00204000 4A010149 02020100 2040004A 02024903 02010020 40004A03 03490402 01002040 004A0404 49050201 00204000 4A050549 06020100 2040004A 06064907 02010020 40004A07 07490802 01002040 004A0808 49090201 00204000 4A090949 0A020100 2040004A 0A0A490B 02010020 40004A0B 0B490C02 01002040 004A0C0C 490D0201 00204000 4A0D0D49 0E020100 2040004A 0E0E490F 02010020 40004A0F 0F491002 01002040 004A1010 49110201 00204000 4A111149 12020100 2040004A 12124913 02010020 40004A13 13491402 01002040 004A1414 49150201 00204000 4A151549 16020100 2040004A 16164917 02010020 40004A17 17491802 01002040 004A1818 49190201 00204000 4A191949 1A020100 2040004A 1A1A491B 02010020 40004A1B 1B491C02 01002040 004A1C1C 491D0201 00204000 4A1D1D49 1E020100 2040004A 1E1E491F 02010020 40004A1F 1F492002 01002040 004A2020 49210201 00204000 4A212149 22020100 2040004A 22224923 02010020 40004A23 23492402 01002040 004A2424 49250201 00204000 4A252549 26020100 2040004A 26264927 02010020 40004A27 27492802 01002040 004A2828 49290201 00204000 4A292949 2A020100 2040004A 2A2A492B 02010020 40004A2B 2B492C02 01002040 004A2C2C 492D0201 00204000 4A2D2D49 2E020100 2040004A 2E2E492F 02010020 40004A2F 2F493002 01002040 004A3030 49310201 00204000 4A313149 32020100 2040004A 32324933 02010020 40004A33 33493402 01002040 004A3434 49350201 00204000 4A353549 36020100 2040004A 36364937 02010020 40004A37 37483801 03003600 00003C48 39010300 36000000 3D483A01 03003600 00003E48 3B010300 36000000 3F483C01 03003600 00004048 3D010300 36000000 41403E48 3F010300 3F000000 7F404040 41404240 43404440 45404640 47000501 05020006 00070008 00050004 40F7"
hex_prog_2 = "F0002029 020D2000 45400520 05414445 30322101 00480001 58003040 00000048 01015800 30400000 01480201 58003040 00000248 03015800 30400000 03480401 58003040 00000448 05015800 30400000 05480601 58003040 00000648 07015800 30400000 07480801 58003040 00000848 09015800 30400000 09480A01 58003040 00000A48 0B015800 30400000 0B480C01 58003040 00000C48 0D015800 30400000 0D480E01 58003040 00000E48 0F015800 30400000 0F481001 58003040 00001048 11015800 30400000 11481201 58003040 00001248 13015800 30400000 13481401 58003040 00001448 15015800 30400000 15481601 58003040 00001648 17015800 30400000 17481801 58003040 00001848 19015800 30400000 19481A01 58003040 00001A48 1B015800 30400000 1B481C01 58003040 00001C48 1D015800 30400000 1D481E01 58003040 00001E48 1F015800 30400000 1F482001 58003040 00002048 21015800 30400000 21482201 58003040 00002248 23015800 30400000 23482401 58003040 00002448 25015800 30400000 25482601 58003040 00002648 27015800 30400000 27482801 58003040 00002848 29015800 30400000 29482A01 58003040 00002A48 2B015800 30400000 2B482C01 58003040 00002C48 2D015800 30400000 2D482E01 58003040 00002E48 2F015800 30400000 2F483001 58003040 00003048 31015800 30400000 31483201 58003040 00003248 33015800 30400000 33483401 58003040 00003448 35015800 30400000 35483601 58003040 00003648 37015800 30400000 37483801 03003600 00003C48 39010300 36000000 3D483A01 03003600 00003E48 3B010300 36000000 3F483C01 03003600 00004048 3D010300 36000000 41403E48 3F010500 3F000000 7F404040 41404240 43404440 45404640 47000501 05020006 00070008 00050004 40F7"
hex_prog_3 = "F0002029 020D2000 45400620 05414445 30332101 00490002 6C002040 004B0000 4901026C 00204000 4B010149 02026C00 2040004B 02024903 026C0020 40004B03 03490402 6C002040 004B0404 4905026C 00204000 4B050549 06026C00 2040004B 06064907 026C0020 40004B07 07490802 6C002040 004B0808 4909026C 00204000 4B090949 0A026C00 2040004B 0A0A490B 026C0020 40004B0B 0B490C02 6C002040 004B0C0C 490D026C 00204000 4B0D0D49 0E026C00 2040004B 0E0E490F 026C0020 40004B0F 0F491002 6C002040 004B1010 4911026C 00204000 4B111149 12026C00 2040004B 12124913 026C0020 40004B13 13491402 6C002040 004B1414 4915026C 00204000 4B151549 16026C00 2040004B 16164917 026C0020 40004B17 17491802 6C002040 004B1818 4919026C 00204000 4B191949 1A026C00 2040004B 1A1A491B 026C0020 40004B1B 1B491C02 6C002040 004B1C1C 491D026C 00204000 4B1D1D49 1E026C00 2040004B 1E1E491F 026C0020 40004B1F 1F492002 6C002040 004B2020 4921026C 00204000 4B212149 22026C00 2040004B 22224923 026C0020 40004B23 23492402 6C002040 004B2424 4925026C 00204000 4B252549 26026C00 2040004B 26264927 026C0020 40004B27 27492802 6C002040 004B2828 4929026C 00204000 4B292949 2A026C00 2040004B 2A2A492B 026C0020 40004B2B 2B492C02 6C002040 004B2C2C 492D026C 00204000 4B2D2D49 2E026C00 2040004B 2E2E492F 026C0020 40004B2F 2F493002 6C002040 004B3030 4931026C 00204000 4B313149 32026C00 2040004B 32324933 026C0020 40004B33 33493402 6C002040 004B3434 4935026C 00204000 4B353549 36026C00 2040004B 36364937 026C0020 40004B37 37483801 03003600 00003C48 39010300 36000000 3D483A01 03003600 00003E48 3B010300 36000000 3F483C01 03003600 00004048 3D010300 36000000 41403E48 3F010300 3F000000 7F404040 41404240 43404440 45404640 47000501 05020006 00070008 00050004 40F7"
# Convert hex_prog_1
# Remove spaces
hex_prog_1 = hex_prog_1.replace(" ", "")
# Initialize an empty byte array
sysex_bytes_prog_1 = bytearray()
# Convert each pair of characters to bytes
for i in range(0, len(hex_prog_1), 2):
byte = int(hex_prog_1[i:i+2], 16)
sysex_bytes_prog_1.append(byte)
# Convert hex_prog_2
# Remove spaces
hex_prog_2 = hex_prog_2.replace(" ", "")
# Initialize an empty byte array
sysex_bytes_prog_2 = bytearray()
# Convert each pair of characters to bytes
for i in range(0, len(hex_prog_2), 2):
byte = int(hex_prog_2[i:i+2], 16)
sysex_bytes_prog_2.append(byte)
# Convert hex_prog_3
# Remove spaces
hex_prog_3 = hex_prog_3.replace(" ", "")
# Initialize an empty byte array
sysex_bytes_prog_3 = bytearray()
# Convert each pair of characters to bytes
for i in range(0, len(hex_prog_3), 2):
byte = int(hex_prog_3[i:i+2], 16)
sysex_bytes_prog_3.append(byte)
# If Pulse on = send sysex
if par.name == 'Launchpad1':
n.sendExclusive(sysex_bytes_prog_1)
if par.name == 'Launchpad2':
n.sendExclusive(sysex_bytes_prog_2)
if par.name == 'Launchpad3':
n.sendExclusive(sysex_bytes_prog_3)
return
def onCook(scriptOp):
scriptOp.clear()
return
I made a Chop Script for sending presets/programs, and other SysEx messages on the Novation Launchpad Mini MK3.
Check my guithub: