Picard 2.x and genres. Good practices? Advice on plugins?

Thanks, that’s a good find that I overlooked, probably because it doesn’t clearly indicate what it’s for.
Do you understand, and could you explain what it does exactly?

Not sure but it improved the data and almost eliminated the multiple genre tags. My guess is, that it is more of a ranking then a percentage. The more upvotes or same inputs move it up the scale.

It limits tags to the most used ones, compared to the most used tag. For example you have the following tags assigned:

  • rock: 30 times
  • folk rock: 25 times
  • alternative: 4 times

The most used tag is rock, which was assigned 30 times. This is our maximum. The other tags get compared to this. So we get the following percentage values for the tags:

  • rock: 100%
  • folk rock: 83% (25 / 30)
  • alternative: 13% (4 / 30)

If you set the percentage to 70% Picard will use both rock and folk rock. Setting it to 100% usually means you will only get the most used tags (it could still be multiple, though).

I just checked the default values: The last.fm plugin sets this to 15%, which gives a preference of using more tags even if they seem to be off. Picard’s own tag support has a similar option which defaults to 90%. This prevents outliers from being included in tags. I think a higher value is actually a better default, unless your goal is to have as many genres listed as possible :slight_smile:

5 Likes

Thanks for explaining @outsidecontext

I’ll experiment with that slider. Maybe it will solve getting tags for a certain female singer populated like this when using the Last.fm plugin:

“People I Want To Have Sex With; Singer-Songwriter; Feminine Cavern Of Love; Vaginal; Female Vocalists; Chanson; Groove; Nouvelle Vague; Indie; Mount Me And Ride Me Like A Pony; French; All; I Would Like To Spend An Afternoon Rubbing Her Breasts With Warm Mineral Oil; Female Vocalist”

I am certainly not an advocate for censorship. So if people spill their guts with garbage (and Last.fm has no adequate filtering system in place), it’s on them and I can handle it.
But it might be a good idea to explain this function a bit in Picards’s setting panel for the Last.fm plugin?

I’ve tried the Wikidata genre plugin, but it uses “/” as a separator instead of " / " (space, slash, space), which is what I specified in the Metadata > Genres > Join multiple genres with setting.

How can I fix this, or get genres separated by " / "?

The issue is that this format is incompatible with my media server (Kodi).

The current version of the plugin does not join genres at all, they are handled as a multi-value tag. If you have Picard configured for use of ID3 v2.3 the tags will be joined with the delimiter configured at Options > Tags > “Join multiple ID3v2.3 tags with”. This setting defaults to /, but you can change it.

If you are interested @GrokMan is working on an improved Wikidata plugin that offers some configuration option, including setting the delimiter.

2 Likes

Thanks. I do have Picard configured for use of ID3 v2.3. Does this only apply to tag info from the MusicBrainz database?

I am interested in an improved Wikidata plugin. Is there some way I can help?

This example is horrible, it’s actually a good argument for a whitelist approach. The discussion about black vs white listing of genres came up years ago, but nobody did the required work. But now that we have that server side whitelist I’m thinking about using it for other genre plugins as well, especially Last.fm. At least it could be a reasonable default.

But increasing that “minimal tag usage” percentage to 90% or so should also help much, and we should really change the default here.

3 Likes

Yes, you can test it and give feedback. I packaged the updated plugin up and upĺoaded it to https://transfer.sh/AfxJc/wikidata.zip

Just place this ZIP file in Picard’s plugin folder. You can do this from inside Picard using Options > Plugins > Install plugin… . Make sure that the plugin is enabled. After first install / activation you will have to close the options and open them again, then you will have additional settings under Options > Plugins > wikidata-genre

1 Like

This garbage example was a bit extreme and rare, and only present when using Last.FM’s artist tag for this specific performer.
Using track tags didn’t show it.

After doing some tests with different percentages it looks like the default 15% setting isn’t that bad.
You can surely filter out some garbage by setting it higher, but you will also quickly loose a lot of possibly useful tags.
And even with a setting of 80% it shows that somebody labeled Aphex Twin as “F…g Wh…e”.

==

The option to use whitelisting for genres seems a good approach to me.

This is probably too far fetched and complicated to make it a reality, but since we are sharing ideas here:

One problem that I see is that all sorts of words and descriptions are usually thrown in one big pile, and that pile is then called ‘genres’.
But of course descriptions such as, avant-garde, 60’s, Top40, Soundtrack etc. are not genres but keywords or descriptions.

Ideally I would use:

  • A ‘genre’ tag that contains actual genres. (strict)
  • An additional tag that contains subgenres. (strict)
  • A tag for style/form, such as A capella, Duet, Industrial, etc. (whitelisted)
  • A tag for keywords that people might consider useful, such as Top40, Stadium Rock, Soundtrack, Piano concerto, etc. (loose, and possibly blacklisted to prevent profanity)

I am using something like this myself already, using a list I created a while back. (it does probably need some updating)
You can find it here, perhaps it’s useful as some starting point or to fuel the discussion:

http://bit.ly/PicardGenres

edit:
I see that sites such as AllMusic and Discogs are doing something like this already:

1 Like

I’ve been thinking of creating a genre filter plugin that adds a set of script functions to filter the genre tags.

Wikidata has a good list of genre and can have a list of parent genre’s.
See http://tinyurl.com/y7vkp8yr as an example query.

The idea would be to run this query once and save this for the next run.

The easiest script would be to filter against the list.

Another thing I was thinking of is try and simplify the list of genre’s and replace a sub-sub-sub genre with a parent genre. As we have parent genre’s you could find an item in the list and find the shortest path to a list of basic genre’s such as rock and use the parents instead.

1 Like

Wow, that was fast! I am trying it out and so far it seems to work as expected. The " / " separators appear correctly. I had to restart Picard to get the new plug-in to install and to see its Options, but I suppose that’s about the app not the plug-in itself.

1 Like

Hi

The genre base grows nicely and thus some problems appear, imho. We have several levels of genres, they’re in:

  1. Artist
  2. Release group
  3. Release
  4. Track

For example, let’s take an album:

Picard:
obraz

The problem is that: 4 of 13 tracks has different genres. I personally prefer Release or Artist tags. And thats why we need in Picard something like in Last.fm plugin:

obraz

but I would expand these options additionally:

  • Artist tags
  • Release group tags (when the Release does not have tags it will use it from Release group)
  • Release tags
  • Tracks tags

What do you say?

P.S.I forgot to add that I use only built-in Picard genres.

1 Like

I agree that e.g. “Fall back on album’s artist’s genres…” would benefit from having a separate tickbox for each type of relevant entity (Artist, release group, release, track… and maybe even label?) I’ve sometimes independently tagged the genre of specific tracks on an album, but when it comes to the more practical level of actually listening to the music, I’d like to keep each album’s tracks together, so I’d love to be able to untick this for tracks only.

1 Like

Indeed. Thankfully, Zas has implemented this (for MB genres, not last.fm ones), so hopefully that will be in a future version of Picard soon.

Very interesting work from @Zas, I only hope MB’s own database tag fields will be populated by more people real soon now …

Over the past so many years, I’ve been using fdemmer’s Last.fm.ng plugin quite successfully (with my own config.ini of course). Note this is not the same as Picard’s Last.fm plugin!

It already lets you specify a whitelist, categories, number of tags, tag translations, album genre fallback and whatnot and takes its data from last.fm. You can find my tagger script using it and the corresponding config.ini for the plugin in Repository for neat file name string patterns and tagger script snippets. I think it’s well worth a look and a deeper dive into its documentation.

A word of warning, though: Results can be horribly bad if there are several artists of the same name, like, say a pop group and a death metal band. You’d have to correct the genre and grouping tags manually in this case.

The plugin isn’t perfect, but it’s probably a good start until we can get more from the MB database. Be aware that it will slow down lookups considerably because of last.fm query rate limiting.

1 Like

Could you maybe reupload this? Would love to try, I’m kinda desperate here as nothing can find genres automatically for me.

I also can’t get last.fm.ng to run on a mac.

The latest version of the Wikidata plugin is available in the official Picard plugins repository. You can install it from inside Picard in Options > Plugins.

Best would be probably to ask the author of this plugin, @fdemmer, for help. Not sure if he is active here on the forums, maybe ask on GitHub - fdemmer/Picard-Last.fm.ng-Plugin: A last.fm-tag plugin for MusicBrainz Picard . But you can also open a new discussion here and provide details what exactly is not working for you, maybe somebody can help.

Please note that this particular plugin might be a bit more difficult to setup since configuration is done via a separate configuration file.

Anyone have any further advice on Genre’s? I’ve enabled the default last.fm plugin, and have experimented with the percentage, even pumped it up to 100%. However, I still get genres like “Fuck Yes” and “Better than Selena Gomez” and “Best Song Ever” from last.fm. It’s really aggravating. I understand there’s a blacklist, but with so many user-entered tags in last.fm there is no way I can catch them all.

For example, this very well known song: https://musicbrainz.org/recording/e0afc851-6df3-42b9-877e-4575200a23c5 pulls the Genre from last.fm as “Bhangra / Epic / Masterpiece / Fuck Yes” with minimal tag usage set to 100%.

I tried Folksonomy, but the tags are pretty inconsistent and the hit ratio is super low compared to last.fm. I kept getting “Jazz” as a genre for a funk album called “100% Funk” that is all funk music. I suppose it might technically be correct in a way to say it’s Jazz, but it definitely should at least include “Funk”.

I switched to wikidata-genre too, but as a poster in here already said it takes a ton of API calls and forever to get a result. When I tried scanning 25 songs with wikidata-genre enabled, it went up to 400 requests. With last.fm instead of wikidata-genre, it was only at 50 something requests. That’s an insane number of requests to get a basic piece of data (but I don’t doubt it has to do with the architecture of the API, and there’s nothing the plugin can really do).

I may have to keep using wikidata-genre to bulk scan files and then return to my computer an hour later to actually commit the new data once it’s all pulled.

EDIT: I am actually on version 2.0.4 released about a year ago – I am going to upgrade and see if that makes a difference!

EDIT: The update didn’t really help at all for Genre’s unfortunately.

EDIT: Jim Henson’s Fraggle Rockin’ CD is tagged as “Songs About Masturbation” by last.fm … I don’t think I can use last.fm anymore.

1 Like

My last comment hopefully for a while – I am really liking the genre’s straight from MusicBrainz and am probably going to go that route, editing in any genre’s that are missing as I go.

4 Likes