Featuring & all derivatives


#1

I'm trying to ...

  1. Remove any brackets round the featuring/feat/ft entry
  2. Change the wording to always be "feat."
  3. Move the entry from the 'Title' field to the 'Artist' field

I found an answer (in bits) in German but it seems to have lost something in translation. Couldn't find an English answer.

Here's the conversion.........

Regular expression "_ALL":"((feat[^)]))"->"$1"
Replace "_ALL":"FT. , ft. , FT , ft. , FEAT , ft. , FEAT. , ft. , FEATURING , ft. , Ft , ft. , ft , ft. , Feat , ft. , feat , ft. , Feat. , ft. , feat. , ft. , Featuring , ft. , featuring , ft. "->" feat. "
Format value "ARTIST": %artist%$mid(%title%,$strstr(%title%, feat.),$len(%title%))
Regular expression "TITLE":"feat. .
$"->"$1"

Only the first step works and only for anything beginning with 'feat'. If I could get step 2 to work, I'd move it up to position 1 thus ensuring bracket removal always worked (i.e. without having to add the 'ft' variable)

Can anyone sort this out. I've ordered a book on regular expressions but it won't arrive this year.

Addendum: Nearly there. Have added another line after line 1 to remove the brackets round 'ft'. There must be a way to incorporate it in step 1 but at least this works.
I've removed the 'REPLACE' instruction and added a Regular expression ( featuring | feat. | feat | ft. | ft ) replacing matches with feat. (with a leading space). The spaces are included because 'feat' and 'ft' would become 'feat.<someone>' although 'featuring' 'feat.' and 'ft.' all formatted OK as 'feat. <someone>'.
Now all are OK and the only hurdle left is to remove 'feat. from the title field.
No doubt this is the sledgehammer approach but at least it works as far as it goes.


Reordering featured artist info in the TITLE tag
Featuring Artists
Looking for a way to use the IF command when writing tags
#2

For the featuring replacement I use

Action
Replace with Regex
Field :
Title
Regex :
" (ft. | ft. | ft | f. | (featuring | featuring | (feat. | (feat | feat. "
Replace :
" feat "

this renames any of the following in the title field to feat

With my formatting I don't want the feat xxx in the artist field but appended to the title field and then the feat xxx removed from the artist field.

I've done this

Action
Format Value
Field :
Title
Format String
$if($strstr(%artist%,feat),%title%,$regexp(%artist%,( feat.+),%title%$1))

this searches for feat in artist field if found append to end of title field else title

Action
Replace with Regex
Field :
Artist
Regex :
"^(.+)( feat.+)"
Replace :
$1

but I can't figure out how to manipulate the $if function to leave current field if not aplicable. Any ideas?


#3

Can someone tell me how to find anything before " ft | feat" and move it to the BAND (album artist) field? I'm OK with regex but I just can't figure out how to actually do this with the program. Maybe I should just use javascript lol, I just found out you can run them from windows explorer and they will work on your iTunes.


#4

This works for me ...

RegExp:
(?i)(\s)f(?:ea)?t(?:(?:\.?|\s)|uring)(?=\s)
Replacement:
$1feat.$2

Example:
$regexp('Mrs. X FT. FT FEAT FEAT. FEATURING Ft ft Feat feat Feat. feat. Featuring featuring Mr. Y','(?i)(\s)f(?:ea)?t(?:(?:\.?|\s)|uring)(?=\s)','$1feat.$2')

From:
Mrs. X FT. FT FEAT FEAT. FEATURING Ft ft Feat feat Feat. feat. Featuring featuring Mr. Y
To: 
Mrs. X feat. feat. feat. feat. feat. feat. feat. feat. feat. feat. feat. feat. feat. Mr. Y

DD.20091220.1124.CET


#5
Anything before " feat " ...
$regexp('-Mrs. X- FT -Mr. Y-','^(.+?)(?:\s)(?i)f(?:ea)?t(?:(?:\.?|\s)|uring)(?-i)(?:\s)(?:.+?)$',$1)
gives:
-Mrs. X-

Anything behind " feat " ...
$regexp('-Mrs. X- FT -Mr. Y-','^(?:.+?)(?:\s)(?i)f(?:ea)?t(?:(?:\.?|\s)|uring)(?-i)(?:\s)(.+?)$',$1)
gives:
-Mr. Y-

Here is an example ...

Begin Actionsgroup Test#20091220.hiphopdj

Action #1
Actiontype 5: Format tag field
Field: HIPHOPDJ_IN
Formatstring: -Mrs.÷X-÷feat.÷-Mr.÷Y-
Note: Replace each special ÷ character with one space character.

Action #2
Actiontype 5: Format tag field
Field: HIPHOPDJ_OUT_BEFORE
Formatstring: $regexp(%HIPHOPDJ_IN%,'^(.+?)(?:\s)(?i)f(?:ea)?t(?:(?:.?|\s)|uring)(?-i)(?:\s)(?:.+?)$',$1)

Action #3
Actiontype 5: Format tag field
Field: HIPHOPDJ_OUT_BEHIND
Formatstring: $regexp(%HIPHOPDJ_IN%,'^(?:.+?)(?:\s)(?i)f(?:ea)?t(?:(?:.?|\s)|uring)(?-i)(?:\s)(.+?)$',$1)

End Actionsgroup Test#20091220.hiphopdj (3 Actions)

Run this action group and use the dialog Extended Tag View to see what has happened.

DD.20091220.1308.CET
Edit. DD.20091220.1805.CET


#6

DetlevD,
That worked great, thanks!
But the only problem is it adds the album artist even if there is no "ft"
I can fix this myself, but how do you tell the program to format something as blank?
Maybe if Artist==Album Artist, then Format Album Artist to be blank.

I'm also trying to do something similar with Comments (if comments don't contain key information, then erase them, otherwise write only the key info)

I might just be better off using javascript, since I would know how to do all this, but I do like the mp3tag program.


#7

Wasn't it your first wish?

Example:
Begin Actionsgroup Test#20091220.hiphopdj.2

Action #1
Actiontype 5: Format tag field
Field: HIPHOPDJ_IN
Formatstring: -Mrs.÷X-

Action #2
Actiontype 5: Format tag field
Field: HIPHOPDJ_OUT_BEFORE
Formatstring: $regexp(%HIPHOPDJ_IN%,'^(.+?)(?:\s(?i)f(?:ea)?t(?:(?:.?|\s)|uring)(?-i)(?:\s))(?:.+?)$',$1)

Action #3
Actiontype 5: Format tag field
Field: HIPHOPDJ_OUT_BEFORE
Formatstring: $if($neql(%HIPHOPDJ_IN%,%HIPHOPDJ_OUT_BEFORE%),%HIPHOPDJ_OUT_BEFORE%,)

Note: Replace each special ÷ character with one space character.
End Actionsgroup Test#20091220.hiphopdj.2 (3 Actions)

Since you are familiar with some scripting programming language, Javascript for instance, you should understand and work with the Mp3tag scripting language after a short and flat learning curve.
Mp3tag scripting language is sometimes a bit tricky and quirky, but it helps to know how to analyse a problem and how to use the Mp2tag actions tool box to achieve the goal.

DD.20091220.2030.CET


#8

Sorry for the late answer, I needed to wait for a new batch of songs to add to my library. It worked great though thanks! I think I will stick with the program, it's great!!


#9

Thanks to all who replied especially MrForce who gave me the last two lines - I had to reverse them of course to go from Title to Artist.

My final solution - and I don't care how long-winded, inefficient, pathetic, greedy..... - it works!

[#0]
T=4
F=_ALL
1=\\((feat[^\\)]*)\\)
2=$1
3=0

[#1]
T=4
F=_ALL
1=\\((ft[^\\)]*)\\)
2=$1
3=0

[#2]
T=4
F=_ALL
1=( featuring | feat. | feat | ft. | ft )
2= feat.
3=0

[#3]
T=5
F=ARTIST
1=%artist%$mid(%title%,$strstr(%title%, feat.),$len(%title%))

[#4]
T=4
F=TITLE
1=^(.+)( feat.+)
2=$1
3=0

The above is copied from the mta file and the five steps boil down to ....
#0 - [Replace with Regular Expression] Remove brackets round all words beginning with 'feat'
#1 - [Replace with Regular Expression] Remove brackets round all words beginning with 'ft'
#2 - [Replace with Regular Expression] Change any variety of 'ft'/'feat'/'featuring' to 'feat.'

       These first three steps replace in any field ('_ALL') but only expected in 'Title' or 'Artist'

#3 - [Format Value] Copy the 'feat. ' from the 'Title' to the 'Artist' field
#4 - [Replace with Regular Expression] Remove the 'feat. ' from the 'Title' field.

This doesn't have any effect on titles/artists with no featured artist.

Obviously if you're moving the other way (from 'Artist' to 'Title'), you just need to change steps #3 and #4 reversing the field names.

(No doubt there's something I've overlooked. Time will tell - or one of you? )


#10
QUOTE (DetlevD @ Dec 20 2009, 13:08) <{POST_SNAPBACK}>
Anything before " feat " ...
$regexp('-Mrs. X- FT -Mr. Y-','^(.+?)(?:\s)(?i)f(?:ea)?t(?:(?:\.?|\s)|uring)(?-i)(?:\s)(?:.+?)$',$1)
gives:
-Mrs. X-

Anything behind " feat " ...
$regexp('-Mrs. X- FT -Mr. Y-','^(?:.+?)(?:\s)(?i)f(?:ea)?t(?:(?:\.?|\s)|uring)(?-i)(?:\s)(.+?)$',$1)
gives:
-Mr. Y-

Here is an example ...

Begin Actionsgroup Test#20091220.hiphopdj

Action #1
Actiontype 5: Format tag field
Field: HIPHOPDJ_IN
Formatstring: -Mrs.÷X-÷feat.÷-Mr.÷Y-
Note: Replace each special ÷ character with one space character.

Action #2
Actiontype 5: Format tag field
Field: HIPHOPDJ_OUT_BEFORE
Formatstring: $regexp(%HIPHOPDJ_IN%,'^(.+?)(?:\s)(?i)f(?:ea)?t(?:frowning:?:.?|\s)|uring)(?-i)(?:\s)(?:.+?)$',$1)

Action #3
Actiontype 5: Format tag field
Field: HIPHOPDJ_OUT_BEHIND
Formatstring: $regexp(%HIPHOPDJ_IN%,'^(?:.+?)(?:\s)(?i)f(?:ea)?t(?:frowning:?:.?|\s)|uring)(?-i)(?:\s)(.+?)$',$1)

End Actionsgroup Test#20091220.hiphopdj (3 Actions)

Run this action group and use the dialog Extended Tag View to see what has happened.

DD.20091220.1308.CET
Edit. DD.20091220.1805.CET

Hi there DetlevD,
I've searched thru the forums for hours and saw a few of your replies to various questions, and this one is the closest to what i've been looking for. I don't want to remove brackets/parenthesis, but to make them all the same. Some tiltes have "(xxxx), and others have "[xxxx]. What i want is to know if there is someway of changing them so that they are all the same.

Currently what I have is: "01 Rockin' My Body [Cappella Radio Mix]"

What I Want is: "01 Rockin' My Body (Cappella Radio Mix)"

If there is a way to do this it would be much appreciated.
Thanks in advance.


#11

Hi embra55, it seems that your current request has really nothing to do with this thread.
You want to replace some string character by another string character.
This simple job has several ways of solution in Mp3tag, by ...

  • action "Replace".
  • action "Replace using a Regular Expression".
  • function $replace()
  • function $regexp()

DD.20101023.1742.CEST