How to receive a MIDI Sysex from a device (Mac OS)

I am sending SysEx’s to the device on Xojo using the MIDISysexSendRequestMBS class.
I know it is successful, because SysEx Librarian detects incoming SysEx’s from the device in response to my instructions.

The question is, how to receive these in my own Xojo application?

Try posting to the Add-Ons category for MBS stuff, or to the MBS mailing list for best response.

You would receive them on an MidiEndpointMBS with a packet list.
And I think you join the DataMemory part of all the MidiPacketMBS objects to get the sysEx data.

1 Like

Some data started arriving when I created a Handler for the inputPort’s Read Event.
However, it is broken up into packets of 3 bytes, and sometimes out of sequence! Below is my event Handler for the Read function (packet_list is the variable I use to analyse the Midi messages I am receiving).

readData(port As MidiPortMBS, endpoint As MidiEndpointMBS, list as MidiPacketListMBS)

packet_list = list

Verifying the input, e.g like so:

p_string = EncodingToHexMBS(packet_list.Item(index).DataString)`

and then printing the output gives various results in sometimes correct order, e.g. F0 00 02, 1C 4E F7, 02 04 F7.
Meanwhile Sysex Librarian correctly identifies each message as a 9 hex-value sequence.