changeset 339:bcfdaa708992 livemode

Threshold of 5 is definitely better than threshold 6 for piano... but I'm still unpersuaded about the advantages of even lower thresholds -- need to go over this again
author Chris Cannam
date Tue, 30 Jun 2015 09:38:12 +0100
parents 8a2166088b94
children 1bfde6dba499
files src/Instruments.cpp testdata/evaluation/run-piano.sh
diffstat 2 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/Instruments.cpp	Mon Jun 29 16:22:32 2015 +0100
+++ b/src/Instruments.cpp	Tue Jun 30 09:38:12 2015 +0100
@@ -146,7 +146,7 @@
 			 "Piano",
 			 pianoTemplates);
     piano.maxPolyphony = 6;
-    piano.levelThreshold = 6;
+    piano.levelThreshold = 5;
     piano.pitchSparsity = 1.0;
     piano.sourceSparsity = 1.0;
     if (isOK(piano)) {
--- a/testdata/evaluation/run-piano.sh	Mon Jun 29 16:22:32 2015 +0100
+++ b/testdata/evaluation/run-piano.sh	Tue Jun 30 09:38:12 2015 +0100
@@ -1,8 +1,10 @@
-#!/bin/sh
+#!/bin/bash
 
 # Assumption: instrument parameter value 0 of the Silvet plugin is
 # always "multiple or unknown instruments" and 1 is always "piano".
 
+set -eu
+
 piano_path="/home/cannam/Music/piano_small_dataset"
 yc="/home/cannam/code/may/bin/yc"
 
@@ -65,14 +67,14 @@
 
     duration=30
 
-    for instrument in $intended_instrument ; do
+    for instrument in $intended_instrument 0 ; do
 
-	for mode in 1 0; do 
+	for mode in 2 1 0; do 
 	    
 	    for norm in no; do
 
 		echo
-		echo "For file $filename, instrument $instrument, norm $norm..."
+		echo "For mode $mode, file $filename, instrument $instrument, norm $norm..."
 
 		if [ "$norm" = "no" ]; then
 		    # Don't normalise; plugin is now supposed to do it
@@ -105,15 +107,15 @@
 		    mark=""
 		    if [ "$ms" = "50" ]; then
 			if [ "$instrument" = "0" ]; then
-			    mark="  <-- main generic preset for $filename (norm = $norm)"; 
+			    mark="  <-- main generic preset for $filename (mode = $mode, norm = $norm)"; 
 			else
-			    mark="  <-- main piano preset for $filename (norm = $norm)";
+			    mark="  <-- main piano preset for $filename (mode = $mode, norm = $norm)";
 			fi
 		    fi;
 		    echo
 		    echo "Validating against ground truth at $ms ms:"
 		    egrep '(^[0-9]\.)|(^[012][0-9]\.)' "../piano-groundtruth/$filename.lab" > "$reference.lab"
-		    "$yc" ../scripts/evaluate_lab.yeti "$ms" "$reference.lab" "$outfile.lab" | sed 's,$,'"$mark"','
+		    "$yc" ../scripts/evaluate_lab.yeti "$ms" "$reference.lab" "$outfile.lab" | sed 's#$#'"$mark"'#'
 		done;
 		echo
 	    done