Hello Mark.
OK, I did the test with a fresh reboot.
1) In terminal, load
amidi (OK, loaded):
2) In other terminal, load
vkeybd (OK, loaded)
3) In other terminal, check devices with
aconnect -l ~> aconnect -l
client 0: 'System' [type=kernel]
0 'Timer '
Connecting To: 142:0
1 'Announce '
Connecting To: 142:0
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 128: 'FLUID Synth (1086)' [type=user,pid=1086]
0 'Synth input port (1086:0)'
client 129: 'Client-129' [type=user,pid=17057]
0 'Virtual RawMIDI '
client 131: 'Virtual Keyboard' [type=user,pid=17076]
0 'Virtual Keyboard'
client 142: 'PipeWire-System' [type=user,pid=1087]
0 'input '
Connected From: 0:1, 0:0
client 143: 'PipeWire-RT-Event' [type=user,pid=1087]
0 'input
4) In previous terminal 3), connect the keyboard with your
MidiFilter:
> MidiFilter-x86_64-linux-gtk2 -d 131:0 142:0
Subscribing 1 sources, PID 17120
5) Playing some notes on the
vkeybd keyboard, here the result from the waiting
amidi first terminal 1):
> amidi -p virtual -d
90397F
803900
903C7F
803C00
903E7F
803E00
90407F
804000
90417F
804100
90437F
804300
90437F
804300
90457F
Conclusion: your code works, let go further...
Fre;D