15

I'm looking for a library that simplify tempo/bpm audio detection.

Something similar to this http://adionsoft.net/bpm/ , but to use on *NIX machines.

Any language, but preference goes to php, perl, python.

asheeshr
  • 3,918
  • 5
  • 30
  • 49
user58815
  • 151
  • 1
  • 1
  • 3

4 Answers4

11

Mixxx uses the BPMDetect class from the SoundTouch library for BPM Detection. There is also another opensource library called BPMDj which is harder to use but is more accurate.

I personally wouldn't rely on either though. Then again I am a hobbyist DJ so I tend to rely more on my ears.

EDIT

There is a much better OSS library called aubio. It can also do beat detection and onset detection.

ANOTHER EDIT

Mixxx has now moved onto the VAMP Plugins set, which is much better, supports aubio and many other beat detection libraries. It also supports key detection and other audio analysis features.

Phillip Whelan
  • 1,670
  • 2
  • 17
  • 27
  • Thanks i managed to use aubio somehow. Love you guys for all the help. – Diljeet Dec 17 '16 at 06:10
  • https://github.com/owoudenberg/soundtouch.net – RouR Aug 10 '17 at 14:50
  • Install-Package SoundTouch.Net – RouR Aug 10 '17 at 14:50
  • I searched the internet for a lot of libraries for commercial use. i found many codes / algos. I just want to share my results. SoundTouch in 2020 is 80% accurate, aubio is not free, i tried BBC vamp plugins,BeatDektor, SoundEnergy, FilterBPMDetector and many others, i converted many algos from other programming languages to c++ but the results were not good. ............ Finally i settled on Vamp SDK Example Fixed BPM Detector with many tweaks & modification for accurate bpm calculation. I will explain all modifications in next comment – Diljeet Dec 12 '20 at 13:37
  • Vamp sdk has an example FixedTempoEstimator i edited it:--- * blocksize & stepsize should always be same (i use 512),* min/max bpm 20/320(this gives 99% accurate results), just divide or multiply by 2 after that,* in calculate() function at bottom there is a code for weight around 128bpm comment it,* in function process() the loop starts from 1 make it 0,* maxdflen should be 120 or more i.e. 2 minutes of song.* for 1st beat position - maxpi*stepsize/samplerate, it has 99% accurate results compared to Superpowerd SDK which is a paid (its free BSD code). I use this in my android dj app – Diljeet Dec 12 '20 at 13:47
  • @Diljeet How to implement `vamp plugins` on `QT`, Like using `QLibrary` with `.dll` that there is one `func` on it. Is there another way? thx – S At May 24 '21 at 12:47
5

Not a library, but a single class: bpmdetect.{cpp,h} from Mixxx.

  • that code uses soundtouch if I'm not mistaken. If it does not it's part of some very old cruft that is still kicking around in the repository. If it is, I wouldn't recommend using it. – Phillip Whelan May 19 '10 at 16:35
  • To integrate SoundTouch - http://www.surina.net/soundtouch/ just grab the framework from here - https://github.com/fivebats/FBAudio/tree/master/FBAudioLib/SoundTouch.framework – loretoparisi Oct 01 '13 at 20:39
4

Better: http://www.vamp-plugins.org/download.html

1

Also, if you're already using the GStreamer library, there's the bpmdetect element as a part of the soundtouch plugin, a part of gstreamer-plugins-bad. The python gstreamer bindings are meant to be quite good.

RAOF
  • 1,056
  • 9
  • 13