Author Topic: Apply a virtual tag formula to multi-part tags?  (Read 1143 times)

jippijip

  • Jr. Member
  • **
  • Posts: 47
Currently, I use a virtual tag formula to convert composers' names to [lastname, firstname] format for use in the column browser. However, I have a few tracks with multiple composers, and the formula I'm using stumbles on the multiple entries. How would I go about constructing a tag formula that can deal with multiple composers delimited by semicolons?

My current formula:
Code
ComposerLF = $IsNull(<Composer>,,$If($Contains(<Composer>," ")="F",<Composer>,$RSplit(<Composer>," ",1)", "$Replace(<Composer>*,$RSplit(<Composer>," ",1)*,)))

I've tried using ASR functions from Advanced Tagging Tools, but it made all the tracks in my music library disappear every time I tried to implement it.

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10717
I guess you would start by splitting at the semi-colons, then have it process each piece individually. You'd have to make sure it covered the maximum number of iterations it might encounter in your library, though.

Or maybe you could just use Sort Composer and forgo the virtual tag. In this case, that might be less of a headache.
MusicBee Wiki
Use & improve MusicBee's documentation!

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

jippijip

  • Jr. Member
  • **
  • Posts: 47
Is there a way to make Sort Composer use lastname, firstname without manually inputting it for each composer? I have something like 600 composers in my library, and it'd be more elegant if it were automatic. Though I suppose ASR could do it pretty easily, I'd have to remember to change the sort composer for any new composers I add to my library.
Last Edit: July 21, 2018, 09:06:00 AM by jippijip

psychoadept

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10717
ASR could certainly do it, if you don't tag with a program that retrieves sort composer. Just beware you need to enter the values as "composer: last name, first name" if you have MusicBee's custom sorting activated
MusicBee Wiki
Use & improve MusicBee's documentation!

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