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).
lsof /dev/snd/*
to check what programs have opened a MIDI or sequencer device.