diff src/Silvet.cpp @ 154:c6b6d6ea1c3d

Processing parameters. Main difference is use of atomHopFactor of 0.3 instead of 0.25
author Chris Cannam
date Fri, 16 May 2014 10:12:55 +0100
parents 74f14efe032f
children e1ebbae52cff
line wrap: on
line diff
--- a/src/Silvet.cpp	Fri May 16 08:09:42 2014 +0100
+++ b/src/Silvet.cpp	Fri May 16 10:12:55 2014 +0100
@@ -325,9 +325,18 @@
 	m_resampler = 0;
     }
 
-    m_cq = new CQSpectrogram
-	(processingSampleRate, 27.5, processingSampleRate / 3, processingBPO,
-         CQSpectrogram::InterpolateLinear);
+    CQParameters params(processingSampleRate,
+                        27.5, 
+                        processingSampleRate / 3,
+                        processingBPO);
+
+    params.q = 1.0; // MIREX code uses 0.8, but for some reason that
+                    // makes our implementation much, much slower
+    params.atomHopFactor = 0.3;
+    params.threshold = 0.0005;
+    params.window = CQParameters::Hann;
+
+    m_cq = new CQSpectrogram(params, CQSpectrogram::InterpolateLinear);
 
     for (int i = 0; i < (int)m_postFilter.size(); ++i) {
         delete m_postFilter[i];
@@ -549,6 +558,7 @@
 
     //!!! make this a parameter (was 4.8, try adjusting, compare levels against matlab code)
     double threshold = 6;
+//    double threshold = 4.8;
 
     typedef std::multimap<double, int> ValueIndexMap;