A new spin on an old topic (feat. and %ARTIST%)

Hi,

I have a tagging scheme i would like to implement, but I've found no info on it, nor do i possess the skills to figure out the script for it without help. It may not be conventional, but it is the way i like to organize my library. :unsure:

Basically, i want to take the performer listed as feat., and add them to the %ARTIST% category as an independent artist alongside the album artist. Here is my example below:

LOCATION
D:\Music\David Guetta\Nothing But The Beat 2.0\01. Titanium (feat. Sia).flac
D:\Music\David Guetta\Nothing But The Beat 2.0\02. Turn Me On (feat. Nicki Minaj).flac

FILENAME

  1. Titanium (feat. Sia).flac
  2. Turn Me On (feat. Nicki Minaj).flac

This is what i have now:

TITLE

  1. Titanium (feat. Sia)
  2. Turn Me On (feat. Nicki Minaj)

ALBUM ARTIST
David Guetta
David Guetta

ARTIST

This is what I want to end up with:

LOCATION
D:\Music\David Guetta\Nothing But The Beat 2.0\01. Titanium (Featuring Sia).flac
D:\Music\David Guetta\Nothing But The Beat 2.0\02. Turn Me On (Featuring Nicki Minaj).flac

FILENAME

  1. Titanium (Featuring Sia).flac
  2. Turn Me On (Featuring Nicki Minaj).flac

TITLE

  1. Titanium (Featuring Sia)
  2. Turn Me On (Featuring Nicki Minaj)

ALBUM ARTIST
David Guetta
David Guetta

ARTIST David Guetta\\\\Sia David Guetta\\\\Nicki Minaj

I have figured out how to change and or adjust the "feat." option to replace it with "Featuring" in both the %FILENAME% and %TITLE% tags. What i can't figure out is how to add "Sia" and "Nicki Minaj" to the %ARTIST% tag as an independent artist (David Guetta\\Sia) and not just listed as "David Guetta ft. Sia" or some variant.

Can anyone see a solution to this that i can use to complete the %ARTIST% category?

There is plenty on moving feat., or removing feat. as well as removing feat. from the %ARTIST% tag, but this doesn't help me. Many thanks and my undying appreciation to anyone that can help. :smiley:

Action "Format value" ... or ... Convert "Tag - Tag" TITLE <== $replace(%TITLE%,'(feat. ','(Featuring ') FILENAME <== $replace(%_filename%,'(feat. ','(Featuring ')

DD.20140824.1007.CEST

Action "Format value" ... or ... Convert "Tag - Tag" ARTIST <== %ALBUM ARTIST%'\\\\'$regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft\.?|feat\.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1)

DD.20140824.1037.CEST

Thank you so much DetlevD. That did the trick perfectly. I can certainly understand why you are "THE" goto guy for so many people in these forums, and i'm sure it is appreciated by us all.

Thanks DetlevD, that is actually what i have found through reading the forums and had in my action list already, and it does work.
One question i have on this step though is do i need to do a "replace" action step for each variant i wish to change (eg. ft, ft., feat, feat., featuring), in order to change it to 'Featuring', in all the tags it needs changing in (typically %filename%, %title% and %artist%). This would result in at least 15 individual actions.
Could a single (or a couple of) action command formulas be finessed a little, to cover all the current list of variant's in multiple tags, and still avoid having to enter each of them individually and create an action group?

How to organize the work using Mp3tag is still a matter of individual behaviour and self organization and knowledge about the different tools offered by Mp3tag.
There are the interactive converter dialogs, the batch-alike action groups, the direct editing of tag-field content in the list view, or the tag-panel dialog.
Use the Mp3tag tools, which you understand how to use.

The number of actions is neglectable, the main thing is that you understand what is going on, step by step
(a basic action group from my early days, still in use, has more than 100 actions).

Use the converter "Tag - Tag" as a preview utility for testing a formatstring.
Work on temporary tag-field to check the result before applying it to the standard tag-field.

Read criss-cross through the forum messages, there is the practical knowledge how to use Mp3tag.

DD.20140825.1218.CEST

You are absolutely right in what you say and i appreciate your advice. Thank you.
I have picked up a staggering amount of tips'n'tricks using action commands through reading the forums and a little trial and error in a very short amount of time.

It is now a balancing act between time to process what i've taken in, and my eagerness to implement it!

In time i may even come to understand the scripting language enough that i can look at a string and understand what it's function is and how to make it suit my purpose, but for now i have to rely on the patience others (like yourself) to help me into the deep end of the pool.

On that note:

The expression you gave me earlier, for moving a 'featured artist' to become an additional %artist% is a whole other level of complex for me.

ARTIST <== %ALBUM ARTIST%'\\'$regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft.?|feat.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1)

It does work correctly on a track that has a featured artist listed but, if the track it's applied to doesn't have a featured artist, it adds the track %title% as a second %artist%.

For example this:
FILENAME
12. Dead In The Water.flac
13. I Need Your Love (Featuring Calvin Harris).flac
TITLE
Dead In The Water
I Need Your Love (Featuring Calvin Harris)
ARTIST
Ellie Goulding
Ellie Goulding
ALBUMARTIST
Ellie Goulding
Ellie Goulding

Becomes this:
FILENAME
12. Dead In The Water.flac
13. I Need Your Love (Featuring Calvin Harris).flac
TITLE
Dead In The Water
I Need Your Love (Featuring Calvin Harris)
ARTIST
Ellie Goulding\\Dead In The Water................WHY??
Ellie Goulding\\Calvin Harris
ALBUMARTIST
Ellie Goulding
Ellie Goulding

I've tried to break it down to to smaller parts to try to understand it's syntax in the hope that i can maybe figure out if the line has no ft.|feat.|featuring in the %title% or %filename%, then not to apply the rule. That way the string can be applied to albums at a time, and not just file-by-file.

I can see in it's smallest units that most of whats written deals with the varying combinations of ft.|feat.|featuring and the possible parentheses they may appear in as well as the relevant white spaces. What i can't see is the groupings and backreferences you've created, or how i could include an exclusion for tracks without featured artists

Correct me as I'm sure I'm wrong, but from what i can see (and it took a while), you've created 4 backreferences ($1,$2,$3,$4) in the string, but i can't see how they are used in the expression:

$1

ARTIST <== %ALBUM ARTIST%'\\'$regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft.?|feat.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1)

$2

ARTIST <== %ALBUM ARTIST%'\\'$regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft.?|feat.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1)

$3

ARTIST <== %ALBUM ARTIST%'\\'$regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft.?|feat.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1)

$4

ARTIST <== %ALBUM ARTIST%'\\'$regexp(%TITLE%,'^(.+?)\s+[[({]?(?:ft.?|feat.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$','$2',1)

Is there a point at which a condition can be added, to only apply the change to files with featured artists, and no change to files without?

Any help would be invaluable at this point

Regards,

James.

Another case needs another solution.

Note: If the given regular expression in the function $regexp() does not match, then the function returns the unchanged input string.

Before making the given scripting expression too much complex, you can apply the Mp3tag Filter [F3] to keep in view only those files, which match the given rule.
Filterstring:
TITLE MATCHES "^(.+?)\s+[[({]?(?:ft.?|feat.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$"

There are 3 back references ...

^(.+?)\s+[[({]?(?:ft\.?|feat\.?|featuring)\s+([^][(){}]+)[])}]?(\s+.+)?$
 =====                                       ============      =======
 $1                                          $2                $3

Because this regular expression can be used for other cases too, I did not remove or deactivate the unused back references for your case only.
You will find back in time, in the last few weeks, that I am offered this regexp also for other requests here in the forum.

DD.20140828.1103.CEST