[LAU] Starting a bunch of jack client

Robin Gareus robin at gareus.org
Thu Feb 19 04:05:35 EST 2009


thomas skellund wrote:
> How do I start say 5 small jack applications and connect them all as i
> wish?
> 
> Im thinking:
> 
> 1. Start qjackCtl with appropiate client bindings set i Patchbay
> 2. Start clients with script
>
> What's better or smarter you think?

You don't need qjackctl's patchbay - a simple shell script will suffice.
There's jack_connect, jack_lsp and jack_disconnect.

a simple example looks like this:
-=-=-=-=-=-=-=-=-
#!/bin/bash
# re-start jackd
killall jackd && sleep 1
sh ~/.jackdrc &
sleep 3 # wait until jackd has started
jack_lsp >/dev/null || (echo "could not start jackd"; exit;)
#start jack client apps. eg:
jack_metro -b 80 &
# connect ports
sleep 1 # wait until clients are ready
jack_connect 'metro:80_bpm' 'system:playback_1'
jack_connect 'metro:80_bpm' 'system:playback_2'
#
echo "running."
while true; do
# restart this script if a client dies
jack_lsp | grep metro || exec $0
sleep 5
done
-=-=-=-=-=-=-=-=-

Of course the error checking can become smarter, ie. only re-start the
app that has quit instead of the whole jackd and re-run the jack_connect
part.. YMMV.

have fun,
robin



More information about the Linux-audio-user mailing list