shithub: aubio

Download patch

ref: 5cc94db5778fb51283c26896d197009462b6db36
parent: da6d9af0ab8b8e60495ceeb42caedbacd2761569
author: Paul Brossier <piem@altern.org>
date: Sun May 7 11:46:51 EDT 2006

print per note results
print per note results


--- a/python/test/bench/pitch/bench-pitch-isolated
+++ b/python/test/bench/pitch/bench-pitch-isolated
@@ -12,7 +12,9 @@
                'Msil', 'Mpit', 'Mchr',
 	       'TotalPit', 'TotalPit', 'TotalChr' ]
 	""" list of values to print per dir """
-	printnames = [ 'mode', 'MinPit', 'MaxPit', 'TotalSil', 'TotalPit', 'TotalChr']
+	printnames_total = [ 'mode', 'MinPit', 'MaxPit', 'TotalSil', 'TotalPit', 'TotalChr']
+	printnames_notes = [ 'mode', 'Note', 'Sil', 'Pit', 'Chr']
+	printnames = printnames_notes 
 
 	""" per dir """
 	formats = {'mode': "%12s" , 
@@ -19,6 +21,7 @@
 		'truth': "%s",
 		'osil': "%s", 'esil': "%s", 
 		'opit': "%s", 'epit': "%s", 'echr': "%s",
+    'Note': "%s", 'Sil': "%s", 'Chr': "%s", 'Pit': "%s",
 		'TotalPit': "%s", 'TotalSil': "%s", 'TotalChr': "%s",
 		'MinPit': "%s", 'MaxPit': "%s",
 		'Msil': "%s", 'Mpit': "%s", 'Mchr': "%s"}
@@ -77,12 +80,17 @@
 				allMsil[i] = allEsil[i]/float(allOsil[i])*100.
 				allMpit[i] = allEpit[i]/float(allOpit[i])*100.
 				allMchr[i] = allEchr[i]/float(allOpit[i])*100.
+				self.v['Sil'], self.v['Pit'], self.v['Chr'] = allMsil[i], allMpit[i], allMchr[i]
+				self.v['Note'] = truth[i]
+				#self.printnames = self.printnames_notes
+				self.pretty_print()
 			self.v['TotalSil'] = sum(allMsil)/len(truth)
 			self.v['TotalPit'] = sum(allMpit)/len(truth)
 			self.v['TotalChr'] = sum(allMchr)/len(truth)
 			self.v['MinPit'] = min(truth) 
 			self.v['MaxPit'] = max(truth) 
-			self.pretty_print()
+			#self.printnames = self.printnames_total
+			#self.pretty_print()
 
 			plot = []
 			self.plotpitchtessiture(plot,
--