# HG changeset patch # User Paul Brossier # Date 1422448072 -3600 # Node ID 649c343a4b941a09f5074d5a345ba7e5344663fe # Parent c49a581615900ca8b7069e704a2edb27a0fa023c plugins/Onset.cpp: added onset detection function and threshold odf diff -r c49a58161590 -r 649c343a4b94 plugins/Onset.cpp --- a/plugins/Onset.cpp Wed Jan 28 13:27:07 2015 +0100 +++ b/plugins/Onset.cpp Wed Jan 28 13:27:52 2015 +0100 @@ -244,6 +244,24 @@ 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 @@ } } + 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; }