When you DJ or - as I do - dance a lot, the beats-per-minute values of songs are interesting. However, counting them manually is a pain, especially if you have lots of them.

GJay is a software that can calculate the BPM (using a clever algorithm from BpmDJ).

However, it stores the information in it’s own database. Whenever you move the file, you’ll likely have to recalculate it. And so on.

However, the ID3v2 format has a TBPM field for beats-per-minute information, so why not store it there?

gjay from CVS (sorry, the Debian package doesn’t include this yet; I also do not know if this works for Windows) has a standalone mode for analyzing.

So I wrote a tiny python wrapper which can mass-process files, runs them through gjay, parses the XML output via ElementTree and tags the files with mutagen. So get the dependencies - gjay from CVS, python-elementtree and python-mutagen - then run my script. Or modify it to suit your needs, it’s free software.

[Yes, I am aware that there are songs which change speed. So what? I’m not expecting the BPM value to be exact, or to apply from the very first bit to the last…]