3

I need to diagnose a weird symptom where spurious MIDI messages might be sent to a specific piece of MIDI hardware which is connected via USB. I don't know about software which allows monitoring MIDI output straight away, and because the external hardware is connected via USB MIDI, I cannot wire the physical output to anywhere else.

Is there a (possibly not so obvious) way of sniffing outbound MIDI traffic?

It's okay if "programming" is needed (Python is my friend).

6
  • What software sends these messages? How can its output port be configured?
    – CL.
    Apr 1, 2020 at 20:06
  • The point is that I'm not aware of any software sending messages to the output. I've not connected anything to the output. So if anything is sent, it's happening "under the grass". That's why I'd like to see what is being sent to the output, or make sure that there's indeed nothing sent. Apr 5, 2020 at 18:19
  • Use lsof /dev/snd/* to check what programs have opened a MIDI or sequencer device.
    – CL.
    Apr 5, 2020 at 20:25
  • Thanks @CL. for the idea. Only Pulseaudio was listed. I killed it, and none of the devices were reported as opened any more. Still, MIDI hardware misbehaves unless the input from it is connected to QMidiRoute. Apr 7, 2020 at 16:39
  • I guess this device misbehaves if the messages are not actually read by the PC.
    – CL.
    Apr 7, 2020 at 19:38

2 Answers 2

2

Maybe midisnoop is helpful:

sudo apt-get install midisnoop
2

I was also surprised after many websearches, that while inbound MIDI is easy to monitor in Linux, outbound isn't.

You mentioned your MIDI is transported over USB. I just very successfully used Wireshark USB capture to reverse engineer MIDI device comms (manufacturer-specific SYSEX messages). You can use filters to only show MIDI events (or even more specific MIDI packet types)

WARNING: plug the USB device in AFTER you've started the capture in Wireshark, because Wireshark needs to see the USB "handshake" (USB descriptor messages) to be able to dissect the messages, otherwise it's just opaque USB data whose protocol Wireshark doesn't know about.

edit: here's a blog post of mine describing things in greater detail

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .