Smart ardour2 launcher

Hi everyone :slight_smile:

I’m just loving ardour and can’t wait for 3 to come out.

Meanwhile I wanted to give back to the community. Ardour2 as far as I know doesn’t have support for a default sessions folder and in the forums I saw some people asking for this. This script solves that.

Usage:

# opens up ardour normally ardour # opens the session with that name or creates it if it doesn't exist ardour SessionName
The sessions are created from a template so you can tweak how your workflow begins!

Script:

#! /bin/bash

Script to create new ardour sessions in a default folder from a customizable template

by Alberto Ferreira

26/08/2011

###########################################
####### CUSTOMIZE YOUR SETTINGS HERE #######

ardour_exe=“ardour2”
default_folder="/home/a/Audio/audio-projects" #Set this to your desired sessions folder

#################################################

ardour_session_template="${default_folder}/template"

NO_TEMPLATE_ERROR_MESSAGE="\n
ERROR: No template session was found.\n
This script creates new sessions from that one.\n\n
To get a bare session open up ardour and create a new session\n
named “template” and save it in your default folder.\n
(remember to set it in the script)\n\n

If you so wish you can later customize the template session\n
from which new sessions are created.\n"

cwd=pwd

if [ ! -z “$1” ]; then
[ ! -d “$ardour_session_template” ] && echo -e $NO_TEMPLATE_ERROR_MESSAGE && exit

new_project="${default_folder}/${1}"


if [ ! -d "$new_project" ]; then
echo "Creating new project: ${new_project}"
cp -R $ardour_session_template $new_project
cd $new_project
mv "template.ardour" "${1}.ardour"
rm ./*.bak
mv "template.history" "${1}.history"
else
echo "Session already exists. Opening"
fi

$ardour_exe $new_project

else
echo -e “\nStarting ardour\n”
$ardour_exe
fi

cd $cwd

Instalation steps (skip reading if you know how it's done)

Save the script to a file then run the following commands.

(Note: I use ardour instead of exe because in my computer ardour’s executable is called ardour2 and so there are no problems. Anyways, change “exe” to what you want. You’ll use that to call the launcher)

sudo cp script /usr/local/bin/exe sudo chmod +x /usr/local/bin/exe

If you have any doubts or suggestions don’t be shy :wink:
Hope you like it and it’s useful