changeset 118:1629209f5bf2 tony

switched off some debug messages
author matthiasm
date Tue, 24 Mar 2015 18:06:33 +0000
parents 1b75e5fd4b99
children 9d6595563c11
files PYinVamp.cpp YinUtil.cpp
diffstat 2 files changed, 2 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/PYinVamp.cpp	Mon Mar 23 17:28:34 2015 +0000
+++ b/PYinVamp.cpp	Tue Mar 24 18:06:33 2015 +0000
@@ -587,7 +587,7 @@
         } else { // not currently voiced
             if (oldIsVoiced == 1) // end of note
             {
-                std::cerr << notePitchTrack.size() << " " << minNoteFrames << std::endl;
+                // std::cerr << notePitchTrack.size() << " " << minNoteFrames << std::endl;
                 if (notePitchTrack.size() >= minNoteFrames)
                 {
                     std::sort(notePitchTrack.begin(), notePitchTrack.end());
--- a/YinUtil.cpp	Mon Mar 23 17:28:34 2015 +0000
+++ b/YinUtil.cpp	Tue Mar 24 18:06:33 2015 +0000
@@ -333,52 +333,11 @@
     }
     
     double betterTau = 0.0;
-    // size_t x0;
-    // size_t x2;
-
-    // if (tau < 1) 
-    // {
-    //     x0 = tau;
-    // } else {
-    //     x0 = tau - 1;
-    // }
-    // 
-    // if (tau + 1 < yinBufferSize) 
-    // {
-    //     x2 = tau + 1;
-    // } else {
-    //     x2 = tau;
-    // }
-    // 
-    // if (x0 == tau) 
-    // {
-    //     if (yinBuffer[tau] <= yinBuffer[x2]) 
-    //     {
-    //         betterTau = tau;
-    //     } else {
-    //         betterTau = x2;
-    //     }
-    // } 
-    // else if (x2 == tau) 
-    // {
-    //     if (yinBuffer[tau] <= yinBuffer[x0]) 
-    //     {
-    //         betterTau = tau;
-    //     } 
-    //     else 
-    //     {
-    //         betterTau = x0;
-    //     }
-    // } 
-    // else 
-    // {
     if (tau > 0 && tau < yinBufferSize-1) {
         float s0, s1, s2;
         s0 = yinBuffer[tau-1];
         s1 = yinBuffer[tau];
         s2 = yinBuffer[tau+1];
-        // fixed AUBIO implementation, thanks to Karl Helgason:
-        // (2.0f * s1 - s2 - s0) was incorrectly multiplied with -1
         
         double adjustment = (s2 - s0) / (2 * (2 * s1 - s2 - s0));
         
@@ -386,7 +345,7 @@
         
         betterTau = tau + adjustment;
     } else {
-        std::cerr << "WARNING: can't do interpolation at the edge (tau = " << tau << "), will return un-interpolated value.\n";
+        // std::cerr << "WARNING: can't do interpolation at the edge (tau = " << tau << "), will return un-interpolated value.\n";
         betterTau = tau;
     }
     return betterTau;