# HG changeset patch # User Chris Cannam # Date 1378133557 -3600 # Node ID 0309fc15994666d6b5b0f082f62c597ee3f59bda # Parent 26bd1467211ac7bac3156076a3ddb6b63c2541b5 Run plugin from local path using transform file in local path diff -r 26bd1467211a -r 0309fc159946 audio_beat_tracking/qm-tempotracker/qm-tempotracker.sh --- a/audio_beat_tracking/qm-tempotracker/qm-tempotracker.sh Mon Sep 02 15:45:47 2013 +0100 +++ b/audio_beat_tracking/qm-tempotracker/qm-tempotracker.sh Mon Sep 02 15:52:37 2013 +0100 @@ -1,5 +1,22 @@ # runs sonic annotator using the specified transform file (-t) # input file: $1 # output file: $2 -sonic-annotator -t qm-tempotracker.ttl -w csv --csv-stdout "$1" | cut -d, -f2 > "$2" +mydir=`dirname "$0"` +infile="$1" +outfile="$2" + +if [ t"$infile" = "t" ] || [ t"$outfile" = "t" ]; then + echo "Usage: $0 infile.wav outfile.txt" + exit 2 +fi + +echo "Processing input WAV file $infile, writing results to $outfile..." 1>&2 + +VAMP_PATH="$mydir" sonic-annotator \ + -t "$mydir"/qm-tempotracker.ttl \ + -w csv --csv-stdout --csv-separator ';' \ + "$infile" \ + | cut -d';' -f2 \ + > "$outfile" +