cjcliffe / beatdetektor

BeatDetektor BPM detection / visualization library
http://www.beatdetektor.com
324 stars 54 forks source link

How to determine the BPM data is valid in realtime... #8

Open themindfactory opened 6 years ago

themindfactory commented 6 years ago

So far I think I have the code working, I have currently an array of DFT "bins" 32 of them, 40hz to approx 200hz in 5hz increments... I call the BPM algo by first populating the vector with the bins 1 2 3 ... 32 32 ... 3 2 1... this is correct, I am faking out the FFT vector :-)

I get quality scores that climb as the music is played sometimes in excess of 50,000, is this OK?

The winner # seems to be 10X too big and the winner_lo seems OK, but just is delayed compared to winner...

But in the scenario of printing out the BPM to the screen, how to determine when the time is right and the BPM is currently solid and valid.

Thanks for the awesome code!

RichardS

themindfactory commented 6 years ago

Also as I think some more on this subject....

  1. when you build vector and send it with the "FFT" data 1 2 3 3 2 1 this is size 6??
  2. why does it seem to output data and then stop and "think" for awhile before outputting more data?
  3. I have noticed it will lock in on a BPM faster if my audio input is low.... the louder seems to take longer to lock....
  4. what is the best data to have for the fastest recognition...

Thanks!