Skip to content

A collection of handy tools such as adding Key & BPM to your music library

License

Notifications You must be signed in to change notification settings

Adrian-Winter/Meta-Music-Toolbox

Repository files navigation

Meta-Music-Toolbox

A collection of handy tools such as adding Key & BPM to your music library! 🎵

EXAMPLE:

Renaming tracks according to current meta and then web scraping the KEY and BPM from tubebat.com .🔥

alt text

What can this application do? 👀

This toolbox has currently the following functions:

  • Web scraping Key and BPM from tunebat.com
  • Adding batch tags according to the filename (ID3v1, ID3v2.3, ID3v2.4)
  • renaming the file according to the batch tag

Why did I create this Toolbox? 🎹

I created this toolbox to help me sort my music library and add valuable information for DJing. I can imagine, most people are not interested in knowing the BPM and key of the track they are listening to, but for making smooth music mixes this is essential. Some music vendors such as beatport.com offer this metadata and some DJ software have algorithms to detect the key and BPM of a track. However in my case I didn’t want to rely on these services as I wanted to build my own DJ setup in M4L for Ableton (which I will upload soon...). ☺️

What is web scraping? 🧐

Web scraping is the process of collecting data from websites automatically using software tools. It's commonly used for market research, content aggregation, lead generation, and data analysis. However, it can be a sensitive activity legally and ethically, so it's important to be careful when scraping websites. In this application web scraping is used to gather metadata such as Key and BPM from the database used for the website tunebat.com.

alt text

Requirements 🔄

In order to use this script you need:

  • Google Chrome
  • The addon I_dont_care_about_cookies (included in the repo)
  • Packages: Selenium, requests, music_tag

How to use this application? ⚙️

  1. Run the metaMusicToolboxGUI.py.

  2. Select the folder with your tracks by clicking the "Select Directory" Button.

  3. If your files are in the format artist - track.mp3 click on the Hyphen Separation checkbox.

  4. Now you can click:

    • Scrape Tunebat, which will rename your tracks to the format: artist - trackname_BPM_Key.mp3
    • Meta to trackname, which will read the current meta files of your tracks, and renaim the files to artist - track.mp3
    • Trackname to meta , which write the current artist- and trackname to the meta file.

Both the Meta to trackname and Trackname to Meta functions are implemented to prepare your library for the Scrape Tunebat process. For example if you have a CD the usual filename is: tracknumber - trackname.mp3, but has the right meta. By applying Meta to trackname you end up with a file named artist - trackname.mp3 which then can be used by the Scrape Tunebat function.

Parameters

When you check the recheck Meta checkbox, tracks that already have a key and BPM in their trackname will not be skipped, but overwritten by the tunebat database.

If you check the Hypen separation checkbox, it is assumed your filename has the format artist - trackname.mp3. If not, the whole current filename will used for the search on tunebat.com.

Using the sliders you can decide how close the match of your filename and the database of tunebat.com needs to be in order to be used. When Checking the hypen separation button, it is assumed your filename is in the format artist - trackname.mp3 and therefore you can set thresholds for the artist match and trackname match individually. For my library an artist name thresh = 0.4 and track name thresh = 0.52 worked very well.

If you don’t have your filenames in the format artist - trackname.mp3 you can simply uncheck the Hypen separation checkbox and select a search accuracy of the whole filename compared to the artist+trackname of the tunebat.com database

Feedback

  • Please feel free to let me know if you have trouble getting the results you are looking for.
  • Also what features could be added?

Hope this little app made your project a little bit easier! ☺️

About

A collection of handy tools such as adding Key & BPM to your music library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages