Does MIDIOut.sysex behave compatibly across Mac, Windows and Linux?
I’ve tried Linux – no problem if the Int8Array begins with 0xF0 and ends with 0xF7.
I’m not able to try Mac or Windows at the moment.
The help file says “On Windows, the function call must contain a full sysex message. In other words, it must start with 0xF0 (240 or -16) and end with 0xF7 (247 or -9)” – same as Linux. But the note’s specificity (“on Windows”) suggests that Mac may be different… without actually confirming … which… well, I guess I’ll update that after getting an answer.
Could someone confirm?
This is for a quark I’m preparing. I would like the user not to have to worry about this detail – just provide the data between the bookends and let the system format it properly for the OS.
Launch recent Pd (that listbox is in Pd 0.52 – maybe not in 0.51 – don’t use an older version for this).
Open the pd file.
Since this is Mac, turn on IAC MIDI (Audio MIDI Setup).
Pd > Media > MIDI Settings and receive from IAC.
In SC:
MIDIClient.init;
// I think...? Not on Mac, I can't test
m = MIDIOut(MIDIClient.destinations.detectIndex { |endpt| endpt.device.containsi("IAC") });
// if this worked, you would see the message in the Pd list box
m.sysex(Int8Array[1, 2, 3]);
// or here
m.sysex(Int8Array[0xF0, 1, 2, 3, 0xF7]);
In Linux, the first sysex output (without delimiters) displays nothing, but the second shows 240 1 2 3 247 (ok!).
Would really appreciate it if someone could try on a Mac.
I just tested this, and it produces the same behavior for me. m.sysex(Int8Array[1, 2, 3]); doesn’t display anything, but the second causes 240 1 2 3 247 to pop up in the message box.