annotate segmentation.sh @ 0:4182672fd6f8
Initial commit of files from the mauch-MIREX directory on octave
author |
Chris Cannam |
date |
Tue, 24 Apr 2012 11:52:05 +0100 |
parents |
|
children |
|
rev |
line source |
Chris@0
|
1 #!/bin/bash
|
Chris@0
|
2 infile="$1"
|
Chris@0
|
3 outfile="$2"
|
Chris@0
|
4 before="$(date +%s)"
|
Chris@0
|
5
|
Chris@0
|
6 chromafile=tempchroma.csv
|
Chris@0
|
7
|
Chris@0
|
8 mkdir -p "`dirname "$outfile"`"
|
Chris@0
|
9
|
Chris@0
|
10 echo "[sonic annotator] ..."
|
Chris@0
|
11 VAMP_PATH=. ./sonic-annotator-unix -d vamp:matthiasm:nnls_chroma:bothchroma -w csv --csv-stdout "$infile" 2> /dev/null | cut -d ',' -f 2- > "$chromafile"
|
Chris@0
|
12 infile="`echo "$infile" | sed "s/'/''/g"`"
|
Chris@0
|
13 outfile="`echo "$outfile" | sed "s/'/''/g"`"
|
Chris@0
|
14 chromafile="`echo "$chromafile" | sed "s/'/''/g"`"
|
Chris@0
|
15 matlab -nodisplay -nojvm -r run_segmentation\(\'"$infile"\',\'"$outfile"\'\,\'"$chromafile"\'\) > /dev/null
|
Chris@0
|
16 after="$(date +%s)"
|
Chris@0
|
17 elapsed_seconds="$(expr $after - $before)"
|
Chris@0
|
18 echo " -->" time elapsed: $elapsed_seconds seconds
|
Chris@0
|
19 echo " "
|