slmnv
Converser
Posts: 22
|
Post by slmnv on Jan 26, 2020 2:38:37 GMT
Hello all, I'm trying to look inside long sysex messages, change them and resend My code is not working as I expect. After 7F messages there goes some garbage zero and then it proceeds from 80. How can I do this ?
Subroutine showmessage prefix Ass LA = 0 Ass LB = 0 If LB < ML +L Mat LB = LB + $128 If LB > ML Ass LB = ML End If LA < LB +L if prefix != 0 Snd LA 00 00 MLA +F # for debug else Snd MLA +F # for re-send end Mat LA = LA + 1 End End End
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jan 27, 2020 9:48:13 GMT
Hi slmnv , To prevent infinite loops and 'play nice' as a processor, StreamByter has a maximum loop iteration limit of 128. If you need to get around this, then you can double-nest the loop giving you 128x128 max iterations as follows: assign LB = 0 while LB < ML while LB < ML math LB = LB + 1 end endRegards, Nic.
|
|
slmnv
Converser
Posts: 22
|
Post by slmnv on Feb 23, 2020 17:47:45 GMT
Hi Nic, apologies for not being clear with my question. I tried to do what you suggest with code shown above. But I see some unexpected output as shown in the attached image. Can you please explain what is wrong with the code I put above ? when I spot sysex message I start this subroutine and show all the bytes in the sysex before changing them and sending them back. Something like if M0 == F0 showmessage 1 end I expect to see ..... 7E 00 00 00 7F 00 00 00 80 00 00 00 81 00 00 40 ......... but instead I see what is shown in the screenshot. Attachments:
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Feb 25, 2020 20:22:59 GMT
Hi slmnv , Hmm, that looks really strange. Have you tried adding 'log' statements after each of those send rules to see if either the 'else clause is being triggered or the event is being generated from something else. Regards. Nic.
|
|