We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, I've been looking at the minim library to implement a sort of DSP on my project. Simply put, I would like to detect the beats of an audio file, namely, the high, mid and low frequencies.
The minim website has a good amount of documentation, but I am unable to wrap my head around some of the concepts. To start, the library includes an inbuilt beat detection function.
However during my testing, the detected onset are not accurate. Naturally this boils down to the different genre and type of music the library was built on and the audio input I have fed the function. I have tried altering the values in the given example but I am unable to understand how the
beat.isRange(lowBand, highBand, numberOfOnsetsThreshold)
works.
Would I be better of implementing my own beat detection using FFT if I would just like to achieve generally accurate beat detection for most genre of music? And if so, are there any examples on how to do so once I have audio spectrum composed?
Answers
@testnia, did you get further on this question? Minim's analysis/package.html documents the two BeatDetect modes (sound energy and frequency energy). If you want something generic, you probably want sound energy tracking because you don't care about high hats etc.
I'm not a Minim user, but the source code on Github is commented if that is helpful -- e.g. the FrequencyEnergyBeatDetection.pde sketch:
https://github.com/ddf/Minim/blob/46408dc3530572274a4e1c6d10fb756b89fdbc76/examples/Analysis/FrequencyEnergyBeatDetection/FrequencyEnergyBeatDetection.pde
If you are implementing your own approach, Minim docs point out that its two beat detection algorithms are based on Beat Detection Algorithms by Frederic Patin.