This fixes a long-standing bug with midiout on ALSA, which would just output malformed 1-byte "sysex" messages for each byte that goes into midiout. The bug affects all Linux versions of Pd, in all flavors. For a test witness, run the cyclone/seq-help.pd patch and hook it up to kmidimon or qmidiroute to see the MIDI output. The new implementation proposed here does the necessary buffering and parsing using the appropriate ALSA routines to emit proper MIDI messages. It also works fine with system realtime and exclusive messages.
This fixes a long-standing bug with midiout on ALSA, which would just output malformed 1-byte "sysex" messages for each byte that goes into midiout. The bug affects all Linux versions of Pd, in all flavors. For a test witness, run the cyclone/seq-help.pd patch and hook it up to kmidimon or qmidiroute to see the MIDI output. The new implementation proposed here does the necessary buffering and parsing using the appropriate ALSA routines to emit proper MIDI messages. It also works fine with system realtime and exclusive messages.