Mercurial > hg > mauch-mirex-2010
changeset 6:1e4233d4b3bb
added stuff so it should actually run now
author | matthiasm |
---|---|
date | Fri, 11 Apr 2014 15:49:53 +0100 |
parents | 253fc3fd4a62 |
children | 12abff5474c8 |
files | doChordID-osx.sh doChordID-simple-osx.sh doChordID.sh matthiasm.dylib matthiasm.so mauch-MIREX-chord.tar.bz2 mauch-MIREX-chord.tmproj run_mirex.m sonic-annotator sonic-annotator-unix testdata/filelist.txt testdata/show.wav |
diffstat | 12 files changed, 332 insertions(+), 67 deletions(-) [+] |
line wrap: on
line diff
--- a/doChordID-osx.sh Tue Apr 24 12:03:50 2012 +0100 +++ b/doChordID-osx.sh Fri Apr 11 15:49:53 2014 +0100 @@ -1,24 +1,12 @@ #!/bin/bash -if [ $# -lt 2 ] ; then -echo "Usage: $0 [-s] LISTFILENAME OUTPUTDIR" -exit 1 +listfile="$1" +if [ $# -gt 2 ]; then + outputdir="$3" +else + outputdir="$2" fi -retainstructure=0 - -while [ $# -gt 2 ] ; do -case $1 in --d) retainstructure=1 ; shift 1 ; echo here;; -*) shift 1 ;; -esac -done - -listfile="$1" -echo listfile "$listfile" -outputdir="$2" - - while read infile; do if [ "$infile" -a -f "$infile" ]; then before="$(date +%s)" @@ -26,19 +14,9 @@ echo " " echo Processing file "$infile" echo " " - if [ $retainstructure -eq 0 ]; then - pathandfile=`basename "$infile"` - else - pathandfile="`echo "$infile" | egrep -o '[^/]*/[^/]*/[^/]*$'`" - echo pathandfile "$pathandfile" - fi - outfile="$outputdir"/"$pathandfile".txt - - logfile=_logfiles/"$pathandfile".log - chromafile=_chromadata/"$pathandfile".csv - - mkdir -p "`dirname "$outfile"`" - + outfile="$outputdir"/"`basename "$infile"`".txt + logfile=_logfiles/"`basename "$infile"`".log + chromafile=_chromadata/"`basename "$infile"`".csv echo "[sonic annotator] ..." VAMP_PATH=. ./sonic-annotator -d vamp:matthiasm:nnls_chroma:bothchroma -w csv --csv-stdout "$infile" 2> "$logfile" | cut -d ',' -f 2- > "$chromafile" matlab -nodisplay -nojvm -r run_mirex\(\'"$infile"\',\'"$outfile"\'\,\'"$chromafile"\'\) >> $logfile
--- a/doChordID-simple-osx.sh Tue Apr 24 12:03:50 2012 +0100 +++ b/doChordID-simple-osx.sh Fri Apr 11 15:49:53 2014 +0100 @@ -41,6 +41,7 @@ echo "[sonic annotator] ..." helper=n + echo VAMP_PATH=. ./sonic-annotator -d vamp:matthiasm:nnls_chroma:simplechord -w csv --csv-stdout "$infile" VAMP_PATH=. ./sonic-annotator -d vamp:matthiasm:nnls_chroma:simplechord -w csv --csv-stdout "$infile" | cut -d ',' -f 2- | while read line; do # echo "$line"
--- a/doChordID.sh Tue Apr 24 12:03:50 2012 +0100 +++ b/doChordID.sh Fri Apr 11 15:49:53 2014 +0100 @@ -1,24 +1,12 @@ #!/bin/bash -if [ $# -lt 2 ] ; then -echo "Usage: $0 [-s] LISTFILENAME OUTPUTDIR" -exit 1 +listfile="$1" +if [ $# -gt 2 ]; then + outputdir="$3" +else + outputdir="$2" fi -retainstructure=0 - -while [ $# -gt 2 ] ; do -case $1 in --d) retainstructure=1 ; shift 1 ; echo here;; -*) shift 1 ;; -esac -done - -listfile="$1" -echo listfile "$listfile" -outputdir="$2" - - while read infile; do if [ "$infile" -a -f "$infile" ]; then before="$(date +%s)" @@ -26,25 +14,12 @@ echo " " echo Processing file "$infile" echo " " - if [ $retainstructure -eq 0 ]; then - pathandfile=`basename "$infile"` - else - pathandfile="`echo "$infile" | egrep -o '[^/]*/[^/]*/[^/]*$'`" - echo pathandfile "$pathandfile" - fi - outfile="$outputdir"/"$pathandfile".txt - - logfile=_logfiles/"$pathandfile".log - chromafile=_chromadata/"$pathandfile".csv - - mkdir -p "`dirname "$outfile"`" - + outfile="$outputdir"/`basename "$infile"`.txt + logfile=_logfiles/`basename "$infile"`.log + chromafile=_chromadata/`basename "$infile"`.csv echo "[sonic annotator] ..." VAMP_PATH=. ./sonic-annotator-unix -d vamp:matthiasm:nnls_chroma:bothchroma -w csv --csv-stdout "$infile" 2> "$logfile" | cut -d ',' -f 2- > "$chromafile" - infile="`echo "$infile" | sed "s/'/''/g"`" - outfile="`echo "$outfile" | sed "s/'/''/g"`" - chromafile="`echo "$chromafile" | sed "s/'/''/g"`" - matlab -nodisplay -nojvm -r run_mirex\(\'"$infile"\',\'"$outfile"\'\,\'"$chromafile"\'\) >> "$logfile" + matlab -nodisplay -nojvm -r run_mirex\(\'"$infile"\',\'"$outfile"\'\,\'"$chromafile"\'\) >> $logfile after="$(date +%s)" elapsed_seconds="$(expr $after - $before)" echo " -->" time elapsed: $elapsed_seconds seconds
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mauch-MIREX-chord.tmproj Fri Apr 11 15:49:53 2014 +0100 @@ -0,0 +1,309 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>currentDocument</key> + <string>doChordID.sh</string> + <key>documents</key> + <array> + <dict> + <key>filename</key> + <string>testFileList.txt</string> + <key>lastUsed</key> + <date>2010-06-16T11:52:32Z</date> + </dict> + <dict> + <key>filename</key> + <string>run_extraction.m</string> + <key>lastUsed</key> + <date>2010-06-16T07:27:21Z</date> + </dict> + <dict> + <key>filename</key> + <string>bothchroma.n3</string> + <key>lastUsed</key> + <date>2010-06-27T09:21:06Z</date> + </dict> + <dict> + <key>filename</key> + <string>doChordID.sh</string> + <key>lastUsed</key> + <date>2010-06-28T00:51:27Z</date> + <key>selected</key> + <true/> + </dict> + <dict> + <key>filename</key> + <string>run_extraction_seg.m</string> + <key>lastUsed</key> + <date>2010-06-16T06:36:47Z</date> + </dict> + <dict> + <key>filename</key> + <string>run_extraction.sh</string> + <key>lastUsed</key> + <date>2010-06-16T06:21:39Z</date> + </dict> + <dict> + <key>filename</key> + <string>parameters/param_mirex.m</string> + <key>lastUsed</key> + <date>2010-06-16T08:49:23Z</date> + </dict> + <dict> + <key>filename</key> + <string>parameters/param_thesis_mbk24bx.m</string> + <key>lastUsed</key> + <date>2010-06-16T06:26:10Z</date> + </dict> + <dict> + <key>filename</key> + <string>parameters/param_ismir10_std06.m</string> + <key>lastUsed</key> + <date>2010-06-16T06:27:31Z</date> + </dict> + <dict> + <key>filename</key> + <string>run/run_ismir10_std06.m</string> + <key>lastUsed</key> + <date>2010-06-16T07:44:58Z</date> + </dict> + <dict> + <key>filename</key> + <string>dbn/inference.m</string> + <key>lastUsed</key> + <date>2010-06-16T08:46:05Z</date> + </dict> + <dict> + <key>filename</key> + <string>run_mirex.m</string> + <key>lastUsed</key> + <date>2010-06-16T08:44:54Z</date> + </dict> + <dict> + <key>filename</key> + <string>song/song_segment.m</string> + <key>lastUsed</key> + <date>2010-06-27T09:21:00Z</date> + </dict> + <dict> + <key>filename</key> + <string>song/song_syncchroma.m</string> + <key>lastUsed</key> + <date>2010-06-16T08:40:14Z</date> + </dict> + <dict> + <key>filename</key> + <string>song/song_segchroma.m</string> + <key>lastUsed</key> + <date>2010-06-16T08:51:07Z</date> + </dict> + <dict> + <key>filename</key> + <string>segmentation/segmentation_auto.m</string> + <key>lastUsed</key> + <date>2010-06-16T08:52:31Z</date> + </dict> + </array> + <key>fileHierarchyDrawerWidth</key> + <integer>200</integer> + <key>metaData</key> + <dict> + <key>bothchroma.n3</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>26</integer> + <key>line</key> + <integer>11</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + <key>dbn/inference.m</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>0</integer> + <key>line</key> + <integer>0</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + <key>doChordID.sh</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>0</integer> + <key>line</key> + <integer>21</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + <key>parameters/param_ismir10_std06.m</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>0</integer> + <key>line</key> + <integer>3</integer> + </dict> + <key>columnSelection</key> + <false/> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + <key>selectFrom</key> + <dict> + <key>column</key> + <integer>94</integer> + <key>line</key> + <integer>42</integer> + </dict> + <key>selectTo</key> + <dict> + <key>column</key> + <integer>0</integer> + <key>line</key> + <integer>3</integer> + </dict> + </dict> + <key>parameters/param_mirex.m</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>13</integer> + <key>line</key> + <integer>36</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + <key>parameters/param_thesis_mbk24bx.m</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>7</integer> + <key>line</key> + <integer>22</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + <key>run_extraction.sh</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>0</integer> + <key>line</key> + <integer>0</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + <key>run_mirex.m</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>0</integer> + <key>line</key> + <integer>0</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + <key>segmentation/segmentation_auto.m</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>53</integer> + <key>line</key> + <integer>38</integer> + </dict> + <key>columnSelection</key> + <false/> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + <key>selectFrom</key> + <dict> + <key>column</key> + <integer>44</integer> + <key>line</key> + <integer>38</integer> + </dict> + <key>selectTo</key> + <dict> + <key>column</key> + <integer>53</integer> + <key>line</key> + <integer>38</integer> + </dict> + </dict> + <key>song/song_segchroma.m</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>0</integer> + <key>line</key> + <integer>0</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + <key>testFileList.txt</key> + <dict> + <key>caret</key> + <dict> + <key>column</key> + <integer>0</integer> + <key>line</key> + <integer>1</integer> + </dict> + <key>firstVisibleColumn</key> + <integer>0</integer> + <key>firstVisibleLine</key> + <integer>0</integer> + </dict> + </dict> + <key>openDocuments</key> + <array> + <string>doChordID.sh</string> + <string>testFileList.txt</string> + </array> + <key>showFileHierarchyDrawer</key> + <true/> + <key>windowFrame</key> + <string>{{663, 56}, {936, 1099}}</string> +</dict> +</plist>
--- a/run_mirex.m Tue Apr 24 12:03:50 2012 +0100 +++ b/run_mirex.m Fri Apr 11 15:49:53 2014 +0100 @@ -37,8 +37,8 @@ fprintf(2,'[MATLAB] writing output files...'); % fprintf(1,'writing to %s\n', outfilename) write_song(song, bnet, param, outfilename, 'chordlab', 1); -% write_song(song, bnet, param, [outfilename(1:end-3) 'keylab'], 'keylab', 1); +write_song(song, bnet, param, [outfilename(1:end-3) 'keylab'], 'keylab', 1); % parts2csv(song, [outfilename(1:end-3) 'csv']); -% parts2csv(song, [outfilename(1:end-3) 'intcsv'],'integrated'); +parts2csv(song, [outfilename(1:end-3) 'intcsv'],'integrated'); fprintf(2,'done.\n'); -exit +exit \ No newline at end of file