To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / segmentation.sh @ 0:4182672fd6f8

History | View | Annotate | Download (677 Bytes)

1
#!/bin/bash
2
infile="$1"
3
outfile="$2"
4
before="$(date +%s)"
5

    
6
chromafile=tempchroma.csv
7

    
8
mkdir -p "`dirname "$outfile"`"
9

    
10
echo "[sonic annotator] ..."
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" 
12
infile="`echo "$infile" | sed "s/'/''/g"`"
13
outfile="`echo "$outfile" | sed "s/'/''/g"`"
14
chromafile="`echo "$chromafile" | sed "s/'/''/g"`"		
15
matlab -nodisplay -nojvm -r run_segmentation\(\'"$infile"\',\'"$outfile"\'\,\'"$chromafile"\'\) > /dev/null
16
after="$(date +%s)"
17
elapsed_seconds="$(expr $after - $before)"
18
echo "  -->" time elapsed: $elapsed_seconds seconds
19
echo " "