aubio / aubio

a library for audio and music analysis
https://aubio.org
GNU General Public License v3.0
3.3k stars 379 forks source link

Is it possible to calculate an onset's strength? #249

Open naught101 opened 5 years ago

naught101 commented 5 years ago

Aubio will detect percussive onsets. I'm wondering if there is a way to assign a 'strength' to those onsets? I can't see anything in the docs.

I guess it should be possible to simply compare the wav RMS before and after the onset, possibly normalised by the total RMS after the onset.

If there isn't already something like this in Aubio, would it make sense to add it?

piem commented 5 years ago

hi @naught101

thanks for your question. In addition to the RMS, you could also look at the value of the novelty function, using get_descriptor or get_thresholded_descriptor.

You might want to look at python/demos/demo_onset_plot.py for inspiration.

Let us know if that helps.

best, piem