Complicated Field Editing Format

Hello MP3TAG Community, I've recently done very basic tag edits with the help of this community. I'm now looking to create my ideal "End All Be All" tool. I've always put my files into a particular format that I find most suitable for viewing.
For clarity's sake, I will show a template and a few examples. One thing to note is that not all songs being edited are remixes, but I choose to show the remix portion in the template because it is integral to many songs in my library, particularly electronic artists.


Template:

FILENAME: (Identical to TITLE)
TITLE: {song name} [ _____ Remix]
ARTIST: {All vocal and remix artists}
ALBUM: {Album name with no EP or - Single in name}

For clarification, the challenges I'm facing and unsure about are

  • Adding the Feat. artist as well as the remix artist to the ARTIST tag (including when there are multiple of either - I'll give an example).
  • Removing EP, - EP, - Single, or Single from the ALBUM field.
  • Changing all parenthesis to brackets ONLY in the _____ Remix or _____ Mix portion, around Acoustic or Acoustic Version, or around Demo within the TITLE field
  • Changing all parenthesis to brackets in the ALBUM field

Example 1: Intense remix with multiple remix artists

FILENAME: 10 All My Love (feat. Conor Maynard) (BOXINBOX & Lionsize Remix)
TITLE: All My Love (feat. Conor Maynard) (BOXINBOX & Lionsize Remix)
ARTIST: Cash Cash
ALBUM: All My Love (feat. Conor Maynard) (Remixes EP)
<<<<<<<<<<<<<<<Would Change To>>>>>>>>>>>>>>>
FILENAME: All My Love [BOXINBOX & Lionsize Remix]
TITLE: All My Love [BOXINBOX & Lionsize Remix]
ARTIST: Cash Cash\\BOXINBOX\\Lionsize
(I believe that the double backslash is a divider in MP3TAG)
ALBUM: All My Love [Remixes]


Example 2: Using "Mix" not "Remix" and having 2 artists in the field PRIOR to edit

FILENAME: 05 Only (Richard X Mix)
TITLE: Only (Richard X Mix)
ARTIST: Nine Inch Nails\\Other Artist
ALBUM: Every Day Is Exactly The Same (Remixes)
<<<<<<<<<<<<<<<Would Change To>>>>>>>>>>>>>>>
FILENAME: Only [Richard X Mix]
TITLE: Only [Richard X Mix]
ARTIST: Nine Inch Nails\\Other Artist\\Richard X
ALBUM: Every Day Is Exactly The Same [Remixes]


Example 3: Leaving title-related parenthesis, switching album parenthesis to brackets

FILENAME: 02 Absolutely (Story Of A Girl)
TITLE: Absolutely (Story Of A Girl)
ARTIST: Four Year Strong
ALBUM: Explains It All (10 Year Anniversary Edition)
<<<<<<<<<<<<<<<Would Change To>>>>>>>>>>>>>>>
FILENAME: Absolutely (Story Of A Girl)
TITLE: Absolutely (Story Of A Girl)
ARTIST: Four Year Strong
ALBUM: Explains It All [10 Year Anniversary Edition]


Example 4: All together now (purposefully exaggerated to encompass everything)

FILENAME: 11 Twin Skeleton's (Hotel In NYC) (Feat. Joey Bada$$) (Remix) (Acoustic)
TITLE: Twin Skeleton's (Hotel In NYC) (Feat. Joey Bada$$) (Remix) (Acoustic)
ARTIST: Fall Out Boy
ALBUM: American Beauty/American Psycho (Remixes)
<<<<<<<<<<<<<<<Would Change To>>>>>>>>>>>>>>>
FILENAME: Twin Skeleton's (Hotel In NYC) [Remix] [Acoustic]
TITLE: Twin Skeleton's (Hotel In NYC) [Remix] [Acoustic]
ARTIST: Fall Out Boy\\Joey Bada$$
ALBUM: American Beauty/American Psycho [Remixes]


My collection of music has amassed over 10,000 albums and I've been using a partial fix formatting code (which helps!) but I've made it through around 2000 albums in about 3 days of strenuous work. If I had a functioning action set to yield results like these I might be able to sleep soundly at night!
Any help from you MP3TAG masters out there would be GREATLY appreciated!

I would start with the easy bits, e.g. replace the text contants.
Like replace "(Remix)" with "[Remix]" ore remove "EP" from ALBUM.
This would make it much easier to deal with several sets of parenthesis in one string.

Yes and no. The \\ is an indicator for a multi-value field, i.e. you have several fields of the same type, here ARTIST. I don't know if you really want that as only very few players can deal with multi-value fields. WMP does not, iTunes sometimes.
Some players tread the characters semicolon-blank as internal separator; in MP3tag you see all the data in a single field. WMP uses that, iTunes does not.

So the question is: do you really want to create multi-value fields? If so, you probably see the contents only in MP3tag.

Create the filename from the tag fields. Use Convert>Tag-Filename for that.
There are numerous threads in this forum that deal with the shifting of the featured artist between fields. Moving the featured artist to the ordinary artist field will not let you distinguish any more who the real artist is and who the remixer or the featured one is.
Moving the remix artist to artist has the same drawbacks. There is a field called MIXARTIST - perhaps that is more suitable (yet, hardly any player shows it), but it is much easier to create unstructured data from structured fields than the other way round, also, as before, you loose the information who is artist and who is mix artist.

Perhaps one other task: to replace the round brackets with square ones for a Remix, try an action of the type "Format value" for TITLE
Format string: $regexp(%title%,.*\((.*?Remix)\),'['$1']')

1 Like

Thank you for your quick response yet again!
I appreciate the attention to detail with the multiple fields part. I do wish to create multiple value fields for the artists involved in a track as I use MusicBee and can see them all (even if my phone player will not show all of them), however I do like the idea of using the MIXARTIST field for any remix artists involved in a track. Will this field work if there are multiple remix artists?

Additionally, how might I call back the rest of the title? When using the Format String you provided, the replacement '['$1']' portion only yields "[____ Remix]", not the rest of the track's title.

Oops, yes, sorry, it should be:
$regexp(%title%,(.*)\((.*?Remix)\),$1'['$2']')

1 Like

Excellent! That worked perfectly. Now I have tried using an older post to help with the next part of moving the featured artist over (you were directly involved in getting me to this format string in fact), and while I do not understand it, it seems to get me somewhat close to a desired result.

And using an adapted version from my slight understanding, I attempted to change it to fit my goal here. I just did this:
Field: artist
String: %artist%\\$mid(%title%,$add($strstr(%title%,'Feat.'),6),$len(%title%))

From this:
**ARTIST:**Cash Cash\\Dashboard Confessional
**TITLE:**Belong (feat. Conor Maynard) [BEAUZ Remix]
<<< To This >>>
**ARTIST:**Cash Cash\\g (feat. Conor Maynard) [BEAUZ Remix]
**TITLE:**Belong (feat. Conor Maynard) [BEAUZ Remix]
I'm positive that I'm just not understanding this, but do you believe this it workable?

I also tried using a guess value using
Source Format: %title%
Guessing Pattern: %title% (feat. %artist%)
Which yielded no change
and
Source Format: %title%
Guessing Pattern: %title% (feat. %artist%
Which yielded this:
**ARTIST:**Conor Maynard) [BEAUZ Remix]
**TITLE:**Belong
Which doesn't really seem any closer to my goal.

Please note the strings in the action of the type "Guess value" are case sensitive. So if you use "feat" but you have "Feat" in the TITLE, then you will get no hit.

The $mid() function goes to the position where it finds the named string and then used the rest of the TITLE - which is too much.
To get only the part of the featured artist try:
$regexp(%title%,.*\(feat\. (.*?)\).*,$1)
This should strip it down to "Conor Maynard"

1 Like
$regexp(%title%,.*\(feat\. (.*?)\).*,%artist%\\\\$1)

This ALMOST worked wonders for me. For songs with only one artist going into this, it will be perfect. For a few particular songs, like this
Title: Belong (feat. Conor Maynard) [BEAUZ Remix]
Artist: Cash Cash\\Dashboard Confessional
It strips the second artist, resulting in this:
Title: Belong (feat. Conor Maynard) [BEAUZ Remix]
Artist: Cash Cash\\Conor Maynard
Which is close! (And even perfect for most tracks!) Any ideas on how to not get rid of the already existing additional artists?

If you have multi-value fields, it is advisable to use
$meta_sep(x,sep) to list all values of that field type,
e.g. Format value for ARTIST
$meta_sep(artist,\\)\\$regexp...
(complete the $regexp... with what you used before)

1 Like

Great! so by using
$meta_sep(artist,\\)\\$regexp(%title%,.*\(feat\. (.*?)\).*,$1)
I have now got
Title: Belong (feat. Conor Maynard) [BEAUZ Remix]
Artist: Cash Cash\\Dashboard Confessiona\\Conor Maynard
This is another step closer!

Furthermore, by using Format Value
Field: MIXARTIST
Format String: $regexp(%title%,.*\'['(.*?)Remix\']',$1)
I was able to set the MIXARTIST you mentioned before.

Following that, using what you taught me in my last post, I used
$regexp(%title%, \(feat.*?\),)
and was left with just
Title: Belong [BEAUZ Remix]
Artist: Cash Cash\\Dashboard Confessional\\Conor Maynard
MixArtist: BEAUZ

This is (to me) GREAT progress from where we started!

I hoped that the double backslash would separate the multivalue field straight away.
If it does not, then use an action of the type "Split field by separator" for ARTIST.

It absolutely did! No need to change that part! Now, I believe it's just some easier fine tuning with the album names (the - EP, EP, -Single, Single stuff as well as changing to brackets) and then the simple Tag(TITLE) - FILENAME conversion as well as recognizing "Acoustic", "Acoustic Version", "Live", and "Demo". Each of these tasks is very similar to what you've already shown me, but I'll chime back in if I'm having trouble. I can't thank you enough. You've already saved me hours upon hours. GUARANTEED.

Ah, I've come across an issue. If the Format Value actions that identify the ARTIST and MIXARTIST
$meta_sep(artist,\\)\\$regexp(%title%,.*\(feat\. (.*?)\).*,$1)
and
$regexp(%title%,.*\'['(.*?)Remix\']',$1)
respectively, they will just substitute the track name (which is problematic). For example, while the track I am about to mention has no need to be changed, there will be many like it in the batches of files I go through I will need my two other Format Value functions to not capture and move the entirety of the song names:


Title: Talk Slow
Artist: Chase Atlantic
Formatting%20Functions
Results in
Title: Talk Slow
Artist: Chase Atlantic\\Talk Slow
MixArtist: Talk Slow
Any ideas on how to update those other functions so that this does not happen?

The easiest way would be to use filters so that you get only those files that should be treated
like
%title% HAS "(feat." OR %title% HAS "mix)"

Alrighty, since some of these files are already formatted a bit, while using batch edit, it ended up placing a artist into the artist into the artist field that was already there. it how would you go about getting rid of repeats in the artist field? For example:
ARTIST:Cash Cash\\Conor Maynard\\Sagan\\Conor Maynard

Here is a thread that deals with duplicates in multi-value fields:

I'm sorry, I can't seem to get that method to work.
I used $regexp($meta_sep(artist,\\),'(?<=\\|^)([^\\]*)(\\\1)+(?=\\|$)',$1)
Which resulted in an error
Alternatively, I've attempted to use the action "Merge duplicate fields" and used \\ as the separator to no avail.

It looks as though the forum formatter has swallowed some of the characters.
I found another thread that also deals with duplications:


it uses the semicolon as separator, so I used it for the $meta_sep()
and it suggests such a
Format string: $regexp($reverse($regexp($regexp($reverse($regexp($regexp($meta_sep(artist,;),'^(\s+;|\s;+)+|(\s+;|\s;+)+$|((?<=;)\s+)|(\s+(?=;))',),'^|$',';')),'(;[^;]+)(?=(\1|;.*?\1))',),'^;+|;+$',)),'(?<=;)',' ')

1 Like

Perfect.
Man you are a lifesaver (and SERIOUSLY quick!)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.