Author Topic: Defining a custom "featuring" tag that will auto-populate for everything  (Read 1592 times)

Reggie10

  • Newbie
  • *
  • Posts: 8
Hi everyone - having a lot of fun just diving in and tinkering with MB but have been stuck on something for awhile and am turning to the community for help.

I'd like to define a custom tag ("Featuring") that will display guest artists. I have my FLAC tags set up as follows:

Album artist: Nas
Album: Illmatic
Artist: Nas feat. AZ
Song: Life's a Bitch

I'd like to run a script for my custom tag that will print whatever comes after "feat. " in the Artist field, so that in this example, AZ would be listed in his own column under Featuring. I would then like this field to automatically populate for everything I add to the library without my having to do anything.

Is this possible? I'd like to do it this way so as not to mess around with the way I already have things intrinsically tagged.
Last Edit: February 27, 2020, 03:33:25 AM by Reggie10

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10632
Hi, welcome to the forum!

The Additional Tagging and Reporting tools plugin can do this for you, although proceed with caution. Because it's very powerful it's also easy to mess up your collection with it.

 And there's already a tag for this, called "Guest Artist".
MusicBee Wiki
Use & improve MusicBee's documentation!

Latest beta patch (3.5)
(Unzip and overwrite existing program files)

boroda

  • Hero Member
  • *****
  • Posts: 3594
"Extract guest artist..." preset can extract featuring artist from *track title*.  copy this preset and change source tag from "title" to "artist" in preset copy. 

boroda

  • Hero Member
  • *****
  • Posts: 3594
i've created new ASR preset "Extract featuring artists from tag 'Displayed artist' and add them to the (Guest) 'Artist' tag..."

Reggie10

  • Newbie
  • *
  • Posts: 8
Wow, thanks! I did a little bit of tweaking and got it working exactly how I envisioned. Could you tell me how to get this to automatically apply to everything currently in my library, and everything I'll add in the future?

Reggie10

  • Newbie
  • *
  • Posts: 8
If you're curious, this is how I tweaked your preset: https://imgur.com/01deR8s

The result is that the Featuring tag populates while leaving my Artist tag completely unaltered, like so:



As you can see though, only the song "Set Me Free" has the field populated (the song I used as my guinea pig track while I was playing with the preset). Would love for this to apply to my whole library.

Reggie10

  • Newbie
  • *
  • Posts: 8
I spoke too soon. I closed MusicBee for about half an hour, then opened it back up to this:



Looks like most of the values in the Featured column are repeating ad infinitum while a few tracks did not populate the column at all. Pretty stumped at this point.

boroda

  • Hero Member
  • *****
  • Posts: 3594
untick (+)  checkbox in step 2 in preset editor. also, untick checkbox next to <custom text 2>, which you are not using anymore.

to apply preset to all tracks in your library select all tracks (ctrl+A), then apply preset. to autoapply this preset to new tracks in future tick preset in main asr window.


Zak

  • Member
  • Hero Member
  • *****
  • Posts: 2133
You could have also just used this virtual tag which would work on all tracks without having to change any tag values at all:

Code
$Split(<Artist>," feat. ",2)
Bee excellent to each other...


Reggie10

  • Newbie
  • *
  • Posts: 8
Well I have a long history of making things more complicated than they need to be and I suppose this is just another example of that.

Is there documentation somewhere of how the type of code used in Zak's post works? Would love to learn it and do some tinkering with virtual tags at some point.

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7720
Well I have a long history of making things more complicated than they need to be and I suppose this is just another example of that.

Is there documentation somewhere of how the type of code used in Zak's post works? Would love to learn it and do some tinkering with virtual tags at some point.
This was current as of v3.1, so there may be new functions that aren't in the article.
https://musicbee.fandom.com/wiki/Functions
Download the latest MusicBee v3.4 patch from here.
Download the latest MusicBee v3.5 beta patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
Check out the MusicBee Wiki.
How to post screenshots is here

Reggie10

  • Newbie
  • *
  • Posts: 8
Nice, thanks.

Here's the custom tag I put together that extracts my featured artists and also handles compilations:

Code
$If($Contains(<Album Artist>,"Various artists")="T",<Artist>,$Split(<Artist>," feat. ",2))

This works if your Artist tag is formatted as I described in my original post above. For compilations, I simply list the Album Artist as "Various artists" and the Artist as whoever is actually on the track. Works great.

Thanks again to everyone who helped me out here.