Transfer & partial deletion of metadata

Hello

Is it possible to partially erase information from a metadata field?

I explain my specific case:
on "ALBUMARTISTSORT" field I have "James Hype & Kim Petras [vs. Justin Timberlake feat. Clipse]"

I would like to move the "ALBUMARTISTSORT" metadata to "CONTENTGROUP" & "MIXARTIST" & also I would like to split the metadata in this way:
"CONTENTGROUP" will keep "James Hype & Kim Petras" metadata, so "[vs. Justin Timberlake feat. Clipse]" will be deleted,
"MIXARTIST" will keep "[vs. Justin Timberlake feat. Clipse]" metadata, so "James Hype & Kim Petras" will be deleted.

I think I know how to copy the metadata from field to field, following this: First Steps – Mp3tag Documentation
But I don't know how to configure an action to partially erase metada field.

I am new at Mp3tag, just testing the software (I remain 5 days of the trial version).
My skills are very basic & I am a mac os high sierra (10.13) user.

I hope I have explained well enough.

Thank you in advanced!

Try an action of the type "Import tag fields"

Source: %albumartistsort%
Target format string: %contentgroup% [vs. %mixartist%]

This should leave ALBUMARTISTSORT as it is and fill CONTENTGROUP with "James Hype & Kim Petras ", then use " [vs. " as separator and fill MIXARTIST with "Justin Timberlake feat. Clipse" and ignore the ].
As this expression defines a pattern, every space and every case of each letter matter.

Hello

Thanks for answering. As I sayd my skills are very basic.
First of all, is not the "ALBUMARTISTSORT" data that i want to copy to other metadata field, is "ALBUMARTIST" but this is not really important.

After reading your message I do not really understand what I have to do.

I suppose I have to do a "Convert Tag - Tag".
Then on "Field" I write down the destination metadata field , where I want the data to be copyed, in my example "CONTENTGROUP" or "MIXARTIST".
& at "Format String" I select the metadata field from where I want to copy the data, "ALBUMARTIST".

This successfullly copy my data from one metadata field to another. But this is just half of what I want to do.

I don't know how to split the data at the same time I copy the data from one metafield to another one.
Here talks about "Split tag field" Quick Actions and Action Groups but I do not see this "Split tag field" anywhere.

I alternatively can do a kind of "erase data action from a metafield with specific format": delete all data from "[vs." until "]", but I don't know where to find this feature too.

*If by "Try an action of the type "Import tag fields"" you do not mean "Convert Tag - Tag" but another feature, can you please tell me where to find it?

Thank you so much.

Did you follow the link?
As that leads you to an

And as that has very different parameters to set, it should work - except that you use
Source: %albumartist%
Target format string: %contentgroup% [vs. %mixartist%]

Given you're on this unsupported macOS version, you're effectively using an old Windows version on macOS via Wine. The action "Import tag fields" @ohrenkino referred to is named "Guess values" on Windows.

It would be great if you could just update your macOS and use the official Mac version, and if that's not possible, prefix every support question with the disclaimer that you're using an old Windows version on macOS High Sierra via Wine.

Thanks Florian

I will try to remember to say this at the beggining of my questions.
Disclaimer I am using an old Windows version on macOS High Sierra 10.13 via Wine.

Unfortunately no, I want to prepare my library for the new Mac, I have tryed the Music App & is not useful as iTunes has been., so I need to do it in the old Macbook as I want to convert my iTunes playlists to metadata & delete all the playlists & leave iTunes/Music App.

OK, so you are basically using a Windows version.
So the Windows documentation applies- and I will update the link for you:

(What was that about

as the Windows version does not have a trial period)

Yes I read the documentation you have provided ohrenkino, but I do not understand how to get what I want, I do not understand enough how to do it.

If I use the code you provide I do not get the good result:

This is what I have:
1

This is what I would like to have:
2

But I do not know how to get it.

I just know I need to use "Convert - Tag To Tag".
If I configure "Convert - Tag To Tag" as I understood you (albumartist on the source & "%contentgroup% [vs. %mixartist%]" on the format string) like this:
3

I get this:
4

What seems logic as the Field at "Convert - Tag To Tag" is the metadatafield that you want to affect (not where you want to copy data).

So I do not know how to proceed to get my 2nd image.

I hope you can help, maybe I have not expressed enough well before.

Thank you.

Co

Could you please use an action of the type "Guess value" - as stated before. "Convert>Tag-Tag" will not get you very far.

Ok, this worked.
1

Just a doubt: if I want the "[vs. The Meters]" to be also transfered to the MIXARTIST & not only the "The Meters" how I have to write the pattern? This %contentgroup% %mixartist[vs. ]% did not worked.

Thank you so much

The problem is that the space - which would separate the contentgroup from the rest of the stuff inside the square brackets - is no unique separator as that could also be part of the contentgroup data.

I would suggest that you separate the pure data first and if you want any decorative elements, you add them later on to the MIXARTIST (I would leave them out in the first place: if every field MIXARTIST start with "[ vs " then this would be redundant and could be left out, IMHO).

If yoyu feel unsure about this action - then:
rename a file (for test purposes) to

and try to import the data from the filename into CONTENTGROUP and MIXARTIST.
Then copy the mask that led to succcess and use it as target format string in the action "Guess value". In "Gess value", the only difference to the converter is, that you can use more or less any source string, not only the _FILENAME. The target format string is similar in both, the converter and the action.

Ouch I do not follow you enough to understand everything but I realize here I need to provide you more information (I did not before to make the example simple).

In my tag/metadata system when I use "[...]" is to indicate additional information for example at the artist metafield "[...]" can be used to indicate aditional artists involved with the samplers "[vs. ...]" or similarities (almost a sampler but is not an official sampler) between 2 artists "[aprx. ...]" or if a song is a part of a bigger work like a tv spot or a soundtrack "[theme from ...]". I use "[...]" symbols like html code, open & close, so I can have several indications inside one "[...]" like this "[vs. ARTIST1 vs. ARTIST2]". When there are indications of multiple type I do like this "[vs. ARTIST1 vs. ARTIST2] [aprx. ARTIST3] [theme from SOUNDTRACK]".

So, I need to split the specific artist of the song from the rest of indications I use:
"ARTIST 1" "[vs. ARTIST2 vs. ARTIST3] [aprx. ARTIST4] [theme from SOUNDTRACK]"

I preffer to transfer both things (specific artist of a song & the rest of indications I use) to a single metafield rather than split it in 2 metafields losing the "[vs. ...]" "[aprx. ...]" "[theme from ...]" data as it provides important information.

Hope this makes sense & thank you so much for the help!

Regardless of what you add how many times:
in any of the strings you need a unique indicator where to split the fields.
So, if you have several pairs of square brackets, then the square brackets are not unique.

Still, even if you prefer to keep the extra data indicators, you could create an action group with 2 actions: one to split the fields, the other one to add the decoration again.

As mentioned by @ohrenkino the square brackets in this case would be unnecessary. If the MIXARTIST field is only used for the additional artists as you have used in your example, it would be advisable to store them without the brackets. If you choose to compound this information later with other fields into a separate new tag or filename, you could easily add the brackets into that scenario at that time.

Is it always [vs.that separates this data as MIXARTIST?
What should happen to the rest?

So far I could think of this regular expression as
Source:$regexp(%albumartist%,'(.*) \[vs\. (.*?)\](.*)','$1$3==[vs. $2]')`` Target format string: %contentgroup%==%mixartist%`

This would lead to:
"The Police [aprx. ARTIST3] [theme from SOUNDTRACK]==[vs. ARTIST1 vs. ARTIST2]"
and ultimately to
CONTENTGROUP = The Police [aprx. ARTIST3] [theme from SOUNDTRACK]
MIXARTIST= [vs. ARTIST1 vs. ARTIST2]

I really appreciate the effort to help me but I can not understand your message.
I think it is too complicate for a beginner understand what you sayd.

On the other hand the following is different that what I want.

Blockquote CONTENTGROUP = The Police [aprx. ARTIST3] [theme from SOUNDTRACK]
MIXARTIST= [vs. ARTIST1 vs. ARTIST2]

So I am not sure If what I want has been understood or have I explained well enough:
I want to copy the data from ALBUMARTIST to CONTENTGROUP & MIXARTIST.
At the same time I want to just copy the "specific artist data" to the CONTENTGROUP & delete the rest of the data copyed. & want to do the opposite on CONTENTGROUP field, just delete the "specific artist data" & keep the rest of the data copyed.

Example 1:
The Beatles - Twist And Shout.mp3
I have this:
ALBUMARTIST: "The Beatles [vs. The Top Notes]"
I want this:
CONTENTGROUP: "The Beatles"
MIXARTIST: "[vs. The Top Notes]"

Example 2:
George Thorogood & The Destroyers - Bad To The Bone.mp3
I have this:
ALBUMARTIST: "George Thorogood & The Destroyers [/theme from Terminator/]"
I want this:
CONTENTGROUP: "George Thorogood & The Destroyers"
MIXARTIST: "[/theme from Terminator/]"

Example 3:
2 Unlimited - Get Ready For This.mp3
I have this:
ALBUMARTIST: "2 Unlimited [vs. Simon Harris vs. The D.O.C. vs. Lyn Collins vs. Derek B] [/theme from Space Jam/]"
I want this:
CONTENTGROUP: "2 Unlimited"
MIXARTIST: "[vs. Simon Harris vs. The D.O.C. vs. Lyn Collins vs. Derek B] [/theme from Space Jam/]"

If you know how to do it would you mind to explain it to me?
Does not matter if it is done with several steps but not one single "action".

If not I will copy the data in both metadatafields (CONTENTGROUP & MIXARTIST) & I will delete the data manually time to time no hurry for that.

Thank you so much.

Try an action of the type "Guess value"
Source:$regexp(%albumartist%,'(.*) \[vs\. (.*?)','$1==[vs. $2')
Target format string: %contentgroup%==%mixartist%

The principle transfer to the different fields would have happened with

which youl have missed only the opening "[vs." and closing "]".
So: have you ever tried the suggestions at all with a test file?

Hello again

I testes this

Like that:
Captura de pantalla 2024-01-04 a les 23.57.23

I did on 4 examples. It worked in 3 of 4.

Example 1:
Amerie - 1 Thing.mp3
I have this:
ALBUMARTIST: "Amerie [vs. The Meters]"
I get this:
CONTENTGROUP: "Amerie"
MIXARTIST: "[vs. The Meters]"

Example 2:
The Beatles - Twist And Shout.mp3
I have this:
ALBUMARTIST: "The Beatles [vs. The Top Notes]"
I get this:
CONTENTGROUP: "The Beatles"
MIXARTIST: "[vs. The Top Notes]"

Example 3:
2 Unlimited - Get Ready For This.mp3
I have this:
ALBUMARTIST: "2 Unlimited [vs. Simon Harris vs. The D.O.C. vs. Lyn Collins vs. Derek B] [/theme from Space Jam/]"
I get this:
CONTENTGROUP: "2 Unlimited"
MIXARTIST: "[vs. Simon Harris vs. The D.O.C. vs. Lyn Collins vs. Derek B] [/theme from Space Jam/]"

Example 4:
George Thorogood & The Destroyers - Bad To The Bone.mp3
I have this:
ALBUMARTIST: "George Thorogood & The Destroyers [/theme from Terminator/]"
I get this:
CONTENTGROUP: ""
MIXARTIST: ""

I guess what happens here is that all the ALBUMARTIST data where the "specific artist" is followed by a sampling indication ("[vs. ...]") works great! :smiley: But those examples where the "specific artist" is followed by a soundtrack indication ("[/theme from .../]) (avoiding the "[vs. ...]") do not work :frowning: .

I cheecked what about those examples where the "specific artist" is followed by a similarity indication ("[aprx. ...]") & also when ALBUMARTIST has no more data than the "specific artist" (no smapling, no similarity & not part of another work).

Example 5:
Peggy Gou - (It Goes Like) Nanana.mp3
I have this:
ALBUMARTIST: "Peggy Gou [aprx. ATB]"
I get this:
CONTENTGROUP: ""
MIXARTIST: ""

Example 6:
ABBA - Dancing Queen.mp3
I have this:
ALBUMARTIST: "ABBA"
I get this:
CONTENTGROUP: ""
MIXARTIST: ""

Example 7:
Las Ketchup - Aserejé.mp3
I have this:
ALBUMARTIST: "Las Ketchup [vs. The Sugarhill Gang] [aprx. Frankie Valli]"
I get this:
CONTENTGROUP: "Las Ketchup"
MIXARTIST: "[vs. The Sugarhill Gang] [aprx. Frankie Valli]"

So:

  • example 5th & 6th did not work as I suspect
  • the example 7th worked.

So it seems like the Source (or Target format string) you have provided to me requieres always to be an "[vs. ...]" at the ALBUMARTIST data.
Maybe for this reason you asked me

The answer is no.
"[vs. ...]" is just the way I write down samplings. So if the song has no known sampler it does not have the indication of a sampling.
The same for similarity indications ("[aprx. ...]") & for part of another work indication ("[/theme from .../]").
If a song has no sampling, no similariies with other songs & is not a part of another work ALBUMARTIST is simply the "specific artist" (which sometimes is the main ARTIST itself).

CONCLUSION:
The problem for me here is I really do not understand what this code means: "$regexp(%albumartist%,'(.) [vs. (.?)','$1==[vs. $2')", I just copyed & pasted your code :sweat_smile:
If is it possible, I don't know how to make the "[vs. ...]", the "[aprx. ...]" & the "[/theme from .../]"optative but not mandatory.
If it is is not possible, I guess the solution would be have several guess value actions for each case.
Thoughs??

Thank you so much ohrenkino!!!

As I see it now that you have revealed many more of the patterns I assume that the first opening square bracket is the separator.
If that is the case, then modifiy the
Source: $regexp(%albumartist%,'(.*?) \[(.*)','$1==[$2')
This code takes any string leading up to the first opening square bracket and remembers it as $1 then it takes the string following that bracket and remembers it as $2 and finally outputs it separated by the == as it is fairly unlikely that this character combination pops up in an ordinary ALBUMARTIST and therefore is a unique separator in the string from which the values can be guessed. As you insist on the decorative brackets, this has to become part of the string right of the == as it was used as separator in the source string.

Yes I already tryed to explain before; I'm happy we finally understood :smiley:
For all types of indications I use (an extra information I write down on a metafield is not dessigned for that purpose) I use the square bracket symbols always opening & closing [ ... ] in order to make searches more easy & efficient.

Let me explain a little bit further my system:
Until now I have explained 3 types of indication:
[vs. ...] = for samplings
[aprx. ...] = for similarities between songs
[/theme from .../] = for being a part of another work like soundtrack or label

These are the 3 types of indications I write down on ALBUMARTIST field. But there is one more indication I write down on the TITLE field:
[/ .../] = for keywords

This way, If I want to search a sampling I use the pattern [vs. + a keyword. In my library the pattern [vs. is unique, it only means that "the following data is a sampled artist". Another pattern would also work as long as it was unique [vs. ...].
Another good point of using the patterns is that it is quite easy to remember for me, quite logic.
*This applies to the other 3 types of indications ([vs. ...], [aprx. ...] & [/theme from .../]).

This is the reason why I

On the other hand, I have realized that the patterns are needlessly using too much characters. The worst pattern is the one that indicates that the song "is part of another work" [/theme from .../] as it uses 14 characters.
So I was seriously thinking in making it shorter, in finding an unique pattern of 2-4 characters maximum. For this purpose I was thinking in using special & weird characters I have never seen used in any of my 30.000 songs from my music library. It would be something like this:
[vs. ...] = ¶√ ... √¶
[aprx. ...] = ¶≠ ... ≠¶
[/theme from .../] = ¶® ... ®¶
[/ .../] = ¶§ ... §¶

CONCLUSION 1:
So, it really does not matter the decoratives brackets itself, what matters is to have an unique pattern to easily search & understand the indication.
Maybe you know is not a good idea to start using these special characters? Or you see a kind of problem I am not aware?
For what reason do you suggest me to delete the square brackets? Have you still think they are unuseful & just decorative?
Finally, I am not sure I need a closing symbols on the pattern: just ¶√ ... instead of ¶√ ... √¶.
Please tell me your thoughs.

--

If you have followed me until here, sorry for such a long explanation :pray:, I ask you other questions:

Comparing the old pattern vs. the new one

I realize you have removed the vs :+1:
Also you have added a ? but not sure what it means :thinking:

I tested the new code in all 7 examples:
Example 1:
Amerie - 1 Thing.mp3
ALBUMARTIST: "Amerie [vs. The Meters]"
Example 2:
The Beatles - Twist And Shout.mp3
ALBUMARTIST: "The Beatles [vs. The Top Notes]"
Example 3:
2 Unlimited - Get Ready For This.mp3
ALBUMARTIST: "2 Unlimited [vs. Simon Harris vs. The D.O.C. vs. Lyn Collins vs. Derek B] [/theme from Space Jam/]"
Example 4:
George Thorogood & The Destroyers - Bad To The Bone.mp3
ALBUMARTIST: "George Thorogood & The Destroyers [/theme from Terminator/]"
Example 5:
Peggy Gou - (It Goes Like) Nanana.mp3
ALBUMARTIST: "Peggy Gou [aprx. ATB]"
Example 6:
ABBA - Dancing Queen.mp3
ALBUMARTIST: "ABBA"
Example 7:
Las Ketchup - Aserejé.mp3
ALBUMARTIST: "Las Ketchup [vs. The Sugarhill Gang] [aprx. Frankie Valli]"

It worked in all the examples except one: the 6th.
So, it worked in all the examples where ALBUMARTIST includes an indication starting by a square bracket. In fact, I have tested another example with a keyword indication on the TITLE & the pattern you have provided succeed :wink:
The problem with the example 6 "ABBA - Dancing Queen.mp3" is that the
ALBUMARTIST: "ABBA" does not include any indication.

CONCLUSION 2
So, is it possible to find a solution for those cases with no indications (no [)?
Maybe I need to use 2 actions, one for the songs with indication & another one for the songs without indication?
Or maybe would be more easy to work in 2 steps:
1st copy the data from one metafield to another one.
2nd on MIXARTIST use and action to delete all the data after the "specifc artist name" & on PUBLISHER* use and action to delete all the data previous the first square bracket (or the symbol I decide to use )?

*I talk here about PUBLISHER because I want to move the data from ALBUMARTIST to MIXARTIST & PUBLISHER, not to CONTENTGROUP & MIXARTIST as I sayd before.

Sorry for a long explanation but I realize that if I do not provide all the info that matters, your suggestions would be based in a partial information & maybe what you suggest is not the best solution I am looking for.

Thank you so much!