WIP Beats Per Minute (BPM)
#1
Whilst adding extra dates to Kodi's music library I decided to add processing of TBPM as well.  Works with MP3 tags (v2.3/v2.4), Vorbis, ApeV2, mp4 and wma tags.  Can be used to sort into bpm order so slower to faster (or vice-versa) and can be used to filter.  Works in smart playlists so you can pick out tracks all at the same speed.

Maybe the odd DJ out there will like this ??  Other than that, I've seen it requested a few times and as I was adding some tags it seemed like an appropriate time to add another!  Just need to get it approved now.  If you can build from source, grab it from https://github.com/the-black-eagle/xbmc/...xtra_dates - includes original release and album release date processing.  Note that if you build it, it will upgrade your database but you will have to re-scan your library manually to pick up the extra tags.  This build will not prompt you to do that.
Learning Linux the hard way !!
Reply
#2
As long as there isn't a relevant setting/tag for mood this may be the next best thing to get the music right for a romantic evening :-)
Reply
#3
I'd find this very useful for my Electronic music. Will this be a PR soon?

Nice website that can be used to find the BPM as well

https://getsongbpm.com/
Reply
#4
(2020-02-12, 10:43)docwra Wrote: I'd find this very useful for my Electronic music. Will this be a PR soon?

Nice website that can be used to find the BPM as well

https://getsongbpm.com/

Ha, wasn't aware of that site.  Looks like it has a nice easy API to integrate with a python addon/scraper.  I just used a plugin for Picard to set the bpm for some songs and then when I was adding the jsonrpc stuff, I just used random values to make sure it was getting/setting correctly.

As regards a PR, I'm hopeful that it'll be soon'ish' but you know how code goes with Kodi Wink  I don't really see the point of adding the bpm stuff separately from the extra date tags I'm adding as each addition requires an alteration to the music db and so a version bump (and the user to re-scan to populate the new values) so I'd rather just put it all in the one PR.

That said, all the date stuff I've done is working so I'm really just waiting for Dave to give it a look over and see if it's anywhere near or if there are still changes that he'd like.  Once the design is approved, I'll PR it to master but I don't want to do that without Daves input as I might be trampling on work he has in the pipeline.
Learning Linux the hard way !!
Reply
#5
Very cool -- thanks! Would it also be possible to make smart-playlists based on BPM? E.g. a Smart Playlist for all the tracks with a certain genre, having BPM >= 100 and <= 120?

I'm using MP3Tag and MixMeister BPM Analyzer to set the BPM tags of my MP3s.
Reply
#6
(2020-03-06, 23:14)annomatik Wrote: Very cool -- thanks! Would it also be possible to make smart-playlists based on BPM? E.g. a Smart Playlist for all the tracks with a certain genre, having BPM >= 100 and <= 120?

Yes, that should be possible.  I have raised a PR https://github.com/xbmc/xbmc/pull/17437 that includes BPM tags along with original date tags.  Smart playlists can be based on bpm = some value or with two rules between a lower and upper value.  You should be able to add any other smart playlist rules like genre to further filter the playlist.
Learning Linux the hard way !!
Reply
#7
Just FYI... if you don't want to rely on MusicBrainz for BPM tags, there's an add-on for foobar2000 that can analyze and write BPM to tags.
Reply
#8
@HeresJohnny MusicBrainz doesn't supply BPM tags at all.  I used a plugin for Picard to generate mine but it's Linux only so good to know there are solutions on other platforms.
Learning Linux the hard way !!
Reply
#9
(2020-03-09, 21:17)black_eagle Wrote: I used a plugin for Picard to generate mine but it's Linux only
I noticed there is a second MusicBrainz plugin for BPM as shown in the image. I assume this does the same thing? What is the Key tag used for and if this is in ID3v2.3 how does it affect my ID3v2.4 tagging?

Image
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#10
Key is TKEY - The initial key the song is in.  It's an id3v2.4 tag as well as 2.3 and both tags are the same format, a string of maximum 3 characters.  Shouldn't affect your id3v2.4 tags in that case, but I guess it's always wise to check on a couple of files first.
Learning Linux the hard way !!
Reply
#11
Ok thanks. I did test on an album first and could see no problem.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#12
(2020-03-09, 21:30)Karellen Wrote:
(2020-03-09, 21:17)black_eagle Wrote: I used a plugin for Picard to generate mine but it's Linux only
I noticed there is a second MusicBrainz plugin for BPM as shown in the image. I assume this does the same thing? What is the Key tag used for and if this is in ID3v2.3 how does it affect my ID3v2.4 tagging?

Image

I believe that plugin does not do any analysis on your files to detect the BPM, it simply uses what's stored in the AcousticBrainz database, so is reliant on that being correct.

I also guess that as it's reliant on a database, there may not be entries for all albums either.
Reply
#13
(2020-02-08, 22:02)black_eagle Wrote: Just need to get it approved now.

It's now 5 months later... Can you give a current status please?
Reply
#14
Feature is now available in v19 nightly builds
Reply
#15
Cool, Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Beats Per Minute (BPM)0