(Even though this Tip & Trick is not pertaining to MusicBee solely but needs an external tool (MusicBrainz' Picard), I feel that the results are so nice that it's worthwhile to post it here.)
The goal of this system is to get your music tagged with as many genres as possible, but restricted to appropriate and sensible ones.
It will also make sure the genre names (and their spelling) conform to, and line up with how MusicBee knows and recognises them.
Which is important if you for example use MusicBee's Tag Hierarchy browser.
The second post after this one provides additional background info and details on the workings.
This start post will explain how to set things up:
- Download and install MusicBrainz' Picard.
I strongly suggest the portable version, if only for the benefit of this making it possible to have more than one Picard installation for different purposes.
- Navigate to: Options > Metadata
Make sure these two are checked:
(https://i.imgur.com/s1UK0TJ.png)
- Navigate to: Options > Tags > ID3
set it to use ID3v2.4
(Well, I strongly suggest this. If you have reasons to stick to v2.3 so be it.)
- Navigate to: Options > Plugins.
In the right panel scroll down to Wikidata Genre, and click the green arrow icon. (download and install)
- Apply [Make it So!], and restart Picard.
- Under Options > Plugins there should now be an options tab for Wikidata Genre. (you can leave everything there as is)
- Check the other Option tabs to set other personal preferences if so desired.
- Important suggestion: You will probably want to uncheck everything under Albumart to prevent downloading and writing of artwork! (Options > Cover Art)
Stricken-through since I have changed my opinion about using the Wikidata plugin (Because of its very bad results I don't use it anymore)
- Navigate to: Options > Genres
Set the checkboxes and values as in below screenshot, and copy the genre whitelist into the include/exclude box.
(https://i.imgur.com/CwLn1Dq.png)
Over time the whitelist and the scripts have grown to such lengths that the forum engine doesn't allow including them in this post as code anymore.
(exceeding maximum length)
So the whitelist and the scripts are now available as a download here (https://rebrand.ly/Picard_Genre_whitelist_and_scripts)
Next, another essential part: adding scripts.
I have provided two of them that are needed for this to work well.
- The first one makes it so that the retrieved genres are named and written in a uniform way, so that they will align well with MusicBee and the (optional) Enhanced Genre Hierarchy List.
- The second one is very important, since it will make sure only the Genre tag gets written, and all other tags will remain unchanged.
(experienced Picard users can probably ignore this one since they will likely already have their own 'unset' scripts in place)
How to add the scripts:
- Navigate to: Options > Scripting
- Check the checkbox at the top next to:'Tagger script(s)'
- Paste script #1 in the blank pane on the right.
- On the left, rename 'My script 1' to your liking, e.g. 'Genres'.
- Click [Add new script]
- Paste script #2 in the blank pane on the right.
- On the left, rename 'My script 2' to your liking, e.g. 'Unset tags'.
- Make sure the checkboxes for both scripts are checked.
You then should have something like this:
(https://i.imgur.com/O8Ope5O.png)
- Apply and close.
That's pretty much it.
If you don't want the original 'Genre' tag to get written/updated, but have another tag set up for this purpose (e.g. a 'Subgenre' tag), see post #2 for how to do that.
______________________________________________________________________________________________
Detailed explanations on the actual use and workings of Picard are beyond the scope of this topic.
There are very good tutorials on that to be found (like the quick-start (https://picard.musicbrainz.org/quick-start/) and the full documentation (https://picard-docs.musicbrainz.org/)), so here is only a quick-and-dirty to at least help to get started a bit:
- Drag an album folder to the left panel.
- Press 'Cluster'.
All album tracks should now get gathered as an album.
- Select the album and click 'Lookup'.
It then will usually get matched and moved to the right panel.
(if that failed try 'Scan' instead of 'Lookup')
When next, you select the album in the right panel, you will see all present tags, and the suggested genre tag changes in the bottom panel.
Only the 'Genre' tag should be written in either green or light brown. (which indicates that a tag has new or altered content and will get updated and written to the file if you press 'Save')
- If the info displayed in the bottom panel is to your satisfaction, press 'Save'.
Now if you (re)scan the tracks in MusicBee you should see the newly added genres.
I also strongly suggest to check out the Enhanced Genre Hierarchy List (https://getmusicbee.com/forum/index.php?topic=35266.msg192822#msg192822), since it will allow you to get the most out of navigating through your genres, and is fully compatible with the above scripts, the whitelist and the genre names this workflow produces.
______________________________________________________________________________________________
As always!!! :
Do your first (and second, and third) tests on copies of your music files!
Especially if you are new to Picard.
It is a very powerful tagging tool that can easily be configured to do things you did not intend or may not like.
______________________________________________________________________________________________
Some further information and more details on the workings.
This system will retrieve genre information from MusicBrainz.
I would have liked it to additionally retrieve genres from RYM/Sonemic since they have a very good genre database, but regrettably they—still—don't have an API available.
I have decided not to use Discogs and LastFM as sources, since personally I am not that impressed with the quality of the genres that they provide.
- - - - -
One advantage of this specific configuration (my opinion, you may have a different one) is that it will try to provide relevant and appropriate genre tags on a track basis.
So if an album contains tracks of different genres, each may get (a) different genre(s).
Which is what I personally prefer and think is 'right'.
Something like this could be a possible result:
(https://i.imgur.com/cBmtKqtm.jpg) (https://i.imgur.com/cBmtKqt.png)
- - - - -
The way this system names the genres is optimally aligned with the Enhanced Genre Hierarchy file that can be found here:
Enhanced Genre Hierarchy (https://getmusicbee.com/forum/index.php?topic=35266.0)
But MusicBee's default genre list should also work well, since it has the same fundament as the Enhanced version.
It's just not as complete, and hasn't been updated for a while now.
- - - - -
extra tip:
Users that don't want their original Genre tag altered or (over)written, but have for example set up a 'Subgenre', or another tag for this in MusicBee only need to make a small edit in script #1:
- Navigate to the bottom of script #1
- you'll find these two lines there:
(https://i.imgur.com/9FPhHdP.png)
- Change the two instances of 'genre' to the tag name of your choice.
- Add the command: $unset(genre) at the very bottom.
It should then look like this:
(https://i.imgur.com/xUvizwE.png)
Now your 'Genre' tag will remain untouched, and genres will only be written to the tag of your choice.
- - - - -
An important note regarding mp3's:
For mp3 files, both Picard and MusicBee are expected to be configured to use ID3v2.4 for all this.
If you have reasons to use ID3v2.3 instead, I am not sure what the results will be.
- - - - -
If while testing and using this system you find any unclarity or oversight in the how-to write-up, or encounter unexpected or bad results, please report them here.
I can use the input to improve on the how-to or the scripts if needed.
- - - - -
Good luck, and now you have no excuse to be lazy or bored on new-years day ;-)
All the best for 2022 to everybody!
- - - - -
update 14-05-2022
a virtual tag to improve displaying genres in the Track Information panel:
This method of retrieving tags can result in ending up with a lot of genres for a track.
When you have set the Track Information panel to display <Genres>, the two options for that panel are to either show all of them on a single line, or have them split up over several lines.
The first option will only show the first ones and cut off all the othe…
The second option will often result in ending up with a very large amount of rows, wasting a lot of vertical space.
To solve that problem I created a virtual tag that will split up the genres in groups of four for the first three lines.
If a song has more than twelve genres, the rest will will be displayed on line number four.
So this genres display will take up between one and maximum four lines.
As an example how that could turn out:
(https://i.imgur.com/GljRiMh.png)
this is the virtual formula:
$RxReplace($Replace(<Genres>,;, ·),"^((?:.[^·]*·*){0,4})((?:.[^·]*·*){0,4})((?:.[^·]*·*){0,4})((?:.[^·]*·*){0,4})(.*)(.*)(.*)","$1;$2;$3;$4;$5;$6")
Give it a name, and use that virtual tag to display genres in the Track Information panel.
(make sure you tick 'split multi-value tags into rows' for this virtual tag)
tip:
The script will allow for maximum 4 genres per line.
If you prefer to have it show a different maximum number of genres per line:
Change all instances of {0,4} to the number you desire. E.g. change it to {0,3} if you want no more than three genres per line.
edit
I completely forgot/overlooked that you can also simply set the row count to e.g. 3, and disable 'split multi-value tags into rows'.
That gives similar results. Except that then semicolons are displayed instead of commas, and genre names that consist of two words can get broken up to the next line.
So, my solution works better and looks nicer ;-)
It's script #1 that will do that.
Did you perhaps modify the script?
I didn't change, no... I have this for the case, copied and pasted from yours:
$setmulti(_genre,$lower(%genre%))
$setmulti(_genre,$map(%_genre%,$upper($substr(%_loop_value%,0,1))$substr(%_loop_value%,1,)))
Edit:
Never mind, adding a paragraph between the two lines above and the rest of the script just like you did on the screen shot in the OP solved the issue :)
The matter of the (sometimes large) amount of genres that Picard will be able to retrieve from MusicBrainz' database has been itching in the back of my head a bit.
It's not that problematic, since most of the proposed genres will make some sense, but there is also quite some redundant garbage in the genres that MusicBrainz/Picard is providing.
For example:
It has a lot of music that is labelled 'Jazz' when it is only somebody playing the saxophone.
It has a lot of music that is labelled 'Electronic' if only someone is playing a synthesizer.
And if the word 'woman' is in the title it is 'Blues'.
etc.
So this afternoon I had some thought on one path to attack this problem:
I am assuming that when a song/album gets a very large amount of genres matched to it (e.g. more than 10), a lot of them will be useless or incorrect.
That made me create a virtual tag that will show the amount of genres a song has been matched with:
$If($Len($IsNull(<Genre>,,$RxReplace(<Genres>,"([^;]+)","");))=0,,$Len($IsNull(<Genre>,,$RxReplace(<Genres>,"([^;]+)","");)))
It will display the amount of genres attached to a song.
This can be useful to filter out songs/albums that have an unrealistic amount of genres attached to them.
I am using this to filter out the most problematic ones in my library, and edit their genre entries at the MusicBrainz database.
I just thought to share this with other users that are actively helping in trying to improve the MusicBrainz database regarding genres.
It will surely help in getting even better results if others contribute and improve on it.
edit:
In case of doubt on what genres to apply to your music:
Check RYM (RateYourMusic)
It's by far the best one out there regarding genres.
edit 2:
fun poll:
What is the largest amount of genres a song has been appointed to in your library?
Mine is Dare by Gorillaz.
28 genres…
I will be checking that one in a few days again to see if you also care about this stuff and actually did something about it ;-)
I was wondering if there is a way to use word wrap or if it's just something that'll come down to panel size and luck of the draw
When the tag splits the lines, it leaves the · behind.
Both are intentional.
- I don't like genre names getting cut-off to a next line.
If you want that you could simply use the <Genres> tag instead of my formula.
(disable 'split into rows' and set the number of rows that you want)
- The trailing middle dot indicates there are more genres to follow.
edit:
Playing around a bit with non-breaking spaces, I created one that seems to work nicely too.
It will neither truncate, nor cut-off a genre name to a next line.:
$Replace($Replace(<Genres>," ",$Char(00A0)),;$Char(00A0)," · ")
1. It requires the Additional Tagging & Reporting Tools plugin to be installed. (a recent version of it)
2. Set the panel to not split tags into rows. Set the max.row span to your preference.
I am sorry hiccup, I have another question about your tutorial.
How do you manage to get your genres written in capitalized case? I mean, I see on your screenshot that every genre are capitalized "Alternative rock; Blues rock..." when I get "Alternative rock; blues rock".
Is it something I have to set in Picard or in Musicbee, or is it in your scripts? I took a look at all the options and didn't find what I was looking for...
Thanks!
I just installed Picard today and added these scripts and I'm having the same problem. The tagging works, but the capitalization seems to not properly loop for subsequent genres, so it only capitalizes the first one. I've removed the 2nd line for now so that everything will be consistently lower-case, but I don't know what else I can do to fix this on my end aside from learning how to script with this myself. I've tried deleting and re-pasting the code from the txt file, proof-reading with what little example is provided here, and re-launching Picard with some different settings like ID3 versions.
Here's what the script looks like:
(https://i.imgur.com/jh1AjVB.png)
$setmulti(_genre,$lower(%genre%))
$setmulti(_genre,$map(%_genre%,$upper($substr(%_loop_value%,0,1))$substr(%_loop_value%,1,)))
$replacemulti(%_genre%,Aor,AOR)
$replacemulti(%_genre%,Eai,EAI)
(https://i.imgur.com/PqmFLoL.png)
$replacemulti(%_genre%,Tape music,Tape mmmmm)
$replacemulti(%_genre%,Turntable music,Turntable mmmmm)
$replacemulti(%_genre%,Video game music,Video game mmmmm)
$setmulti(_genre,$rreplace($rreplace(%_genre%,\( folk music;\), fffff;),\( folk music\)\$, fffff))
$setmulti(_genre,$rreplace($rreplace(%_genre%,\( traditional music;\), ttttt;),\( traditional music\)\$, ttttt))
$setmulti(_genre,$rreplace($rreplace(%_genre%,\( music;\),;),\( music\)\$,))
$setmulti(_genre,$replace(%_genre%,mmmmm,music))
$setmulti(_genre,$replace(%_genre%,fffff,folk music))
$setmulti(_genre,$replace(%_genre%,ttttt,traditional music))
$setmulti(_genres,$unique(%_genre%))
$setmulti(_genre,$unique(%_genres%))
$setmulti(genre,%_genre%; %period%)
$cleanmulti(genre)
I'm using the portable Picard 2.11 on Windows 10, with the "Picard genre whitelist and scripts v1.240329.rar" provided by the dropbox link. I'd appreciate it if anybody could help me out, but still the script works as-is and it's incredibly useful.