Hello folks!
One question, I hope it's not too dumb. :-(
If you have your average patchbay, how does it know, when new MIDI/audio
ports/clients come to live or die? And how does it know, that some
connection was killed by some other application.
Does it simply query it all the time? I wouldn't think so... But perhaps
I'm wrong...
For ALSA MIDI sequencer, the patchbay program can create an input sequencer
port, and subscribe it to System:announce (0:1) to receive ALSA notifications
about these events: client start/exit, port start/exit, port
subscribed/unsubscribed. You can try this with aseqdump, like the following
sample session:
$ aseqdump -p 0:1
Waiting for data. Press Ctrl+C to end.
Source Event Ch Data
0:1 Port subscribed 0:1 -> 128:0
0:1 Client start client 129
0:1 Client start client 130
0:1 Port start 129:0
0:1 Port start 130:0
0:1 Client start client 131
0:1 Port start 131:0
0:1 Port subscribed 129:0 -> 131:0
...
0:1 Port unsubscribed 129:0 -> 131:0
0:1 Port exit 129:0
0:1 Client exit client 129
0:1 Port exit 130:0
0:1 Client exit client 130
0:1 Port exit 131:0
0:1 Client exit client 131
...
Regards,
Pedro