Mercurial > hg > beatroot-vamp
diff BeatRootVampPlugin.cpp @ 36:937432fc2898
Add output for un-filled (pre-interpolation) beats
author | Chris Cannam |
---|---|
date | Thu, 16 Jan 2014 12:19:05 +0000 |
parents | b9c2f444cdaa |
children |
line wrap: on
line diff
--- a/BeatRootVampPlugin.cpp Fri Dec 06 15:58:54 2013 +0000 +++ b/BeatRootVampPlugin.cpp Thu Jan 16 12:19:05 2014 +0000 @@ -239,6 +239,11 @@ d.hasDuration = false; list.push_back(d); + d.identifier = "unfilled"; + d.name = "Un-interpolated beats"; + d.description = "Locations of detected beats, before agent interpolation occurs"; + list.push_back(d); + return list; } @@ -300,7 +305,8 @@ BeatRootVampPlugin::FeatureSet BeatRootVampPlugin::getRemainingFeatures() { - EventList el = m_processor->beatTrack(); + EventList unfilled; + EventList el = m_processor->beatTrack(&unfilled); Feature f; f.hasTimestamp = true; @@ -315,6 +321,12 @@ fs[0].push_back(f); } + for (EventList::const_iterator i = unfilled.begin(); + i != unfilled.end(); ++i) { + f.timestamp = m_origin + Vamp::RealTime::fromSeconds(i->time); + fs[1].push_back(f); + } + return fs; }