BPM estimation from onset or onsetfeatures

Hi,

I am working on a Max improviser for acoustic piano (probably in the line of Max improviser with acoustic ensemble) and I would like to estimate the current piano BPM on live situations.

I started playing and optimizing the fluid.onsetslice~ and fluid.onsetfeature~ objects and now I am looking for advices on how to estimate the BPM. I am aware of the Tempogram approach which essentially computes the FFT of the onsetfeature but it is unclear to me whether this is the best approach and how to implement it in Max or Flucoma because of the subsampling of the onsetfeature data.

In any case, any hint on how to deal with BPM estimation would be very welcome!
Thanks in advance.

In the past I’ve used a very simple/dumb approach but I find it works well.

Basically getting the delta time between the attacks, putting them through zl stream and then doing this:
Screenshot 2022-12-13 at 9.12.38 am

Depending on the overall rate of information and granularity you want, you want a smaller or larger amount of values caught in the zl stream. I generally start with 7 and go from there.

Thanks a lot Rodrigo! This is indeed quite straightforward and easy to implement. I will experiment with this solution. Best!

1 Like

Hi,

In the following thread: rate-of-output-values-of-fluid-onsetfeature, @tremblap suggested that I could share the patch I was working on for BPM estimation. So here is the patch together with a typical piano track I want to deal with BPM.zip (6.7 MB)

Any help on how to improve the robustness or the efficiency of the approach would be more than welcome!

Thanks in advance

1 Like