Chris@0: #!/bin/bash Chris@0: infile="$1" Chris@0: outfile="$2" Chris@0: before="$(date +%s)" Chris@0: Chris@0: chromafile=tempchroma.csv Chris@0: Chris@0: mkdir -p "`dirname "$outfile"`" Chris@0: Chris@0: echo "[sonic annotator] ..." Chris@0: 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: infile="`echo "$infile" | sed "s/'/''/g"`" Chris@0: outfile="`echo "$outfile" | sed "s/'/''/g"`" Chris@0: chromafile="`echo "$chromafile" | sed "s/'/''/g"`" Chris@0: matlab -nodisplay -nojvm -r run_segmentation\(\'"$infile"\',\'"$outfile"\'\,\'"$chromafile"\'\) > /dev/null Chris@0: after="$(date +%s)" Chris@0: elapsed_seconds="$(expr $after - $before)" Chris@0: echo " -->" time elapsed: $elapsed_seconds seconds Chris@0: echo " "