Hi, somehow and after some MDP layout modification I get a lot same sysex messages. Is it possible to filter it to one message? So if message one is being send five times can streambyter filter out the other 4?
Assuming you are talking about those katana sysex messages, then here is one technique:
IF M0 == F0 41 00 00 # roland sysex IF M7 == 12 60 00 # KATANA
# detect dupe message within last 100ms # If is a dupe, set L83 to 1 ASS L83 = 0 # assume not a dupe
# compare message with previous # previous data of katana message is in # L80-2 (address+value) IF MA == L80 L81 L82 # use a timer variable to limit # the compare window IF T0 < 64 ASS L83 = 1 END END
# always remember the last message (address+val) # into L80-2 ASS L80 = M0A M0B M0C
IF L83 == 0 # we have a new message, so you put your code # that processes the message inside this IF/END ... END
# dupe, message should be blocked IF L83 == 1 XX = XX +B END
In later versions of Stream Byter you can block and terminate the script, but for the version in MDP, it is safer to set that L84 flag and put in conditionals since a XX = XX +B (block) removes the event but the script will continue which could have unexpected results if you were examining the message further down that has been blocked.
It would also be possible to write code that retained/compared any message whatsoever, but this might add a bit of overhead as each message needs to be compared and maintained with loops.
I had assumed the dupe messages were being sent at the same time (or close together) so that is why I made the timeout small. You don't have to have a timeout at all of course, but you figured it all out for your own setup in any case.
BTW - IF T0 < 1000 will be a 4 second timeout (since that's a hex number).