Mercurial > hg > vamp-aubio-plugins
changeset 4:be376e1b36c3
* compensate for (4 + m_median) * m_stepSize latency in note detection
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 17 May 2006 13:38:26 +0000 |
parents | 4bfe0cf6e20a |
children | 75189a3dc043 |
files | plugins/Notes.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/Notes.cpp Wed May 17 10:02:36 2006 +0000 +++ b/plugins/Notes.cpp Wed May 17 13:38:26 2006 +0000 @@ -132,7 +132,7 @@ size_t Notes::getPreferredBlockSize() const { - return 4*getPreferredStepSize(); + return 4 * getPreferredStepSize(); } Notes::ParameterList @@ -324,7 +324,9 @@ Feature feature; feature.hasTimestamp = true; - feature.timestamp = m_currentOnset; + feature.timestamp = m_currentOnset - + Vamp::RealTime::frame2RealTime((4 + m_median) * m_stepSize, + m_inputSampleRate); feature.values.push_back(median); // feature.values.push_back(FLOOR(aubio_freqtomidi(median) + 0.5)); feature.values.push_back