From: Paul Brossier Date: Wed, 28 Jan 2015 12:27:52 +0000 (+0100) Subject: plugins/Onset.cpp: added onset detection function and threshold odf X-Git-Tag: 0.5.0~42 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=8fb92dfb98a5a09c1c3f59aea96c77cc884a6a22;p=vamp-aubio-plugins.git plugins/Onset.cpp: added onset detection function and threshold odf --- diff --git a/plugins/Onset.cpp b/plugins/Onset.cpp index 87949b3..49cd566 100644 --- a/plugins/Onset.cpp +++ b/plugins/Onset.cpp @@ -244,6 +244,24 @@ Onset::getOutputDescriptors() const d.sampleRate = 0; list.push_back(d); + d.identifier = "odf"; + d.name = "Onset detection function"; + d.description = "Output of the onset detection function"; + d.binCount = 1; + d.isQuantized = true; + d.quantizeStep = 1.0; + d.sampleType = OutputDescriptor::OneSamplePerStep; + list.push_back(d); + + d.identifier = "todf"; + d.name = "Thresholded Onset detection function"; + d.description = "Output of the thresholded onset detection function"; + d.binCount = 1; + d.isQuantized = true; + d.quantizeStep = 1.0; + d.sampleType = OutputDescriptor::OneSamplePerStep; + list.push_back(d); + return list; } @@ -272,6 +290,16 @@ Onset::process(const float *const *inputBuffers, } } + Feature odf; + odf.hasTimestamp = false; + odf.values.push_back(aubio_onset_get_descriptor(m_onsetdet)); + returnFeatures[1].push_back(odf); + + Feature todf; + todf.hasTimestamp = false; + todf.values.push_back(aubio_onset_get_thresholded_descriptor(m_onsetdet)); + returnFeatures[2].push_back(todf); + return returnFeatures; }