I’ve used this before but now all my SysEx Messages seem to get truncated to 240 Bytes, has something in JUCE changed to start truncating messages in sendMessageNow? I’ve tried three different MIDI interfaces in Windows but they are all doing the same thing, is it a Windows update perhaps?
@spiffo thanks for sharing. The team is a bit smaller over the Christmas and new year period so we might not be able to get back to this until the new year. In the mean time if you’re able to collect any more data, for example by doing a git bisect are you able to isolate the commit where this issues first shows up for you? that might help us when we come to look at this. Can I also assume you’re currently using the latest develop branch for testing?
Ok I’ve done some more testing and I think the problem might actually be to do with MidiView. I’ve changed my testing arrangement to use LoopMidi and MidiOx instead and I’m not seeing the truncated 240 byte issue anymore.
That 240-byte limit sounds suspiciously like a buffer/packet size mismatch, especially on Windows. I’ve found that some USB MIDI drivers struggle if the message isn’t a multiple of 3 or if it exceeds a certain threshold. If you’ve tried different interfaces and it’s still happening, it might be worth checking if maxPacketSize in the JUCE backend has shifted in the latest version. Definitely feels like a potential regression if this was working for you before.
Please could you confirm whether this worked at some point in the past with MidiView?
I tested sending a 256-byte sysex buffer from two apps built with JUCE 6.1.6 and JUCE 8.0.11 (develop) respectively. In both cases, MidiView 1.2.0 reports the length of the sysex message as 240 bytes, and the transmitted message is missing the final bytes of the message including the terminating 0xf7.
I tested this first this on a retail copy of Windows 11 with all available updates, version 25H2, build 26200.7462, experience “Windows Feature Experience Pack 1000.2611.275.0”. I also tested on a machine running Windows 10, version 22H2, build 10945.6456.
On both machines, I saw the truncation behaviour that you described, both for JUCE 6 and JUCE 8. So, this issue seems to be independent of the JUCE version and the Windows version.
I then tried installing LoopMIDI on the Windows 10 machine, and connecting the JUCE app to a virtual LoopMIDI port, and using MidiView to log the messages sent to that port. In this case, the full sysex message was logged successfully. Therefore, I believe this to be a bug in the implementation of MidiView’s built-in input port.
I am absolutely sure that MidiView it used to work fine even with very long SysEx Messages of thousands of bytes. I couldn’t tell you when it stopped working though as I dropped my project for a while and there have been a couple of updates on JUCE since then.