changeset 282:2703b3437aee

* remove some debug output
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 27 Feb 2009 13:07:22 +0000
parents 33e03341d541
children 5e125f030287
files dsp/tempotracking/DownBeat.cpp dsp/tempotracking/TempoTrackV2.cpp qm-dsp.pro
diffstat 3 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/dsp/tempotracking/DownBeat.cpp	Fri Feb 27 10:23:08 2009 +0000
+++ b/dsp/tempotracking/DownBeat.cpp	Fri Feb 27 13:07:22 2009 +0000
@@ -38,7 +38,7 @@
     // 16x decimation, which is our expected normal situation)
     m_beatframesize = MathUtilities::nextPowerOfTwo
         (int((m_rate / decimationFactor) * 1.3));
-    std::cerr << "rate = " << m_rate << ", bfs = " << m_beatframesize << std::endl;
+//    std::cerr << "rate = " << m_rate << ", bfs = " << m_beatframesize << std::endl;
     m_beatframe = new double[m_beatframesize];
     m_fftRealOut = new double[m_beatframesize];
     m_fftImagOut = new double[m_beatframesize];
@@ -68,13 +68,13 @@
     int highest = Decimator::getHighestSupportedFactor();
     if (m_factor <= highest) {
         m_decimator1 = new Decimator(m_increment, m_factor);
-        std::cerr << "DownBeat: decimator 1 factor " << m_factor << ", size " << m_increment << std::endl;
+//        std::cerr << "DownBeat: decimator 1 factor " << m_factor << ", size " << m_increment << std::endl;
         return;
     }
     m_decimator1 = new Decimator(m_increment, highest);
-    std::cerr << "DownBeat: decimator 1 factor " << highest << ", size " << m_increment << std::endl;
+//    std::cerr << "DownBeat: decimator 1 factor " << highest << ", size " << m_increment << std::endl;
     m_decimator2 = new Decimator(m_increment / highest, m_factor / highest);
-    std::cerr << "DownBeat: decimator 2 factor " << m_factor / highest << ", size " << m_increment / highest << std::endl;
+//    std::cerr << "DownBeat: decimator 2 factor " << m_factor / highest << ", size " << m_increment / highest << std::endl;
     m_decbuf = new float[m_increment / highest];
 }
 
@@ -87,7 +87,7 @@
         if (!m_buffer) {
             m_buffer = (float *)malloc(m_bufsiz * sizeof(float));
         } else {
-            std::cerr << "DownBeat::pushAudioBlock: realloc m_buffer to " << m_bufsiz << std::endl;
+//            std::cerr << "DownBeat::pushAudioBlock: realloc m_buffer to " << m_bufsiz << std::endl;
             m_buffer = (float *)realloc(m_buffer, m_bufsiz * sizeof(float));
         }
     }
@@ -105,7 +105,7 @@
     for (int i = 0; i < m_increment / m_factor; ++i) {
         rmsout += m_buffer[m_buffill + i] * m_buffer[m_buffill + i];
     }
-    std::cerr << "pushAudioBlock: rms in " << sqrt(rmsin) << ", out " << sqrt(rmsout) << std::endl;
+//    std::cerr << "pushAudioBlock: rms in " << sqrt(rmsin) << ", out " << sqrt(rmsout) << std::endl;
     m_buffill += m_increment / m_factor;
 }
     
@@ -168,7 +168,7 @@
             rms += m_beatframe[j] * m_beatframe[j];
         }
         rms = sqrt(rms);
-        std::cerr << "beat " << i << ": audio rms " << rms << std::endl;
+//        std::cerr << "beat " << i << ": audio rms " << rms << std::endl;
 
         for (size_t j = beatlen; j < m_beatframesize; ++j) {
             m_beatframe[j] = 0.0;
@@ -194,7 +194,7 @@
 
         if (i > 0) { // otherwise we have no previous frame
             m_beatsd.push_back(measureSpecDiff(oldspec, newspec));
-            std::cerr << "specdiff: " << m_beatsd[m_beatsd.size()-1] << std::endl;
+//            std::cerr << "specdiff: " << m_beatsd[m_beatsd.size()-1] << std::endl;
         }
 
         // Copy newspec across to old
@@ -224,7 +224,7 @@
             ++count;
         }
         if (count > 0) m_beatsd[beat] /= count;
-        std::cerr << "dbcand[" << beat << "] = " << dbcand[beat] << std::endl;
+//        std::cerr << "dbcand[" << beat << "] = " << dbcand[beat] << std::endl;
     }
 
 
--- a/dsp/tempotracking/TempoTrackV2.cpp	Fri Feb 27 10:23:08 2009 +0000
+++ b/dsp/tempotracking/TempoTrackV2.cpp	Fri Feb 27 13:07:22 2009 +0000
@@ -329,7 +329,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;
+//        std::cerr << "bestpath[" << i << "] = " << bestpath[i] << " (used for beat_periods " << i*step << " to " << i*step+step-1 << ")" << std::endl;
     }
 
     //fill in the last values...
@@ -442,7 +442,7 @@
         cumscore[i] = alpha*vv + (1.-alpha)*localscore[i];
         backlink[i] = i+prange_min+xx;
 
-        std::cerr << "backlink[" << i << "] <= " << backlink[i] << std::endl;
+//        std::cerr << "backlink[" << i << "] <= " << backlink[i] << std::endl;
     }
 
     // STARTING POINT, I.E. LAST BEAT.. PICK A STRONG POINT IN cumscore VECTOR
@@ -461,10 +461,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;
+//    std::cerr << "startpoint = " << startpoint << std::endl;
     while (backlink[ibeats.back()] > 0)
     {
-        std::cerr << "backlink[" << ibeats.back() << "] = " << backlink[ibeats.back()] << std::endl;
+//        std::cerr << "backlink[" << ibeats.back() << "] = " << backlink[ibeats.back()] << std::endl;
         int b = ibeats.back();
         if (backlink[b] == b) break; // shouldn't happen... haha
         ibeats.push_back(backlink[b]);
--- a/qm-dsp.pro	Fri Feb 27 10:23:08 2009 +0000
+++ b/qm-dsp.pro	Fri Feb 27 13:07:22 2009 +0000
@@ -1,5 +1,5 @@
 TEMPLATE = lib
-CONFIG += warn_on staticlib debug
+CONFIG += warn_on staticlib release
 CONFIG -= qt
 OBJECTS_DIR = tmp_obj
 MOC_DIR = tmp_moc