Working with multiple value tags

Hi everyone-
Had some questions about working with tags with multiple values. I am trying to use multiple artist tags instead of adding a "featuring" thing to either the artist or title tag to avoid "dirtying" up the wrong tags. However, I'm having trouble making it all work.
I have an expression that copies the ARTIST tag to the ARTISTSORT tag:
Format Value "ARTISTSORT": %artist%
When I tried that on a track that had ARTIST as Linkin Park\\Jay Gordon, it made ARTISTSORT just Linkin Park.
Is there some way to get it to copy both values so that ARTISTSORT is Linkin Park\\Jay Gordon?
I'm sure there will be a lot more questions about multiple value tags that I will have. Is there another thread that deals with that? If not, we should do it here!
Thanks!

Check out the metadata functions in Mp3tag. Perhaps that's what you're looking for:

https://docs.mp3tag.de/scripting

What type of files are you working with?

I'm working with MP3s only.

Sure, I see the $meta tags, but how do I use them to do what I was asking about?

Format Value "ARTISTSORT": $meta_sep(artist,\\) doesn't work. This only puts the first artist in.
Nor does $meta_sep(%artist%,\\) This does nothing. It's often hard for me to tell whether to use the % or not.

I just tried this with some Mp3 files tagged with both ID3v2.3 and ID3v2.4 tags and it works for me. Looking at it in a hex editor, the ARTIST field is stored as a single null delimited TPE1 field. When the ARTISTSORT (TSOP) field is created using a Format Value action, it too is a single null delimited field.

I'll bet the problem is that you're only seeing one of them in Mp3tag. If you're looking at it in the file view (the columns on the right) make sure that your column is defined with a value as follows:

Value: $meta_sep(artistsort,\\)

(Right-click the column headers and select 'Customize columns...')

Yes, everlasting big problem.

If you want to speak about the tag-field, then you take the tag-field by its name, e. g. ARTIST.
If you want to use the content of the tag-field, then you take the tag-field by its content , e. g. %ARTIST%.
The percent signs around the tag-field name work as a content operator.

But there is also another meaning of the percent signs when it comes to split strings by guessing expressions.
Then the percent signs around the tag-field name is only a visual indicator to the user, that the symbol %ARTIST% is a placeholder for the tag-field ARTIST, which content %ARTIST% will be changed by the following operation.

DD.20110510.0831.CEST

There is something unusual going on.
Having this multi-value tag-field:
ARTIST=Linkin Park
ARTIST=Jay Gordon

Action: "Format Value"
Field: ARTISTSORT (string entry created by autocomplete)
Value: $meta(ARTIST,', ')

... will create one tag-field (extended tag view):
ARTISTSORT=Linkin Park

Hex-view displays not a tag-field ARTISTSORT but a tag-field ARTISTSORTORDER:

ID3 !TPE1 Linkin Park Jay GordonTXXX ARTISTSORTORDER Linkin Park

Same situation will occur when using ...
$meta(ARTIST,'\\')

Beside the technical problem ... I wonder what sense lies in a multi-value tag-field ARTISTSORT?

DD.20110510.0926.CEST

According the documentation, that's not the correct syntax. $meta(ARTIST) will separate valaues with ", ". You should use $meta_sep() to designate a separator.

Do you have a field mapping defined that is causing this? I don't get anything like that using 2.48d and the default mappings.

If the particular program interpreting the tags can read multiple value from an ID3v2 ARTISTSORT field, and it relates the components of the field to the corresponding components of the ARTIST tag, then it will work as desired. If not, it will create a mess.

With free-form tagging systems such as Vorbis Comments or APEv2 I would be reluctant to do this, since multiple values are actually stored in multiple comment fields, with no implied order.

'JJ Johnson', you are right. I was in a hurry this morning and the bad $meta entry has come in by autocompletition and I didn't noticed that (... should have cleaned the history lists from olde test strings and syntax failures).

I did the verification again.
Having this multi-value tag-field (extended tag view):
ARTIST=Linkin Park
ARTIST=Jay Gordon

Action: "Format Value"
Field: ARTISTSORT
Value: $meta_sep(ARTIST,'\\')

... will create a multi-value tag-field (extended tag view):
ARTISTSORT=Linkin Park
ARTISTSORT=Jay Gordon

When running ...
Action: "Format Value"
Field: ARTISTSORT
Value: $meta_sep(ARTIST,', ')

... one tag-field will be created with all values in a string:
ARTISTSORT=Linkin Park, Jay Gordon (extended tag view)

It is not possible to transport all the multi-values from one tag-field to another tag-field by a simple 'Format Value' action.

When running ...
Action: "Format Value"
Field: ARTISTSORT
Value: %ARTIST%

... one tag-field with the first value only will be created:
ARTISTSORT=Linkin Park (extended tag view)

DD.20110510.1254.CEST

Sorry to take so long to get back to you guys. I'll give that a try; it looks like it worked on one of my tries. Thanks!

Okay, so it looks like:
Format value ARTISTSORT with $meta_sep(ARTIST,'\\') does work (and changing the column thing allows them both to be visible).
Having multiple ARTISTSORT is just like multiple ARTIST, except trying to have them sorted Last, First, or whatever :slight_smile:
Thanks so much for the help!