Audio beat detection - reliable options?

Simon Merrett wrote 08/24/2019 at 21:42 3 points

I'm working on a charity project to provide haptic feedback to a deaf person in sync with the beat of a music play list (songs played one after the other, probably mixed). 

I'm looking for a reliable beat detection routine/algorithm from a mic + preamp (with agc) input. The mic can be right next to the speaker if necessary as we can use an rf link to the user's haptic actuator. 

I'm open to hardware from teensy, ESP32s and SAMD51s and down. If we have to use a smartphone or raspberry pi, we will. But I've tried several real-time beat detection approaches (fft/fht, dsp low pass and bandpass filters, autocorrelation) and nothing seems to work reliably for every beat or even most beats. Filters that focus on drums fall over when the rhythm is in other instruments, etc. 

The problem I now have is that with no clear leader amongst the approaches, I don't know which one to persevere with. Does anyone have a go-to real-time beat detection system for a range of genres? I'm not talking classical music, there will always be clear rhythm, but it might not be drums. 

The other problem I have is that if we miss a beat we want the system to put one in. We can keep track of the beat with a moving average filter but would a kalman be better for estimating the timing of the next beat? 

Thanks