Re: [LAU] Starting a bunch of jack client

From: Robin Gareus <robin@email-addr-hidden>
Date: Thu Feb 19 2009 - 11:05:35 EET

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
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
Received on Thu Feb 19 12:15:02 2009

This archive was generated by hypermail 2.1.8 : Thu Feb 19 2009 - 12:15:02 EET