You are here

Add new comment

In case anyone else would find it useful, the script below, when combined with an appropriate template file, will create a new session from the template, named after the date-time, and open it in qtractor, ready for recording with no further ado. You should edit the variables per your own preferences.
---------------------------------------------------------------------------------------------------
#!/bin/bash

SESSION_NAME=`date +%Y%m%d-%H%M`

QTRACTOR_DIR="$HOME/qtractor"

SESSION_DIR="$QTRACTOR_DIR/$SESSION_NAME"

SESSION_FILE="$SESSION_DIR/$SESSION_NAME.qtr"

TEMPLATE_FILE="$HOME/.config/rncbc.org/template.qtt"

mkdir $SESSION_DIR

sed \
-e "s/<session version=\"\([^\"]*\)\" name=\"[^\"]*\">/<session version=\"\1\" name=\"$SESSION_NAME\">/" \
-e "s?<directory>.*</directory>?<directory>$SESSION_DIR</directory>?" \
$TEMPLATE_FILE > $SESSION_FILE

qtractor "$SESSION_FILE" &