# HG changeset patch # User Chris Cannam # Date 1378380815 -3600 # Node ID f976d7609700415dd690bd7eacc2692e8a836b2b # Parent c32a2446f7fe27317ccf3106f6356137091551d7 Restore the accidentally-removed line in which all the work happens! Fixes onset detector diff -r c32a2446f7fe -r f976d7609700 dsp/onsets/DetectionFunction.cpp --- a/dsp/onsets/DetectionFunction.cpp Mon Sep 02 09:47:05 2013 +0100 +++ b/dsp/onsets/DetectionFunction.cpp Thu Sep 05 12:33:35 2013 +0100 @@ -100,7 +100,7 @@ // data directly), we will have to use the next smallest power of // two from the block size. Results may vary accordingly! - int actualLength = MathUtilities::previousPowerOfTwo(m_dataLength); + int actualLength = MathUtilities::previousPowerOfTwo((int)m_dataLength); if (actualLength != (int)m_dataLength) { // Pre-fill mag and phase vectors with zero, as the FFT output diff -r c32a2446f7fe -r f976d7609700 dsp/onsets/PeakPicking.cpp --- a/dsp/onsets/PeakPicking.cpp Mon Sep 02 09:47:05 2013 +0100 +++ b/dsp/onsets/PeakPicking.cpp Thu Sep 05 12:33:35 2013 +0100 @@ -106,8 +106,6 @@ vector m_poly; vector m_err; -// double p; - m_poly.push_back(0); m_poly.push_back(0); m_poly.push_back(0); @@ -137,14 +135,11 @@ m_maxFit.push_back(selMax); } -// p = TPolyFit::PolyFit2( m_err, m_maxFit, m_poly); + TPolyFit::PolyFit2(m_err, m_maxFit, m_poly); double f = m_poly[0]; -// double g = m_poly[1]; double h = m_poly[2]; -// int kk = m_poly.size(); - if (h < -Qfilta || f > Qfiltc) { idx.push_back(m_maxIndex[j]);