Author Topic: Picard's "Standardise Performers" plugin after the fact  (Read 1292 times)

Tybot

  • Sr. Member
  • ****
  • Posts: 336
Somehow I've managed to tag a lot of files without having this plugin installed which has resulted in a lot of instrument duplicates:



Some are split:

Performer1 (Guitar)
Performer1 (Piano)

And some are combined:

Performer2 (Guitar and Piano)

Question is, how do I solve this (split the combined ones) from where I'm standing? Running them through Picard again is really not an option. Can this be done in Musicbee directly or by using MP3Tag?

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10721
Why is running them through Picard again not an option?
Last Edit: March 28, 2022, 08:11:58 PM by psychoadept
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest patches (3.5/3.6)
(Unzip and overwrite existing program files)

Tybot

  • Sr. Member
  • ****
  • Posts: 336
Why is running then through Picard again not an option?

I've done it before and I messed up a lot of files, so I generally try to keep them way from Picard once the initial tagging has taken place. There's just so many different releases and I'm not sure all of them have a MBID which means they would have to be matched manually. There's also some tags that are added after Picard which I'm not sure I have a list of and I don't think I ever figured out how to get Picard to leave some tags alone/use their original values while doing what I wanted to others. $unset was not a good idea at all...

I was also hoping to get some general tips/ideas on how to approach mass editing of the perfomer:role tags. For example, there's tracks where the artist is also added as "Performer" and I wouldn't mind removing those, but I haven't been able to figure out how to find those tracks, much less edit them all at once. An example would look like this in the Multiple Artist Splitter:

Alicia Keys: Artist
Alicia Keys: Performer
Rufus Jackson: Bass
Arty White: Guitar
Norman Hedman: Percussion

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1290
If a large majority of your performer roles are messed up, I would honestly either import the entire collection into MP3TAG, delete those tags and then pass them to  Picard to reprocess. If there are some albums where you believe you'd be losing the roles that wouldn't be replaced from MusicBrainz, you could just import all your albums into Picard and manually check them.

The former is the best route to go if you've never added custom roles. The latter is better if you have and it's honestly the best option. You can right click on roles that you don't want changed and click something like "Remove" to keep Picard from changing them.

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10721
There's also some tags that are added after Picard which I'm not sure I have a list of and I don't think I ever figured out how to get Picard to leave some tags alone/use their original values while doing what I wanted to others. $unset was not a good idea at all...

There's a box in options labeled "preserve these tags from being cleared or overwritten...": https://picard-docs.musicbrainz.org/en/config/options_tags.html

You can quickly add a tag to this list by right clicking on the field name in the bottom panel. There is menu entry for something like "add to preserved tags".
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest patches (3.5/3.6)
(Unzip and overwrite existing program files)

Tybot

  • Sr. Member
  • ****
  • Posts: 336
If a large majority of your performer roles are messed up, I would honestly either import the entire collection into MP3TAG, delete those tags and then pass them to  Picard to reprocess. If there are some albums where you believe you'd be losing the roles that wouldn't be replaced from MusicBrainz, you could just import all your albums into Picard and manually check them.

The former is the best route to go if you've never added custom roles. The latter is better if you have and it's honestly the best option. You can right click on roles that you don't want changed and click something like "Remove" to keep Picard from changing them.

I managed to do it with MP3tag by using a regex replace starting with the ones with the most roles and then modifying the formula, working my way down:

Code
What:
(.+) \((.+), (.+), (.+), (.+), (.+), (.+), (.+), (.+) and (.+)\)
With:
$1 ($2)\\\\$1 ($3)\\\\$1 ($4)\\\\$1 ($5)\\\\$1 ($6)\\\\$1 ($7)\\\\$1 ($8)\\\\$1 ($9)\\\\$1 ($10)

Stupid? A bit. But it worked.

I've made changes to Picard to avoid this in the future, but I did run into another problem.

I'm using this formula as a virtual tag to get a tag displaying only the instruments:

$IsNull(<Artists: Performer>,,$RxReplace(<Artists: Performer>,"[^;\(]*\(([^;\)]*)\)","$1"))

This causes a problem as, sometimes, the artist name is added as a performer but without an assigned role, causing their name to end up in my list of instruments. When that's the case, Picard should delete that tag completely as it's essentially a duplicate of the artist tag.

Other times, the name of band members are added as performers, still without an assigned role, causing the same problem as above. Not sure how to deal with this yet. Either adding their roles manually, or assigning a generic role e.g "(Performer)" or simply deleting them all together.

Any tips or ideas on how to handle this will be received with appreciation.

There's a box in options labeled "preserve these tags from being cleared or overwritten...": https://picard-docs.musicbrainz.org/en/config/options_tags.html

You can quickly add a tag to this list by right clicking on the field name in the bottom panel. There is menu entry for something like "add to preserved tags".

Yeah, I found that one after a while. Still a bit scared to mess with files that are already 99% correctly tagged. There was a plugin(?) that added a $keep function to if I recall correctly which I assume does something similar.
Last Edit: March 31, 2022, 03:43:06 AM by Tybot

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10721
I sometimes forget this because I'm used to it, but you can turn off the option to clear tags at all. Then it should only have any effect on tags that are changing. I don't know if that would make it leave the existing performer tags, though
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest patches (3.5/3.6)
(Unzip and overwrite existing program files)

Tybot

  • Sr. Member
  • ****
  • Posts: 336
I sometimes forget this because I'm used to it, but you can turn off the option to clear tags at all. Then it should only have any effect on tags that are changing. I don't know if that would make it leave the existing performer tags, though

You and me both. However, even if you uncheck that box, it will still write the new tags, thus overwriting the existing ones if they're not added to the preserve list. Anyway, I managed to clean up my mess and am now focusing on making sure it stays clean. I've added this script to picard:

Code
$inmulti(%artist%,%performer%),$setmulti(performer,$replace(%performer%,%artist%; ,),)

So far it seems to work as intended so that's one issue solved. The second one is a bit tricky, where names that are not the %artist% are added as performers but without a role...

...As I was typing this I learnt that it wasn't tricky at all and I actually think I got it :D Here's the complete script that seems to be working fine:

Code
$inmulti(%artist%,%performer%),$setmulti(performer,$replace(%performer%,%artist%; ,),)
$setmulti(performer:[Performer],%performer%)
$delete(performer)


Edit: Now, the question that remains: What if a name that is not the %artist% HAS an assigned role but also exists in the standard performer tag, essentially making it a duplicate entry. How would one go about deleting that specific entry from the performer tag? I've managed to merge all the performers with roles into one temporary tag that is then matched against the standard performer tag and takes action if there is a match, but I'm stuck on making that action be a deletion of a specific entry...
Last Edit: April 02, 2022, 05:45:09 AM by Tybot

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1290
Quote
This causes a problem as, sometimes, the artist name is added as a performer but without an assigned role, causing their name to end up in my list of instruments. When that's the case, Picard should delete that tag completely as it's essentially a duplicate of the artist tag.

Other times, the name of band members are added as performers, still without an assigned role, causing the same problem as above. Not sure how to deal with this yet. Either adding their roles manually, or assigning a generic role e.g "(Performer)" or simply deleting them all together.

...

Edit: Now, the question that remains: What if a name that is not the %artist% HAS an assigned role but also exists in the standard performer tag, essentially making it a duplicate entry. How would one go about deleting that specific entry from the performer tag? I've managed to merge all the performers with roles into one temporary tag that is then matched against the standard performer tag and takes action if there is a match, but I'm stuck on making that action be a deletion of a specific entry...

My MP3TAG scripts are so complicated, I'm not sure copy/pasting would them help you, but you can use the $regexp() function to remove performers that match the %artist%.