Mercurial > hg > vamp-onsetsds-plugin
comparison onsetsdsplugin.cpp @ 9:deae47ee00e7
OnsetsDS Vamp plugin can now output the raw/filtered ODF - thanks Jose Javier Valero Mas
author | Dan Stowell <dan.stowell@elec.qmul.ac.uk> |
---|---|
date | Fri, 29 Nov 2013 11:57:32 +0000 |
parents | 3d1928670329 |
children | 1aa45968fbad |
comparison
equal
deleted
inserted
replaced
8:8d42e9e7d394 | 9:deae47ee00e7 |
---|---|
246 onsets.unit = ""; | 246 onsets.unit = ""; |
247 onsets.hasFixedBinCount = true; | 247 onsets.hasFixedBinCount = true; |
248 onsets.binCount = 0; | 248 onsets.binCount = 0; |
249 onsets.sampleType = OutputDescriptor::VariableSampleRate; | 249 onsets.sampleType = OutputDescriptor::VariableSampleRate; |
250 onsets.sampleRate = (m_inputSampleRate / m_stepSize); | 250 onsets.sampleRate = (m_inputSampleRate / m_stepSize); |
251 | 251 list.push_back(onsets); |
252 | |
253 //--- Extracting the ODF | |
254 onsets = OutputDescriptor(); | |
255 onsets.identifier = "odf"; | |
256 onsets.name = "Onset Detection Function"; | |
257 onsets.description = "Onset Detection Function used for detecting onsets"; | |
258 onsets.unit = ""; | |
259 onsets.hasFixedBinCount = false; | |
260 onsets.binCount = 0; | |
261 onsets.sampleType = OutputDescriptor::OneSamplePerStep; | |
262 onsets.sampleRate = (m_inputSampleRate / m_stepSize); | |
263 list.push_back(onsets); | |
264 | |
265 //--- Extracting the Filtered ODF | |
266 onsets = OutputDescriptor(); | |
267 onsets.identifier = "filtered_odf"; | |
268 onsets.name = "Filtered Onset Detection Function"; | |
269 onsets.description = "Filtered Onset Detection Function used for detecting onsets"; | |
270 onsets.unit = ""; | |
271 onsets.hasFixedBinCount = false; | |
272 onsets.binCount = 0; | |
273 onsets.sampleType = OutputDescriptor::OneSamplePerStep; | |
274 onsets.sampleRate = (m_inputSampleRate / m_stepSize); | |
252 list.push_back(onsets); | 275 list.push_back(onsets); |
253 | 276 |
254 return list; | 277 return list; |
255 } | 278 } |
256 | 279 |
275 feature.hasTimestamp = true; | 298 feature.hasTimestamp = true; |
276 feature.timestamp = timestamp; | 299 feature.timestamp = timestamp; |
277 returnFeatures[0].push_back(feature); // onsets are output 0 | 300 returnFeatures[0].push_back(feature); // onsets are output 0 |
278 } | 301 } |
279 | 302 |
303 //--- Extracting the ODF | |
304 Feature odf_feature; | |
305 odf_feature.hasTimestamp = false; | |
306 odf_feature.values.push_back(m_ods->odfvals[0]); | |
307 returnFeatures[1].push_back(odf_feature); | |
308 | |
309 //--- Extracting the Filtered ODF | |
310 Feature filtered_odf_feature; | |
311 filtered_odf_feature.hasTimestamp = false; | |
312 filtered_odf_feature.values.push_back(m_ods->odfvalpost); | |
313 returnFeatures[2].push_back(filtered_odf_feature); | |
314 | |
280 return returnFeatures; | 315 return returnFeatures; |
281 } | 316 } |
282 | 317 |
283 OnsetsDSPlugin::FeatureSet | 318 OnsetsDSPlugin::FeatureSet |
284 OnsetsDSPlugin::getRemainingFeatures() | 319 OnsetsDSPlugin::getRemainingFeatures() |