Page 1 of 1

Does anyone write a python JACK patchbay customized for one's own setup?

Posted: Wed Apr 03, 2019 1:24 am
by crocket
I searched for JACK patchbays. None of them satisfied my needs.
I don't want to see GUI. I want to route every JACK client to either speakers or headphones.
When I press a keyboard shortcut, I want every JACK client to switch between speakers and headphones.

It seems that it's easier to write a customized patchbay than to make existing patchbays do what I want.

I decided to write a very very simple JACK patchbay written in python and customized for my own setup.

Re: Does anyone write a python JACK patchbay customized for one's own setup?

Posted: Wed Apr 03, 2019 8:13 am
by gimmeapill
I don't think you need to re-implement something from scratch for switching between jack patchbay presets from a keyboard shortcut.
You can do that with qjackctl by using command line switches: " -a, --active-patchbay=[path] Set active patchbay definition file"
Then it should be just about mapping your keyboard shortcut. (I didn't check the other jack front ends, but they might have options as well).

One thing that could also become an issue are volumes spikes and pops when changing connections.
If so, you'd probably better off with a matrix mixer that does fade in/out or just using main/monitor switching function of most DAW mixers.

This was also discussed here not too long ago and a simple application was suggested (I didn't test it):
https://linuxmusicians.com/viewtopic.php?t=17909

What about this: http://aj-snapshot.sourceforge.net/

Very simple, just saves and restores your JACK connections from a text file..

Re: Does anyone write a python JACK patchbay customized for one's own setup?

Posted: Wed Apr 03, 2019 9:00 am
by crocket
gimmeapill wrote:I don't think you need to re-implement something from scratch for switching between jack patchbay presets from a keyboard shortcut.
You can do that with qjackctl by using command line switches: " -a, --active-patchbay=[path] Set active patchbay definition file"
Then it should be just about mapping your keyboard shortcut. (I didn't check the other jack front ends, but they might have options as well).

One thing that could also become an issue are volumes spikes and pops when changing connections.
If so, you'd probably better off with a matrix mixer that does fade in/out or just using main/monitor switching function of most DAW mixers.

This was also discussed here not too long ago and a simple application was suggested (I didn't test it):
https://linuxmusicians.com/viewtopic.php?t=17909

What about this: http://aj-snapshot.sourceforge.net/

Very simple, just saves and restores your JACK connections from a text file..


I looked into aj-snapshot before posting this thread. aj-snapshot doesn't do what I want.
qjackctl comes with a GUI which I don't want to see at all. I want a daemon that can be run on a headless server.

Re: Does anyone write a python JACK patchbay customized for one's own setup?

Posted: Thu Apr 04, 2019 2:41 pm
by nikgnomicradio
I looked into aj-snapshot before posting this thread. aj-snapshot doesn't do what I want.
qjackctl comes with a GUI which I don't want to see at all. I want a daemon that can be run on a headless server.

what do you require that is lacking from aj-snapshot?

aj-snapshot has a -d or --daemon option and would seem to me to be best option for headless server

only other way i used to manage JACK connections was with 'jack_connect' and 'jack_disconnect' commands
but that would require more additional scripting for features already in aj-snapshot or additional functionality you would want

agree qjackctl isn't a good option for headless server
but with a desktop environment, there is option to just have it in system tray
and there is also 'jack-select' package for systray icon that can switch between qjackctl profiles

Re: Does anyone write a python JACK patchbay customized for one's own setup?

Posted: Thu Apr 04, 2019 7:24 pm
by milk
some other options in the Routing and Routing snapshot sections on https://wiki.thingsandstuff.org/Audio#Routing

Re: Does anyone write a python JACK patchbay customized for one's own setup?

Posted: Thu Apr 04, 2019 11:15 pm
by crocket
nikgnomicradio wrote:what do you require that is lacking from aj-snapshot?


Regular expression match
Parser pattern match
Glob pattern match

Those are only available in source codes.

It also lacks the ability to selectively prohibit certain connections.