Starting guitarix and its connections to jack by script

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
Thomas_Harp
Established Member
Posts: 3
Joined: Tue Nov 20, 2018 9:22 pm

Starting guitarix and its connections to jack by script

Post by Thomas_Harp »

Hey together,
I use kxstudio with kde.

I want to start Guitarix by script in maximized view
and I want to establisch my micro connection and jack connection also by script after guitarix has started.

This is my script one to start guitarix:

#!/bin/bash
kstart --maximize guitarix &
exit

and my script for the jack connections:
#!/bin/bash
jack_connect system:capture_2 gx_head_amp:in_0 &
jack_connect gx_head_amp:out_0 system:playback_2 &
jack_connect gx_head_amp:out_0 system:playback_1 &
exit

both scripts I placed in /etc/init.d

and i registered both scripts in system settings automated starts.

in the terminal both scripts work fine. But when its starting the guitarix is not in full view mode started and the connection to jack havent been establised.

I hope you could help me here.

Thanks,
Thomas
Last edited by Thomas_Harp on Fri Nov 23, 2018 10:05 am, edited 1 time in total.
tramp
Established Member
Posts: 2347
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 466 times

Re: Starting guitrix and its connections to jack by script

Post by tramp »

Hi

Can't really help you with the maximised view, but for the connections, usually guitarix remember it's connections and re-establish them on next start, so no script should be needed for that.
The maximised view is a desktop thingy, maybe you should place your scripts in the users autostart folder instead in /etc/init.d as that ensure that your desktop and user environment is fully loaded.

regards
hermann
On the road again.
Luc
Established Member
Posts: 741
Joined: Fri Mar 27, 2015 1:04 pm
Been thanked: 1 time

Re: Starting guitrix and its connections to jack by script

Post by Luc »

Can someone please fix this title? It's bad for people who search for topics with a search filtered by titles.
Thomas_Harp
Established Member
Posts: 3
Joined: Tue Nov 20, 2018 9:22 pm

Re: Starting guitarix and its connections to jack by script

Post by Thomas_Harp »

Hey Herman, thanks, I will check the result when the scripts are in the Autorun folder this evening. Regards Thomas
Luke1993
Posts: 1
Joined: Thu Jul 23, 2020 4:52 am

Re: Starting guitarix and its connections to jack by script

Post by Luke1993 »

Hey, I'm creating a shell script to start jack and guitarix also. I was able to get it working with the following script:

qjackctl & # start Jack with GUI
guitarix & # open guitarix for guitar - distortion
guitarix & # open guitarix for vocals - clean
sleep 3 # pause so jack has time to setup connections
jack_disconnect -s default system:capture_2 gx_head_amp-01:in_0 & # remove that one
exit

Guitarix sets up default connections on startup but i don't know how to modify them, and my default connections always have one connection i don't want, so I needed to use the jack_disconnect command. before I added "-s default" to it I was getting the error:
Cannot connect to server request channel
...

So if anyone reading this is getting the same error:
start Jack manually
go to Setup
and in the Setting tab rename Preset Name to "default" (or whatever you want)
and add "-s <name>" to any jack_disconnect, jack_connect, ect. commands in your script to specify the server name.

I also needed to add the "sleep 3" command before jack_disconnect in order to pause the script for 3 seconds so the default connections can be setup before you mess with them.
tramp
Established Member
Posts: 2347
Joined: Mon Jul 01, 2013 8:13 am
Has thanked: 9 times
Been thanked: 466 times

Re: Starting guitarix and its connections to jack by script

Post by tramp »

A simple solution would be to give your guitarix instances a name,
so

Code: Select all

 guitarix -n Distortion 
and

Code: Select all

guitarix -n Vocals
will start a separated instance of guitarix with it's own configuration, so you avoid interferences between the instances. Both instances will start then with it's last, own, used settings (including there connections).
More on that, you could configure the guitarix intern jack start helper to start Qjackctl, so you just need to start both guitarix instances and the first instance of guitarix will start Qjackctl for you and both guitarix instances will do the connections you used to use.
On the road again.
Post Reply