ian
Converser
Posts: 8
|
Post by ian on Mar 16, 2020 3:27:42 GMT
Sending SysEx
Can anybody help me code this please?
When my SoftStep foot controller sends CC 16 I want to send the following to my MODX8 Synth:
SysEx Mfg: 43 message (11 bytes)
F0 43 10 7F 1C 07 30 47 03 00 F7
Many thanks!
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 16, 2020 7:49:05 GMT
Hi ian , You've done all the hard work already. Something like this: (assuming CC is on channel 1 and sends 7F/127 for ON)" if M0 == B0 $16 $127 send F0 43 10 7F 1C 07 30 47 03 00 F7 block endRegards, Nic.
|
|
ian
Converser
Posts: 8
|
Post by ian on Mar 16, 2020 22:52:07 GMT
Works great. Turns the arpegiattor (drums) off at the end of the song
|
|
ian
Converser
Posts: 8
|
Post by ian on Mar 29, 2020 6:05:48 GMT
Hi Nic,
I've expanded on the code to do a few more things on MODX (selecting Scenes).
My code works fine, but I wonder if I've coded it in naive way? Would you have written it differenty?
Also, is it possible to write the first block so that it will toggle alternate sysex messages. In other words, when I first press my pedal (cc 30) it will send Send F0 43 10 7F 1C 07 30 47 03 00 F7
... then next time I press it (still value 30) it will send ...
Send F0 43 10 7F 1C 07 30 47 03 7F F7
... then next time back to the first message,
Send F0 43 10 7F 1C 07 30 47 03 00 F7
and so on. That will allow me to toggle the Arpeggiator On/Off with a single pedal.
Here is the complete code (as I said, working but probably poorly coded)
# Stop Arpeggiator
if M0 == B0 $30 $127
Send F0 43 10 7F 1C 07 30 47 03 00 F7
block
end
# Start Arpeggiator
if M0 == B0 $31 $127
Send F0 43 10 7F 1C 07 30 47 03 7F F7
block
end
# Select Scene 1
if M0 == B0 $16 $127
Send F0 43 10 7F 1C 07 30 4C 00 00 F7
block
end
# Select Scene 2
if M0 == B0 $17 $127
Send F0 43 10 7F 1C 07 30 4C 00 01 F7
block
end
# Select Scene 3
if M0 == B0 $18 $127
Send F0 43 10 7F 1C 07 30 4C 00 02 F7
block
end
# Select Scene 4
if M0 == B0 $19 $127
Send F0 43 10 7F 1C 07 30 4C 00 03 F7
block
end
# Select Scene 5
if M0 == B0 $20 $127
Send F0 43 10 7F 1C 07 30 4C 00 04 F7
block
end
# Select Scene 6
if M0 == B0 $21 $127
Send F0 43 10 7F 1C 07 30 4C 00 05 F7
block
end
# Select Scene 7
if M0 == B0 $22 $127
Send F0 43 10 7F 1C 07 30 4C 00 06 F7
block
end
# Select Scene 8
if M0 == B0 $23 $127
Send F0 43 10 7F 1C 07 30 4C 00 07 F7
block
end
|
|
ian
Converser
Posts: 8
|
Post by ian on Mar 29, 2020 11:22:53 GMT
I figured it out. The following version let's me toggle the Arpeggiator on/off.
Changing to a different performance can put the value in L0 out of synch with the MODX, but that is no big deal .. I just need to remember to press the pedal a couple of times before starting to play the song so that StreamByter and the MODX are both back in synch.
# start/stop Arpegiator if M0 == B0 $30 $127 if L0 == 0 # Stop Arpeggiator Send F0 43 10 7F 1C 07 30 47 03 00 F7 ass L0 = 1 block exit end # Stop Arpeggiator Send F0 43 10 7F 1C 07 30 47 03 7F F7 ass L0 = 0 block exit end
# Select Scene 1 if M0 == B0 $16 $127 Send F0 43 10 7F 1C 07 30 4C 00 00 F7 block exit end
# Select Scene 2 if M0 == B0 $17 $127 Send F0 43 10 7F 1C 07 30 4C 00 01 F7 block exit end
# Select Scene 3 if M0 == B0 $18 $127 Send F0 43 10 7F 1C 07 30 4C 00 02 F7 block exit end
# Select Scene 4 if M0 == B0 $19 $127 Send F0 43 10 7F 1C 07 30 4C 00 03 F7 block exit end
# Select Scene 5 if M0 == B0 $20 $127 Send F0 43 10 7F 1C 07 30 4C 00 04 F7 block exit end
# Select Scene 6 if M0 == B0 $21 $127 Send F0 43 10 7F 1C 07 30 4C 00 05 F7 block exit end
# Select Scene 7 if M0 == B0 $22 $127 Send F0 43 10 7F 1C 07 30 4C 00 06 F7 block exit end
# Select Scene 8 if M0 == B0 $23 $127 Send F0 43 10 7F 1C 07 30 4C 00 07 F7 block exit end
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 29, 2020 12:16:49 GMT
Hi ian , You beat me to it. You need to keep track of the current state (which you are now doing using L0) to do a toggle. If the process of switching to another performance (I assume in the softstep) generates a MIDI message, you could wait for that message and reset L0 to sync? I would probably write the code differently, but if your code works then I would not suggest you change anything - what you are doing is functional and not going to be any performance issues, so not worth losing sleep over. Regards, Nic.
|
|