Large SysEx get split in a bad way


#1

When i receive large sysex messages (> 256 bytes), the messages get split, this wouldn’t be a problem if the correct callback got called but it never does:
the code is very simple it just prints the raw data in hex form to the console, as you can see the 2nd call is invalid, it should fail since the block of data
is not a valid SysEx message (how come the MidiMessage constructor is not asserting about that? it does about other smaller stuff).

[debug](4937574.36) CtrlrMidiDevice::handleIncomingMidiMessage
[debug] RAW:[f0 01 25 03 00 24 30 07 00 01 00 18 00 34 01 00 01 00 00 00 00 02 00 05 00 00 00 00 00 7f 48 7f 01 7f 00 00 00 00 37 41 57 00 7f 00 00 00 00 1d 62 62 33 46 10 00 00 00 00 21 00 2d 00 0d 01 46 00 00 00 00 00 46 00 00 00 00 09 7f 00 00 00 00 55 39 51 00 00 00 00 00 00 00 00 0c 21 27 09 14 7f 09 23 0c 01 09 2b 00 00 00 00 00 00 00 37 64 01 78 01 02 00 00 00 01 1a 03 00 00 00 05 3e 64 5f 00 00 00 00 00 00 00 00 00 13 3c 00 00 00 00 00 00 00 00 00 1d 07 7e 00 00 00 00 00 00 00 00 00 00 1e 00 00 00 00 00 00 00 00 18 00 00 7e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 41 6d 62 75 73 00 68 20 20 20 20 20 20 00 20 20 20 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00]
[debug](4937587.07) CtrlrMidiDevice::handleIncomingMidiMessage
[debug] RAW:[00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f7]

Anyway the handlePartialSysexMessage never gets called.

And would it be possible to pack those messages into one call, like other platforms (with a sysex constructed out of all partials).

I was trying to do:

forInput    ? snd_seq_set_input_buffer_size (seqHandle, 16 * 1024)
                                    : snd_seq_set_output_buffer_size (seqHandle, 1024);

somewhere in AlsaPort iterateMidiClient() call at line 337 (the value 16*1024 is taken from the MidiInputThread run() code), but that doesn’t help.

I’m on Linux Mint 15.0, kernel is 3.8.0-something, 64bit


#2

Damn… I really don’t know - that linux midi code was mostly contributed by other people, I’m not too clear on how it all works. Am too deep in other things right now to delve into something as murky as this, but keep me posted…