getmusicbee.com

General => MusicBee Wishlist => Topic started by: paq on December 19, 2013, 01:00:40 AM

Title: [Solved] Some function to help remove arbitrary text from tags, like from "fe...
Post by: paq on December 19, 2013, 01:00:40 AM
Hello all and happy holidays to everyone!

First off, a big thank you for "access to Multiple Artist Splitter entries (http://getmusicbee.com/forum/index.php?topic=10852.0)". It's awesome and I really mean it!

I have been using the multiple artist splitter and filled guest artist fields in. But I have also tagged my music files so that <Title> included some information about guest artists. For example: Foo Bar (feat. Alice and Bob)

Now I wish to display <Title> without that extra part (from where "feat" starts) along with a column showing <Artists: Guest>. Fixing the first is not as easy as the latter:
I'm thinking that the best way to go is to use Virtual Tags, but I don't think current functions will do it. Or maybe I have overlooked something? The one I created tries to replace Foo Bar (feat. Alice and Bob) into Foo Bar (feat. <Artists: Guest> and after that replace the whole last part with nothing.

Now, what would be the best field function to add to MusicBee to solve this problem? And at the same time which might solve other problems too? I'm looking for something more general than specific to this particular problem.

I'm thinking that if the $Contains function would return a number of the index where the string first was found, then it could be combined with the $Left function to solve this case. But then, changing the behaviour of a function would simply cause even more errors...

What about some substring function, which returns the text between two indexes? And where the index can be 0 to mark the beginning of the string and -1 to mark the end so you don't also need a function to count how long the string is. If that was available and also some function which could return where (feat is located in the string, then that would be awesome. And probably good for many other tagging purposes as well! :)

What do you think? Any other ideas?

Title: Re: Some function to help remove arbitrary text from tags, like from "feat" to end
Post by: Alumni on December 19, 2013, 04:26:43 AM
I would suggest mp3tag. I also wanted to clean up my music files so I programmed an action that would bulk edit my entire library, removing the (feat.) expression from the title and adding it to the artist. You could also copy the expression to a new tag if you wanted.
It would be nice if MusicBee could do the same but this might help you for the time being.
Title: Re: Some function to help remove arbitrary text from tags, like from "feat" to end
Post by: Zak on December 20, 2013, 03:38:34 AM
Sounds like the sort of thing that could be handled with proper use of regular expressions.
I'm not sure if MusicBee RE implementation is sufficient, but mp3tag should be able to take the guest artists from the title and move them to another tag.
Title: Re: Some function to help remove arbitrary text from tags, like from "feat" to end
Post by: psychoadept on December 20, 2013, 03:48:14 AM
Actually, if OP is wanting to change the track title, rather than display it differently, I'd suggest sticking with Additional Tagging & Reporting Tools plugin.  There are presets for this kind of scenario, and it minimizes the risk of having to redo multiple artist tags because another program changed them...
Title: Re: Some function to help remove arbitrary text from tags, like from "feat" to end
Post by: paq on December 20, 2013, 12:59:52 PM
Thanks for the replies!

I am familiar with the Additional Tagging & Reporting Tools plugin and it could certainly solve my problem, just like mp3tag would. However, I think I'm leaning more towards just display it differently than changing it, as that offers more flexibility and has less effect on the music files.

Now, what would be the minimum required function(s) to add to MusicBee to solve this without implementing too specific ones? Some search and replace function using Regexp would definitely be one way to go, but I'm thinking that might be too difficult to implement and there might be better alternatives out there, both for us and for Steven.
Title: Re: Some function to help remove arbitrary text from tags, like from "feat" to end
Post by: paq on December 21, 2013, 05:32:10 PM
Good news everyone! I managed to solve the problem with existing functions and virtual tags :-D The $Split function did the trick!

Virtual tag: $Split(<Title>,"(feat",1)
Foo bar (feat. Alice and Bob) --> Foo bar

This is a picture of what it was that I had in mind and can now achieve. In the main view the titles are shown without "feat..." but in other places they are with, just like I want. The Featuring column is simply <Artists: Guests> renamed in the preferences. Happy holidays!
(https://dl.dropboxusercontent.com/s/yi8dsvjw3ypm4eh/FeaturingArtists.png)