Multiple Values for Field Name (FLAC)


#1

The recommended way to create Vorbis comments from a field that has multiple entries is as follows:

If there are two composers for a track, enter them in dbpoweramp like this:

Composer1; Composer2

The resulting Vorbis comments should be as follows:

COMPOSER=Composer1
COMPOSER=Composer2

This is done properly for the COMPOSER tag, like the above example.

However, for custom tags, like this one, only a single Vorbis comment is generated:

Entering this information for a custom tag named PERFORMER, like this:

Performer1; Performer2

results in this single Vorbis comment:

PERFORMER=Performer1; Performer2

instead of:

PERFORMER=Performer1
PERFORMER=Performer2

I've asked Spoon to please always parse such entries so that multiple tags are created instead of one long one. So far, no joy there. We wish to be able to tag each track with all of the performer's names and instrumentation, but if only one tag is created for all of them, it becomes very, very long and may be truncated. This is an obvious problem.

So here's the question: Is it possible to write a script of some kind that will "inspect" all Vorbis comments for this spacing (semicolon followed by a single space) and create individual Vorbis comments for each element in the original long string of values?

The only other option appears to enter each performer's tag information, one at a time, using the Alt-T panel and the New/Edit/OK buttons in mp3tag. Naturally it would be best if this were done 'correctly' in dbpoweramp to begin with.

"d2b"


#2

Mp3tag has an action type of 'Split field by separator' that could be used. I haven't used it before, but some testing indicates that it only works with single character separators. If I enter the two characters "; " (semi-colon, space) then it also splits the field around spaces. It seems that what you're actually entering is not a separator, but a list of individual separator characters (maybe that's a bug, or maybe it's just badly documented).

One way to work around that is to first replace "; " with some single unusual character that wouldn't normally be found in your tags. I used a backquote ( ` ).

So to create your splitting action group, use two actions.

Action type: Replace
Field: ARTIST
Original: ;
Replace with: `
[ ] only as whole word
[ ] case-sensitive comparison

(with a space after the semi-colon)

Action type: Split field by separator
Field: ARTIST
Separator: `

Mp3tag has an _ALL pseudo-fieldname that I believe is intended to allow working on all fields at the same time, but I tested it and while the Replace action functioned correctly, the Split action did not. Realistically, you probably don't have more than a half dozen or so fields where this type of action would be necessary (multiple albums or titles is unlikely). In Mp3tag you can easily copy actions within an action group, so duplicating the above two actions for another five or six fields wouldn't be hard. Just copy them and then change the fieldname.


#3

MP3tag interprets a double backslash \\ as separator for multi-value fields.
So, if you replace the Semicolon blank with a double backslash, then MP3tag should create multi-value fields on save.
These are then interpreted and displayed in their own way by the various players.


#4

Yeah, I thought of that and tested it, but like you say, you have to then do a Save. Simply replacing "; " with "\\" doesn't do it by itself. It remains a single field.


#5

Use the Split field by separator action with ";" as separator.
Trailing spaces are removed automatically during the process.


#6

Unless you don't want to split a field around only a semi-colon that doesn't have a following space.