48 Plugin(inputSampleRate),
67 return "percussiononsets";
73 return "Simple Percussion Onset Detector";
79 return "Detect percussive note onsets by identifying broadband energy rises";
85 return "Vamp SDK Example Plugins";
97 return "Code copyright 2006 Queen Mary, University of London, after Dan Barry et al 2005. Freely redistributable (BSD license)";
151 d.
name =
"Energy rise threshold";
152 d.
description =
"Energy rise within a frequency bin necessary to count toward broadband total";
161 d.
name =
"Sensitivity";
162 d.
description =
"Sensitivity of peak detector applied to broadband detection function";
184 if (
id ==
"threshold") {
185 if (value < 0) value = 0;
186 if (value > 20) value = 20;
188 }
else if (
id ==
"sensitivity") {
189 if (value < 0) value = 0;
190 if (value > 100) value = 100;
214 d.
name =
"Detection Function";
215 d.
description =
"Broadband energy rise detection function";
230 cerr <<
"ERROR: PercussionOnsetDetector::process: "
231 <<
"PercussionOnsetDetector has not been initialised"
240 float real = inputBuffers[0][i*2];
241 float imag = inputBuffers[0][i*2 + 1];
243 float sqrmag = real * real + imag * imag;
260 detectionFunction.
values.push_back(count);
261 returnFeatures[1].push_back(detectionFunction);
273 returnFeatures[0].push_back(onset);
279 return returnFeatures;