# HG changeset patch # User matthiasm # Date 1397227793 -3600 # Node ID 1e4233d4b3bb2e806460308d99f74730068a62d0 # Parent 253fc3fd4a62dc82f51a4d571123d2d9e8accdee added stuff so it should actually run now diff -r 253fc3fd4a62 -r 1e4233d4b3bb doChordID-osx.sh --- 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 diff -r 253fc3fd4a62 -r 1e4233d4b3bb doChordID-simple-osx.sh --- 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" diff -r 253fc3fd4a62 -r 1e4233d4b3bb doChordID.sh --- 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 diff -r 253fc3fd4a62 -r 1e4233d4b3bb matthiasm.dylib Binary file matthiasm.dylib has changed diff -r 253fc3fd4a62 -r 1e4233d4b3bb matthiasm.so Binary file matthiasm.so has changed diff -r 253fc3fd4a62 -r 1e4233d4b3bb mauch-MIREX-chord.tar.bz2 Binary file mauch-MIREX-chord.tar.bz2 has changed diff -r 253fc3fd4a62 -r 1e4233d4b3bb mauch-MIREX-chord.tmproj --- /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 @@ + + + + + currentDocument + doChordID.sh + documents + + + filename + testFileList.txt + lastUsed + 2010-06-16T11:52:32Z + + + filename + run_extraction.m + lastUsed + 2010-06-16T07:27:21Z + + + filename + bothchroma.n3 + lastUsed + 2010-06-27T09:21:06Z + + + filename + doChordID.sh + lastUsed + 2010-06-28T00:51:27Z + selected + + + + filename + run_extraction_seg.m + lastUsed + 2010-06-16T06:36:47Z + + + filename + run_extraction.sh + lastUsed + 2010-06-16T06:21:39Z + + + filename + parameters/param_mirex.m + lastUsed + 2010-06-16T08:49:23Z + + + filename + parameters/param_thesis_mbk24bx.m + lastUsed + 2010-06-16T06:26:10Z + + + filename + parameters/param_ismir10_std06.m + lastUsed + 2010-06-16T06:27:31Z + + + filename + run/run_ismir10_std06.m + lastUsed + 2010-06-16T07:44:58Z + + + filename + dbn/inference.m + lastUsed + 2010-06-16T08:46:05Z + + + filename + run_mirex.m + lastUsed + 2010-06-16T08:44:54Z + + + filename + song/song_segment.m + lastUsed + 2010-06-27T09:21:00Z + + + filename + song/song_syncchroma.m + lastUsed + 2010-06-16T08:40:14Z + + + filename + song/song_segchroma.m + lastUsed + 2010-06-16T08:51:07Z + + + filename + segmentation/segmentation_auto.m + lastUsed + 2010-06-16T08:52:31Z + + + fileHierarchyDrawerWidth + 200 + metaData + + bothchroma.n3 + + caret + + column + 26 + line + 11 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + dbn/inference.m + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + doChordID.sh + + caret + + column + 0 + line + 21 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + parameters/param_ismir10_std06.m + + caret + + column + 0 + line + 3 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 0 + selectFrom + + column + 94 + line + 42 + + selectTo + + column + 0 + line + 3 + + + parameters/param_mirex.m + + caret + + column + 13 + line + 36 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + parameters/param_thesis_mbk24bx.m + + caret + + column + 7 + line + 22 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + run_extraction.sh + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + run_mirex.m + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + segmentation/segmentation_auto.m + + caret + + column + 53 + line + 38 + + columnSelection + + firstVisibleColumn + 0 + firstVisibleLine + 0 + selectFrom + + column + 44 + line + 38 + + selectTo + + column + 53 + line + 38 + + + song/song_segchroma.m + + caret + + column + 0 + line + 0 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + testFileList.txt + + caret + + column + 0 + line + 1 + + firstVisibleColumn + 0 + firstVisibleLine + 0 + + + openDocuments + + doChordID.sh + testFileList.txt + + showFileHierarchyDrawer + + windowFrame + {{663, 56}, {936, 1099}} + + diff -r 253fc3fd4a62 -r 1e4233d4b3bb run_mirex.m --- 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 diff -r 253fc3fd4a62 -r 1e4233d4b3bb sonic-annotator Binary file sonic-annotator has changed diff -r 253fc3fd4a62 -r 1e4233d4b3bb sonic-annotator-unix Binary file sonic-annotator-unix has changed diff -r 253fc3fd4a62 -r 1e4233d4b3bb testdata/filelist.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testdata/filelist.txt Fri Apr 11 15:49:53 2014 +0100 @@ -0,0 +1,2 @@ +testdata/show.wav + diff -r 253fc3fd4a62 -r 1e4233d4b3bb testdata/show.wav Binary file testdata/show.wav has changed