diff SimpleCepstrum.cpp @ 27:44bb93cae288

Change peak-to-next-peak ratio to a difference (because difference of peaks in log values don't vary with signal amplification)
author Chris Cannam
date Sat, 07 Jul 2012 21:06:37 +0100
parents 0a3c1ecff644
children fb862b3418f3
line wrap: on
line diff
--- a/SimpleCepstrum.cpp	Thu Jul 05 21:54:50 2012 +0100
+++ b/SimpleCepstrum.cpp	Sat Jul 07 21:06:37 2012 +0100
@@ -306,9 +306,9 @@
     outputs.push_back(d);
 
     d.identifier = "peak_to_second_peak";
-    d.name = "Peak to second-peak ratio";
+    d.name = "Peak to second-peak difference";
     d.unit = "";
-    d.description = "Return the ratio of the value found in the peak bin within the specified range of the cepstrum, to the value found in the next highest peak";
+    d.description = "Return the difference between the value found in the peak bin within the specified range of the cepstrum, and that found in the next highest peak";
     m_pkoOutput = n++;
     outputs.push_back(d);
 
@@ -616,7 +616,7 @@
 
     Feature pko;
     if (nextPeakVal != 0.0) {
-        pko.values.push_back(maxval / nextPeakVal);
+        pko.values.push_back(maxval - nextPeakVal);
     } else {
         pko.values.push_back(0.0);
     }