Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Post by arifd »

So for some reason when I start JACK from Cadence, My PulseAudio apps stop working until I run this command:

Code: Select all

pactl set-default-sink jack_out && pactl set-default-source jack_in
QjackCtl has the ability to run scripts before/after starting JACK etc. If I can run that, everything would be good. Don't want to have to do it manually every time.

Edit: Look at this... kinda strange: Image Gonna reboot and see what's up.
p.s. what does playback mode only do? (I'd assume it would make only PulseAudio output (can never remember if that is sink or source) available, but with that enabled, I still see both sink and source options in the JACK connection bay.
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Post by LAM »

I prefer to use Qjackctl over Cadence.
Also, I prefer not to use ALSA midi, so i'm exporting ALSA ports with a2j and then stop it on shutdown.

This is the command I put in Qjackctl settings after jack start:

Code: Select all

pactl load-module module-jack-sink channels=2; pactl load-module module-jack-source channels=2; pacmd set-default-sink jack_out; a2jmidid -e &
and this is before shutdown:

Code: Select all

a2j_control --stop; a2j_control --exit
Never had any problems after that. :D

in mix, nobody can hear your screen

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Post by arifd »

Thanks LAM, yeah I think I'm going to prefer QjackCtl also.

If i apt install QjackCtl, will it pull in JACK etc automatically? what's the apt command to have a proper install of QJackCtl, and JACK2?

I get a weird bug where JACK just becomes silent randomly, and it has something connected with the cadence 'switch master' button.

Also, look. started Jack, no PulseAudio now broken, and Cadence now tells me 'PulseAudio is started and bridged to JACK' (no it's not).
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Post by LAM »

What's your distro?

On Debian:

Code: Select all

sudo apt install qjackctl jackd2

in mix, nobody can hear your screen

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Post by arifd »

I'm working in Lubuntu, so yeah debian based. Thanks for the swift response!!
arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Post by arifd »

Hi @LAM, I'm working on a setup script that will set everything up (including other performance tweaks) from a fresh lubuntu installation. Will share when ready :D

I need to get commandline access to the qjackctl configuration so that I can add commands from the commandline into qjackctl.

There is a ~/.config/rncbc.org/QjackCtl.cofnf that has what I need...

Code: Select all

PostShutdownScript=false
PostShutdownScriptShell=
PostStartupScript=false
PostStartupScriptShell=
etc

But it's not persistent/gets rewritten every time the app opens... why!?

Here's what https://qjackctl.sourceforge.io/ says about it:
QjackCtl holds its settings and configuration state per user, in a file located as $HOME/.config/rncbc.org/QjackCtl.conf. Normally, there's no need to edit this file, as it is recreated and rewritten everytime qjackctl is run
:roll:
User avatar
LAM
Established Member
Posts: 992
Joined: Thu Oct 08, 2020 3:16 pm
Has thanked: 141 times
Been thanked: 349 times

Re: Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Post by LAM »

It is rewritten every time, but if you modify the file when is not running it should retain your changes. :wink:

in mix, nobody can hear your screen

arifd
Established Member
Posts: 65
Joined: Sun Nov 29, 2020 11:09 am

Re: Execute script after Cadence starts JACK? (SImilar to QjackCtl?)

Post by arifd »

oh stupid me, yeah, that worked ;)
Post Reply