Help with sysexin data processing (newbie)

maxista's icon

Hello all,
first time user and got stuck. I have a patch which receives Midi sysex from a host via the "sysexin" object. Now, the sysex messages are all 22 bytes long, and each contain a unique header (the first 5 bytes). There are 3 types of unique headers, hence type of messages. I am trying to send each to its own LCD screen for display. Since the "sysexin" object receives everything that comes in without distinction, I am trying to figure out if it is possible with creative use of the zl object, to route these messages based on their header type. What I have right now after the "sysexin" is a "zl group" object which creates lists of 22 (the length of each full sysex message) but I need after that a way to inspect the list, and use the 3 headers (each comprised of 5 bytes, which I know), to route each type of message to its proper LCD display.
Hopefully this is somewhat clear. Would appreciate any help.
Cheers.

pdelges's icon

You could use something like match 240 constr nn nn nn nn nn nn ... 247, where constr is the constructor's ID.

A couple of successive route may also be very usefull.

p

maxista's icon

Thanks a lot for the help Patrick! "match" is doing the trick. Best.