Mercurial > hg > vamp-plugin-sdk
changeset 270:06cfedd040c7
...
author | cannam |
---|---|
date | Wed, 26 Nov 2008 13:54:17 +0000 |
parents | 91821a3ab0b6 |
children | 23352e424631 |
files | examples/PercussionOnsetDetector.cpp |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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