Mercurial > hg > qm-dsp
changeset 106:f976d7609700 mirex2013
Restore the accidentally-removed line in which all the work happens! Fixes onset detector
author | Chris Cannam |
---|---|
date | Thu, 05 Sep 2013 12:33:35 +0100 |
parents | c32a2446f7fe |
children | 34334b528d6d |
files | dsp/onsets/DetectionFunction.cpp dsp/onsets/PeakPicking.cpp |
diffstat | 2 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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 <double> m_poly; vector <double> 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]);