Tracking percussive sound for video movement

I don’t have ears installed so can’t properly test the patch, but some thoughts/questions.

So is it only offline analysis you’re trying to do or will it be realtime as well? For real-time stuff I’ve done a ton of optimization in SP-Tools which may be of use/interest.

The spectral-based onset detectors (fluid.bufonsetfeature~) have an accuracy limited to the fft settings, and, in my experience, are not really ideal for percussive sounds due to the metrics being used (as well as the lack of hysteresis in the thresholding). This may explain why you are getting poor tracking with the softer hits.

fluid.bufampfeature~ is much more consistent and (much) better suited to percussive sounds but sadly misses out on the first onset in a buffer if it’s near the start.

And for the last bit, are you trying to compress the range of values you get from the analysis or trying to get values at all (for softer hits)?