diff dsp/tempotracking/TempoTrackV2.cpp @ 55:7fe29d8a7eaf

* Various fixes related to the bar estimator code
author cannam
date Tue, 10 Feb 2009 16:37:11 +0000
parents 5bec06ecc88a
children a0f987c06bec
line wrap: on
line diff
--- a/dsp/tempotracking/TempoTrackV2.cpp	Tue Feb 10 12:52:43 2009 +0000
+++ b/dsp/tempotracking/TempoTrackV2.cpp	Tue Feb 10 16:37:11 2009 +0000
@@ -326,6 +326,7 @@
             lastind = i*step+j;
             beat_period[lastind] = bestpath[i];
         }
+        std::cerr << "bestpath[" << i << "] = " << bestpath[i] << " (used for beat_periods " << i*step << " to " << i*step+step-1 << ")" << std::endl;
     }
 
     //fill in the last values...
@@ -435,6 +436,8 @@
 
         cumscore[i] = alpha*vv + (1.-alpha)*localscore[i];
         backlink[i] = i+prange_min+xx;
+
+        std::cerr << "backlink[" << i << "] <= " << backlink[i] << std::endl;
     }
 
     // STARTING POINT, I.E. LAST BEAT.. PICK A STRONG POINT IN cumscore VECTOR
@@ -450,8 +453,10 @@
     //  BACKTRACKING FROM THE END TO THE BEGINNING.. MAKING SURE NOT TO GO BEFORE SAMPLE 0
     i_vec_t ibeats;
     ibeats.push_back(startpoint);
+    std::cerr << "startpoint = " << startpoint << std::endl;
     while (backlink[ibeats.back()] > 0)
     {
+        std::cerr << "backlink[" << ibeats.back() << "] = " << backlink[ibeats.back()] << std::endl;
         ibeats.push_back(backlink[ibeats.back()]);
     }