# HG changeset patch # User cannam # Date 1227707657 0 # Node ID 06cfedd040c78468bb716df7d3a0c6081531e25e # Parent 91821a3ab0b62158ea4a07d11623d5d6a98a790d ... diff -r 91821a3ab0b6 -r 06cfedd040c7 examples/PercussionOnsetDetector.cpp --- a/examples/PercussionOnsetDetector.cpp Tue Nov 25 17:51:12 2008 +0000 +++ b/examples/PercussionOnsetDetector.cpp Wed Nov 26 13:54:17 2008 +0000 @@ -245,7 +245,7 @@ if (m_priorMagnitudes[i] > 0.f) { float diff = 10.f * log10f(sqrmag / m_priorMagnitudes[i]); -// std::cout << "i=" << i << ", mag=" << mag << ", prior=" << m_priorMagnitudes[i] << ", diff=" << diff << ", threshold=" << m_threshold << std::endl; +// std::cout << "i=" << i << ", sqrmag=" << sqrmag << ", prior=" << m_priorMagnitudes[i] << ", diff=" << diff << ", threshold=" << m_threshold << " " << (diff >= m_threshold ? "[*]" : "") << std::endl; if (diff >= m_threshold) ++count; } @@ -264,6 +264,8 @@ m_dfMinus1 >= count && m_dfMinus1 > ((100 - m_sensitivity) * m_blockSize) / 200) { +//std::cout << "result at " << ts << "! (count == " << count << ", prev == " << m_dfMinus1 << ")" << std::endl; + Feature onset; onset.hasTimestamp = true; onset.timestamp = ts - Vamp::RealTime::frame2RealTime