[ardour-users] Bash Script for ardour and aconnect
Allan Klinbail
sonofzev at iinet.net.au
Sat Jan 13 21:03:36 PST 2007
The script below comes from
http://ardour.org/manual/control_surfaces/bcf2000
It works for startup but not for shutdown, however your ardour MIDI
ports should disappear when you shut down. This only works for ardour
0.99.x as with ardour2 there are two devices both called ardour.
cheers
Allan
------------------------------------------------------------------------------------------
#!/bin/ksh
# /usr/local/bin/start_ardour.sh
#
# April 17, 2005 - Joe Hartley (jh at brainiac.com)
# A quick script to start Ardour and then make the MIDI connections between
# the BCF2000 and Ardour.
# start Ardour and give it a little time before setting the MIDI connections
nohup /usr/bin/ardour &
sleep 3
# Set the IDs - note that they'll both end with a colon
BCF_ID=$(aconnect -o | grep BCF2000 | grep client | awk '{print $2}')
ARD_ID=$(aconnect -o | grep ardour | awk '{print $2}')
aconnect "$BCF_ID"0 "$ARD_ID"0
aconnect "$ARD_ID"0 "$BCF_ID"0
-----------------------------------------------------------------------------------
On Sun, 2007-01-14 at 11:14 +1030, Andrew Johnston wrote:
> Hi,
> I was wondering if anybody could help me write a bash script that I
> could call say 'ardour2mmc' that would launch ardour and then run
> aconnect to connect the midi ports to my hardware, and then once
> ardour quit, disconnect the ports. I know the commands needed, but
> not sure how to make the script wait for ardour to close before
> issuing the disconnect commands. I guess some kind of 'if then' or
> 'while' loop is what's needed, but I have no idea how to make that
> work. The aconnect commands I need are as follows
> when ardour/ardour2 launches
> aconnect -e 129:0 16:0 & acconect -e 16:0 129:0
> then when it quits
> aconnect -d 129:0 16:0 & aconnect -d 16:0 129:0
>
> Thanks,
>
> Andy J
>
>
> _______________________________________________
> ardour-users mailing list
> ardour-users at lists.ardour.org
> http://lists.ardour.org/listinfo.cgi/ardour-users-ardour.org
More information about the Ardour-Users
mailing list