Binary package “gmidimonitor” in ubuntu jammy
GTK+ application that shows MIDI events
GMIDImonitor is GTK+ application that shows MIDI events.
.
You need to connect desired source of MIDI events to gmidimonitor
input using some kind of patchbay like qjackctl, patchage. For
restoring connections (not connecting every time) you can use LASH.