}
string
-Onset::getName() const
+Onset::getIdentifier() const
{
return "aubioonset";
}
string
-Onset::getDescription() const
+Onset::getName() const
{
return "Aubio Onset Detector";
}
string
+Onset::getDescription() const
+{
+ return "Estimate note onset times";
+}
+
+string
Onset::getMaker() const
{
return "Paul Brossier (plugin by Chris Cannam)";
ParameterList list;
ParameterDescriptor desc;
- desc.name = "onsettype";
- desc.description = "Onset Detection Function Type";
+ desc.identifier = "onsettype";
+ desc.name = "Onset Detection Function Type";
desc.minValue = 0;
desc.maxValue = 6;
desc.defaultValue = (int)aubio_onset_complex;
list.push_back(desc);
desc = ParameterDescriptor();
- desc.name = "peakpickthreshold";
- desc.description = "Peak Picker Threshold";
+ desc.identifier = "peakpickthreshold";
+ desc.name = "Peak Picker Threshold";
desc.minValue = 0;
desc.maxValue = 1;
desc.defaultValue = 0.3;
list.push_back(desc);
desc = ParameterDescriptor();
- desc.name = "silencethreshold";
- desc.description = "Silence Threshold";
+ desc.identifier = "silencethreshold";
+ desc.name = "Silence Threshold";
desc.minValue = -120;
desc.maxValue = 0;
desc.defaultValue = -90;
OutputList list;
OutputDescriptor d;
- d.name = "onsets";
+ d.identifier = "onsets";
+ d.name = "Onsets";
d.unit = "";
- d.description = "Onsets";
d.hasFixedBinCount = true;
d.binCount = 0;
d.sampleType = OutputDescriptor::VariableSampleRate;
list.push_back(d);
d = OutputDescriptor();
- d.name = "detectionfunction";
+ d.identifier = "detectionfunction";
+ d.name = "Onset Detection Function";
d.unit = "";
- d.description = "Onset Detection Function";
d.hasFixedBinCount = true;
d.binCount = m_channelCount;
d.hasKnownExtents = false;
}
Onset::FeatureSet
-Onset::process(float **inputBuffers, Vamp::RealTime timestamp)
+Onset::process(const float *const *inputBuffers,
+ Vamp::RealTime timestamp)
{
for (size_t i = 0; i < m_stepSize; ++i) {
for (size_t j = 0; j < m_channelCount; ++j) {
if (timestamp - m_lastOnset >= m_delay) {
Feature onsettime;
onsettime.hasTimestamp = true;
+ if (timestamp < m_delay) timestamp = m_delay;
onsettime.timestamp = timestamp - m_delay;
returnFeatures[0].push_back(onsettime);
m_lastOnset = timestamp;