Featuring From Title to artist

Hi anyone listening

I have had this problem for ages and all the answers I could find not many of them are not exactly what I'm looking for and I don't know how to alter them to suit me.

was-
Title: Make it so (Ft Janey)
Artist: Johnny

want it to be-
Title: Make it so
Artist: Johnny Ft Janey

Tried chat GPT but it doesn't work at all. Tried XYZ answers for other people but when I change the script for "Ft" doesn't work.
I could write a scrip in english but it doesn't work that way.
Here it is for humans to read:

10 Look in Title field
20 If you see something starting with (Ft copy all of that to the end
30 Put a space after the Artist if there isn't one
40 Paste what was copied from the Title
50 Delete all ( + ) from Artist field
60 Look in Title field
70 If you see something starting with (Ft delete all of that to the end
80 End

Just the how is greatly appreciated, however any answers would appreciate explanation of everything and how it works so I can write my own if I need to do something else or (Ft might be Ft or feat etc

Cheers

There have been plenty of discussions about this exact request here before. See here for example.

You can modify the suggestions to fit the exact need for your case.

I changed
%artist% & $mid(%title%,$add($strstr(%title%,'Feat.'),6),$len(%title%))
To this
%artist% & $mid(%title%,$add($strstr(%title%,'(Ft'),6),$len(%title%))
It does not work

was-
Title: Make it so (Ft Janey)
Artist: Johnny

become-
Title: Make it so
Artist: Johnny & aney)

The Artist turned into a jumbled mess and the ) is still at the end

Please tell me how to change that string to suit my situation
Cheers

I don't know, if this helps, you still have to figure out the pertinent Mp3tag function,
-> $regexp(x,e,r,c) (Scripting Functions – Mp3tag Documentation) I do my regex in Sublime Text 4, so I have little experience with this function. Someone else might have to chip in...


$regexp(x,e,r,c)

x = The title of your track
e = the RegEx (" ((.*))"), observe the blank space at the beginning
r = %artist% $1
c = disables the ignore case setting (0) <-optional

(I do not know if you need quotes around the arguments???)

So your expression might look something like this:

$regexp(%title," ((.*))"," · %artist% $1")

The output will now be (and is in ST4):

"Make it so · Johnny Ft Janey".

This piece " · ", the "middle dot" I use as a delimiter, you can use another one. If you don't know how to get the middle dot, copy it -> " · " <-

As I said, I have a different workflow and use code editors for the heavy lifting. Here's what I suggest in your case:

  • write the output in an unused, empty field (comments?)
  • then parse (split) it into

--1) all in front of the "middle dot" -> %title%
--2) all after the "middle dot" -> %artist%
-3) don't forget to trim leading and trailing spaces

and write the results into the corresponding Mp3tag-fields. There is a function to split this in Mp3tag; you need to look it up. If you need more help, please come back :slight_smile:

Try an action of the type "Guess value"
Source string: %artist% $regexp(%title%,(.*) \(Ft (.*)\),Ft $2==$1)
Target format string: %artist%==%title%

Hi,
Thanks it works, however can you tell me how it works so I can use it to make other scripts.
Both for in general but also I have encountered other problems which popped up.
It seems like the file name > filename thing where you'd go %1 %2 - %3 and then just use %1 whatever sepperator you want here %3.
Thanks again

The basic approach is the same: you define a pattern.
In Guess value you first create a string and to do so, it is possible to also use scripting functions.
The scripting function that also allows to define patterns and then swap parts around or treat them specially, is the regular expression.
My idea was: if you want to get the last part of the TITLE to become the trailing part of the ARTIST, then
put ARTIST first
swap TITLE around
insert a unique separator between the parts of TITLE (for which I use == but anything unique will do)
which leads to a string ARTIST Ft TITLE2==TITLE1
and now split that string by using a matching format string in the shape of
%artist%==%title%