Mercurial > hg > mirex2013
changeset 14:0309fc159946
Run plugin from local path using transform file in local path
author | Chris Cannam |
---|---|
date | Mon, 02 Sep 2013 15:52:37 +0100 |
parents | 26bd1467211a |
children | bd1482e8c459 |
files | audio_beat_tracking/qm-tempotracker/qm-tempotracker.sh |
diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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" +