While trying out Linux mastering audio effect chains using jackrack and other programs, I had to start up 10 multiband compressor units and other programs and lay connections using the the Jack audio tools, without laying dozens of audio connections by hand, so I tried using a Tcl script to see if that would work and what the difficulties would be:
set u onebandco for {set i 1} {$i<=10} {incr i} { after 2000 exec jack-rack -c 2 -s $i /home/theo/Jackrack/${u}b$i & } catch { exec meterbridge -t dpm -n bridge -r 0 1 2 3 4 5 6 7 8 9 10 & exec jack-rack -c 2 -s aaa /home/theo/Jackrack/10bandinoutloudness2 & exec jack-rack -c 2 -s par /home/theo/Jackrack/10bandpar2 & } after 5000 for {set i 1} {$i<=10} {incr i} { catch "exec jack_connect jack_rack_$i:out_1 bridge:meter_$i" catch "exec jack_connect jack_rack_$i:out_2 bridge:meter_$i" } for {set i 1} {$i<=10} {incr i} { catch "exec jack_connect jack_rack_$i:out_1 jack_rack_par:in_1" catch "exec jack_connect jack_rack_$i:out_2 jack_rack_par:in_2" } for {set i 1} {$i<=10} {incr i} { catch "exec jack_connect jack_rack_aaa:out_1 jack_rack_$i:in_1" catch "exec jack_connect jack_rack_aaa:out_2 jack_rack_$i:in_2" }
The above script works, but it doesn't check when the started programs are ready to lay connections to (the jack conenection part has have had to run) it simply delays an amount of time to make sure the processing programs and their UI's have started up with X windows.
An impression of the result:
Clearly, before I could use BWise for similar and more tasks like this I need to check out jack-connections and communicate the results back to tcl (tk), maybe I'll try a hack to check the output of the programs (they report on stdout), and then make sure they continue to run after the startup script has terminated.
Sep 1 '11 TV I made a more complicated reverse-mastering chain with this script which contains "waits" fro when jack-rack applications are execed which require the user to press "ok" for a non-realtime effect and it lists PIDs of some more Linux effects startedup and connected:
set u ./ catch { exec meterbridge -t dpm -n out -r 0 1 2 & exec meterbridge -t dpm -n om -r 0 1 2 & exec jack-rack -c 2 -s 4cdplay 4cdplay & } gets stdin after 1000 catch { exec jack-rack -c 2 -s del2 del2 & exec jack-rack -c 2 -s del3 del3 & exec jack-rack -c 2 -s lexret lexret & } after 1000 catch "exec jack_connect jack_rack_4cdplay:out_1 jack_rack_del2:in_1" catch "exec jack_connect jack_rack_4cdplay:out_2 jack_rack_del2:in_2" append o [exec jack-rack -c 2 -s fb2 fb2 &] " " gets stdin after 500 catch "exec jack_connect jack_rack_4cdplay:out_1 jack_rack_fb2:in_1" catch "exec jack_connect jack_rack_4cdplay:out_2 jack_rack_fb2:in_2" after 500 append o [exec jamin -c 2 -p -n jam -f default.jam &] " " after 1000 catch "exec jack_connect jack_rack_fb2:out_1 jam:in_L" catch "exec jack_connect jack_rack_fb2:out_2 jam:in_R" after 500 append o [exec jack-rack -c 2 -s ofb2 ofb2 &] " " after 1000 catch "exec jack_connect jam:out_L jack_rack_ofb2:in_1" catch "exec jack_connect jam:out_R jack_rack_ofb2:in_2" gets stdin after 1000 for {set i 1} {$i<=4} {incr i} { after 500 append o [exec jack-rack -c 2 -s dc$i ${u}dc${i} &] " " gets stdin } catch { exec meterbridge -t dpm -n bridge4 -r 0 1 2 3 4 & #exec jack-rack -c 2 -s cic ${u}cic & #exec jack-rack -c 2 -s cdplay2 ${u}cdplayc & exec jack-rack -c 2 -s cdplay2 cdplay2 & exec jack-rack -c 2 -s louc ${u}louc & } after 1000 catch "exec jack_connect jack_rack_del2:out_1 jack_rack_cdplay2:in_1" catch "exec jack_connect jack_rack_del2:out_2 jack_rack_cdplay2:in_2" after 1000 catch "exec jack_connect jack_rack_ofb2:out_1 jack_rack_cdplay2:in_1" catch "exec jack_connect jack_rack_ofb2:out_2 jack_rack_cdplay2:in_2" for {set i 1} {$i<=4} {incr i} { catch "exec jack_connect jack_rack_dc$i:out_1 bridge4:meter_$i" catch "exec jack_connect jack_rack_dc$i:out_2 bridge4:meter_$i" } for {set i 1} {$i<=4} {incr i} { catch "exec jack_connect jack_rack_dc$i:out_1 jack_rack_louc:in_1" catch "exec jack_connect jack_rack_dc$i:out_2 jack_rack_louc:in_2" } for {set i 1} {$i<=4} {incr i} { catch "exec jack_connect jack_rack_cdplay2:out_1 jack_rack_dc$i:in_1" catch "exec jack_connect jack_rack_cdplay2:out_2 jack_rack_dc$i:in_2" # catch "exec jack_connect jack_rack_vol1:out_1 jack_rack_dc$i:in_1" # catch "exec jack_connect jack_rack_vol1:out_2 jack_rack_dc$i:in_2" } catch "exec jack_connect jack_rack_ofb2:out_1 om:meter_1" catch "exec jack_connect jack_rack_ofb2:out_2 om:meter_2" catch "exec jack_connect jack_rack_louc:out_1 jack_rack_del3:in_1" catch "exec jack_connect jack_rack_louc:out_2 jack_rack_del3:in_2" catch "exec jack_connect jack_rack_del3:out_1 out:meter_1" catch "exec jack_connect jack_rack_del3:out_2 out:meter_2" catch "exec jack_connect jack_rack_lexret:out_1 out:meter_1" catch "exec jack_connect jack_rack_lexret:out_2 out:meter_2" puts $o
I know there should be a BWise connection but I didn't get to that (though jack_lsp should work) so if someone feels like it...
People interested in what I use this TCL script for, see here: http://www.theover.org/Prod/studiosound.html .
Dec 10 '16 TV I've made the following a little more interesting startup script with an adapted version of jack-rack, which allows for using tcl for parameterizing the locations of the windows:
# # # # Directory (possibly relative) with "current" instances of jack-racks set u ./Current/ for {set i 1} {$i<=10} {incr i} { after 400 append o [exec jack-rack -c 2 -s loudfilter$i ${u}filter$i -x [expr 500+$i*20] -y [expr 50+$i *30] -l 350 -w 450 &] " " } for {set i 1} {$i<=10} {incr i} { after 400 append o [exec jack-rack -c 2 -s loudcosu$i ${u}comprsubtr$i -x [expr 900+$i*20] -y [expr 50+$i *30] -l 600 -w 450 &] " " } catch { exec meterbridge -t dpm -n loudbridge -r 0 1 2 3 4 5 6 7 8 9 10 & ##set i 0 exec jack-rack -c 2 -s loudin ${u}loudin -x [expr 700+$i*20] -y [expr 50+[incr i] *30] -l 400 -w 450 & exec jack-rack -c 2 -s loudout ${u}loudout -x [expr 700+$i*20] -y [expr 50+[incr i] *30] -l 400 -w 450 & exec jack-rack -c 2 -s passhalf ${u}pass_half -x [expr 700+$i*20] -y [expr 50+[incr i] *30] -l 400 -w 450 & } after 1000 catch "exec jack_connect jack_rack_loudin:out_1 jack_rack_passhalf:in_1" catch "exec jack_connect jack_rack_loudin:out_2 jack_rack_passhalf:in_2" catch "exec jack_connect jack_rack_passhalf:out_1 jack_rack_loudout:in_1" catch "exec jack_connect jack_rack_passhalf:out_2 jack_rack_loudout:in_2" after 1000 for {set i 1} {$i<=10} {incr i} { catch "exec jack_connect jack_rack_loudfilter$i:out_1 loudbridge:meter_$i" catch "exec jack_connect jack_rack_loudfilter$i:out_2 loudbridge:meter_$i" catch "exec jack_connect jack_rack_loudcosu$i:out_1 loudbridge:meter_$i" catch "exec jack_connect jack_rack_loudcosu$i:out_2 loudbridge:meter_$i" } for {set i 1} {$i<=10} {incr i} { catch "exec jack_connect jack_rack_loudin:out_1 jack_rack_loudfilter$i:in_1" catch "exec jack_connect jack_rack_loudin:out_2 jack_rack_loudfilter$i:in_2" } for {set i 1} {$i<=10} {incr i} { catch "exec jack_connect jack_rack_loudfilter$i:out_1 jack_rack_loudcosu$i:in_1" catch "exec jack_connect jack_rack_loudfilter$i:out_2 jack_rack_loudcosu$i:in_2" } for {set i 1} {$i<=10} {incr i} { catch "exec jack_connect jack_rack_loudfilter$i:out_1 jack_rack_loudout:in_1" catch "exec jack_connect jack_rack_loudfilter$i:out_2 jack_rack_loudout:in_2" } for {set i 1} {$i<=10} {incr i} { catch "exec jack_connect jack_rack_loudcosu$i:out_1 jack_rack_loudout:in_1" catch "exec jack_connect jack_rack_loudcosu$i:out_2 jack_rack_loudout:in_2" } The script start up a Equal Loudness Curve related set of filters/dynamics processing. Screenshot