|
Post by zztrydr on Jun 25, 2024 16:40:30 GMT
Hello! I am quite new to this app, so my apologies for not seeing an obvious solution to my problem. And I'm most likely doing this incorrectly. My goal is simple, I think. I just need to send a bunch of long sysex messages with a 500ms delay in between. I posted the code below. I do not understand why I am getting an error at the last part of each sysex message that I am sending. May I request for any insight please? Thanks in advance!
#Send FS-1-WL sysex messages
#Note the following CC assignments
#Pedal SW Left: 80
#Pedal SW Center: 81
#Pedal SW Right: 82
#Ctl 1 SW: 85
#Ctrl 2 SW: 86
#Expression: CC 11 0-127
IF LOAD
SND F0 41 10 00 00 00 00 10 12 10 00 00 00 00 01 00 +F
#ERR SND 08 00 01 01 01 00 01 01 01 61 F7 +D500
SND F0 41 10 00 00 00 00 10 12 10 01 00 00 0B 00 7F +F
SND 01 00 7F 32 00 7F 30 00 7F 31 00 7F 32 00 7F 35 +F
#ERR SND 00 7F 36 00 7F 3B F7 +D500
SND F0 41 10 00 00 00 00 10 12 10 02 00 00 0B 00 7F +F
SND 01 00 7F 32 00 7F 30 00 7F 31 00 7F 32 00 7F 35 +F
#ERR SND 00 7F 36 00 7F 3A F7 +D500
SND F0 41 10 00 00 00 00 10 12 10 03 00 00 0B 00 7F +F
SND 01 00 7F 32 00 7F 30 00 7F 31 00 7F 32 00 7F 35 +F
#ERR SND 00 7F 36 00 7F 39 F7 +D500
END
|
|
|
Post by zztrydr on Jun 25, 2024 22:49:25 GMT
Figured out the error, turns out I also needed to add +F at the end of those lines. My question is, since this flag disables validation checking, will it affect the next sysex message being sent? Or because I added the 500ms delay and those last lines have F7 to terminate the message, it won't affect the next one?
|
|
|
Post by redheronmusic on Jun 26, 2024 1:08:42 GMT
Might depend on which version of SB you are using.
In MIDI Designer, if delays in parts of the message are not the same, looks like the message is not sent. Otherwise, the delay is respected.
In MIDI Fire for Mac, looks like the messages are not delayed.
Not tested the other platforms.
Might have to approach this another way if the delays are not being respected. Maybe use an injected, delayed message which the directly triggers the messages after desired delays.
|
|
|
Post by zztrydr on Jun 26, 2024 1:35:23 GMT
Might depend on which version of SB you are using. In MIDI Designer, if delays in parts of the message are not the same, looks like the message is not sent. Otherwise, the delay is respected. In MIDI Fire for Mac, looks like the messages are not delayed. Not tested the other platforms. Might have to approach this another way if the delays are not being respected. Maybe use an injected, delayed message which the directly triggers the messages after desired delays. Thanks for the response! I'm using the standalone iOS app version. My current setup is: iPhone running: StreamByter, BTS for Katana Go, midimttr Win10 desktop PC: midi-OX, WIDI Uhost connected via USB midimttr sources: WIDI Uhost Bluetooth, StreamByter midimttr destinations: WIDI Uhost, KATANA:GO MIDI Bluetooth Here's my updated code, I used some of the stuff from StreamByter University's Channel Switcher code to trigger the send: #Send FS-1-WL sysex messages
#Note the following CC assignments
#Pedal SW Left: 80
#Pedal SW Center: 81
#Pedal SW Right: 82
#Ctl 1 SW: 85
#Ctrl 2 SW: 86
#Expression: CC 11 0-127
if load
set include factory standard_includes
#set up button
alias Q0 SendSysex
set SendSysex Run +toggle
assign SendSysex = 0
set Q1 +hide
set Q2 +hide
set Q3 +hide
set Q4 +hide
set Q5 +hide
set Q6 +hide
set Q7 +hide
# give script a name and expose controls box
set name Switch
set slider_display 1
# inject control_q1_moved manually
send control_sysex 00 sysex_end +inject
end
if MT == F0
if SendSysex == 1
SND F0 41 10 00 00 00 00 10 12 10 00 00 00 00 01 00 +F
SND 08 00 01 01 01 00 01 01 01 61 F7 +F +D200
SND F0 41 10 00 00 00 00 10 12 10 01 00 00 0B 00 7F +F
SND 01 00 7F 32 00 7F 30 00 7F 31 00 7F 32 00 7F 35 +F
SND 00 7F 36 00 7F 3B F7 +F +D200
SND F0 41 10 00 00 00 00 10 12 10 02 00 00 0B 00 7F +F
SND 01 00 7F 32 00 7F 30 00 7F 31 00 7F 32 00 7F 35 +F
SND 00 7F 36 00 7F 3A F7 +F +D200
SND F0 41 10 00 00 00 00 10 12 10 03 00 00 0B 00 7F +F
SND 01 00 7F 32 00 7F 30 00 7F 31 00 7F 32 00 7F 35 +F
SND 00 7F 36 00 7F 39 F7 +F +D200
end
End
# handle engage button press
if control_q0_moved
if SendSysex == 1
set SendSysex Sent +t
else
set SendSysex Run +t
end
end I don't get any errors now, but the new problem I have is that it doesn't seem to be sending the full sysex messages. Using midi-ox to monitor the traffic, the only message that is sent is: F0 41 10 00 00 00 00 10 12 10 00 00 00 00 01 00 F0 Checking the MIDI event monitor within StreamByter, here's what I see: ibb.co/cQNvRcg![](https://ibb.co/cQNvRcg) I'm not sure what I'm doing wrong, sorry. If I send a shorter sysex message, it works fine. For example, I replace all those SND commands with just one to change the preset SND F0 41 10 01 05 0D 12 00 00 00 00 05 7B F7 And it works.
|
|
|
Post by zztrydr on Jun 26, 2024 1:57:45 GMT
Additional test: I added the inject flag on the first SND line:
SND F0 41 10 00 00 00 00 10 12 10 00 00 00 00 01 00 +F +I
Using midi-ox to monitor the traffic, the only message that showed up is:
F0 41 10 00 00 00 00 10 12 10 01 00 00 0B 00 7F 01 00 7F 32 00 7F 30 00 7F 31 00 7F 32 00 7F 35 F0
Which is the part of the 4th and 5th SND lines
|
|
|
Post by redheronmusic on Jun 26, 2024 12:05:42 GMT
I think I suggested two approaches. Restating, hopefully clearer
- ensure the delay is included on each line of the message - if that does't work, try using a delayed inject in place of the delay on individual messages
|
|
|
Post by zztrydr on Jun 26, 2024 15:12:10 GMT
I think I suggested two approaches. Restating, hopefully clearer - ensure the delay is included on each line of the message - if that does't work, try using a delayed inject in place of the delay on individual messages Sorry if I didn't get it the first time, still learning Adding a delay of 1500ms on each line works! Thank you! Just curious, what do you mean by "using a delayed inject in place of the delay on individual messages"?
|
|
|
Post by redheronmusic on Jun 27, 2024 2:14:56 GMT
Just curious, what do you mean by "using a delayed inject in place of the delay on individual messages"? Delay the injected message, +I +D, then it can trigger all the long SysEx messages after the delay, not worrying about individual message delays.
|
|
|
Post by zztrydr on Jun 28, 2024 4:10:45 GMT
Thanks again!
|
|