Targeting the audio device selected in GNOME settings by default using JACK via Pipewire?
Hi folks, thanks for all your work on Pipewire!
I'm using GNOME + Pipewire (0.3.25) (with ALSA, pulseaudio and JACK enabled) on NixOS along with various pro-audio applications. So far, the experience has been a massive improvement over trying to setup pulseaudio and JACK side-by-side manually!
One small inconvenience I've noticed is that some programs that target JACK don't always target the audio device that is selected in my GNOME Settings by default. Pure Data is an example of this. When I start Pure Data and select the JACK audio backend, I can see that a "pure_data" node appears within the qjackctl audio graph, however the output channels are not routed to any output device by default.
It would perhaps be convenient if the application's output channels were automatically routed to the device currently selected in the user's desktop environment settings (GNOME in my case) by default. This would save me opening qjackctl, opening the graph, and manually connecting the pure data node to the device I want to use every time I open pure data.
Another thought that comes to mind is that perhaps it might be useful to have a "Desktop Environment Selected Device" node or something along these lines in the JACK graph so that applications could just target that node, and then when the device is changed in the desktop environment settings audio was automatically routed to the newly selected device? That said, maybe it's not good practise to have a single node represent multiple different devices in the graph.
If there are existing or better solutions for either of these suggestions, please let me know! I'm relatively new to both JACK and Pipewire, and am unsure of the feasibility of certain things. I am aware that the GNOME desktop environment used to assume the presence of pulseaudio, which probably does not make the "selected device awareness" any easier for JACK-based applications. That said, if any project has the magical omnipresence necessary to make it work, I figure it would be pipewire :)
I've just noticed that curiously, Ardour seems to be aware of which device is selected in my GNOME settings and does route two "auditioner" channels to it immediately upon opening (though unfortunately I still have to manually route the two master output channels). This seems to suggest to me that it is up to the application to connect its own node to the selected desktop device node as necessary. In that case, how can a program like Ardour know what device is selected in GNOME settings without any awareness of pipewire? Or does pipewire perform some magic when a default device is requested via JACK, or something along these lines? Can Pure Data be configured to be similarly aware, or would this likely require submitting a patch upstream?