Mercurial > hg > mauch-mirex-2010
annotate doChordID-osx.sh @ 9:4ea6619cb3f5 tip
removed log files
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:55:11 +0100 |
parents | 1e4233d4b3bb |
children |
rev | line source |
---|---|
Chris@0 | 1 #!/bin/bash |
Chris@0 | 2 |
matthiasm@6 | 3 listfile="$1" |
matthiasm@6 | 4 if [ $# -gt 2 ]; then |
matthiasm@6 | 5 outputdir="$3" |
matthiasm@6 | 6 else |
matthiasm@6 | 7 outputdir="$2" |
Chris@0 | 8 fi |
Chris@0 | 9 |
Chris@0 | 10 while read infile; do |
Chris@0 | 11 if [ "$infile" -a -f "$infile" ]; then |
Chris@0 | 12 before="$(date +%s)" |
Chris@0 | 13 echo "_____________________________________________________" |
Chris@0 | 14 echo " " |
Chris@0 | 15 echo Processing file "$infile" |
Chris@0 | 16 echo " " |
matthiasm@6 | 17 outfile="$outputdir"/"`basename "$infile"`".txt |
matthiasm@6 | 18 logfile=_logfiles/"`basename "$infile"`".log |
matthiasm@6 | 19 chromafile=_chromadata/"`basename "$infile"`".csv |
Chris@0 | 20 echo "[sonic annotator] ..." |
Chris@0 | 21 VAMP_PATH=. ./sonic-annotator -d vamp:matthiasm:nnls_chroma:bothchroma -w csv --csv-stdout "$infile" 2> "$logfile" | cut -d ',' -f 2- > "$chromafile" |
Chris@0 | 22 matlab -nodisplay -nojvm -r run_mirex\(\'"$infile"\',\'"$outfile"\'\,\'"$chromafile"\'\) >> $logfile |
Chris@0 | 23 after="$(date +%s)" |
Chris@0 | 24 elapsed_seconds="$(expr $after - $before)" |
Chris@0 | 25 echo " -->" time elapsed: $elapsed_seconds seconds |
Chris@0 | 26 echo " " |
Chris@0 | 27 else if [ ! "$infile" ]; then echo ...; fi |
Chris@0 | 28 fi |
Chris@0 | 29 done < "$listfile" |