Mercurial > hg > vamp-aubio-plugins
changeset 71:649c343a4b94
plugins/Onset.cpp: added onset detection function and threshold odf
author | Paul Brossier <piem@piem.org> |
---|---|
date | Wed, 28 Jan 2015 13:27:52 +0100 |
parents | c49a58161590 |
children | 47b34cd708d3 |
files | plugins/Onset.cpp |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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; }