Replace / with ; in composer tag

Tags: #<Tag:0x00007f2a54a50ea8>

I’m trying to sort through my music and it’s about 90% done, I’m trying to be Picard to go through the composer tags and replace the / (forward slashes) with ; (semicolon.) I’ve already gotten it to work with artists to separate musicians, but for some reason the composer tag doesn’t seem to be working.

For example from 3 Doors down the composer currently looks like;
Brad Arnold/Matt Roberts/Todd Harrell

and trying to run it through Picard with this little bit of script;
$set(composer,$rreplace(%composer%, / ,; ))
$set(Composer,$rreplace(%Composer%, / ,; ))

Is not doing anything. The result I’m trying to get is;
Brad Arnold; Matt Roberts; Todd Harrell

Looking in the script documentation it seems like composer is under advanced tags, but I don’t know what that is or how to use it, and I’m not trying to do anything particularly fancy with it.

What is your setting for multiple value separator in options?

Uhh… where is that? Under tags where it says “join multiple ID3v2.3 tags with:” the drop down selection box is a ; semicolon.

I suppose as an edit that… probably doesn’t matter, I had Picard set to remove existing tags so things like encoder settings wouldn’t be shown and added composer to the preserve list, but I unticked the clear tags box and removed composer from the preserved tags list.

Yeah, that’s where I was thinking. I’m not sure what else might be going on, hopefully someone else has a clue.

I think that is because you use %rreplace, which is for regex.

should probably work?

1 Like

No dice. Still doesn’t do anything.

That’s odd.
Could you perhaps send me a download link to a file that I can test this on?
(Perhaps use the PM feature on ‘the other MB forum’ you and I both frequent for this?)

Maybe change ID3v2 into 2.4 with UTF-8:

One more thing

the following command will not work. Because it replaces / with ; only in composer name:

Before using script:

After using:

I… could… but I’m just using Musicbee as a media player and most have a composer tab. Just put in two composer names with a / between them. It would be easier than trying to get a file to you.

So… I’m pretty sure that’s what I want it to do. Changing it to 2.4 with utf-8 doesn’t seem to change it for me. I also have zero idea what any of those really are or what they do. Copying your tick boxes doesn’t replace anything for me.

I did that on a file after I posted my script, and for me it works.

ID3v2.4 contains proper support for multi-value tags where the individual values are separated with a NULL-byte which cannot occur in the values themselves. How an application reading those tags chooses to show the combined multi-value list is not necessarily specified, Picard uses semicolons but they are not actually stored in the file.

Sadly a lot of applications don’t properly support the newer and better ID3v2.4 so the default is still v2.3, in which tags can only have a single value and we have to separate values with something like a /.

1 Like

In his initial post the OP says he has a file where the composer tag says: Brad Arnold/Matt Roberts/Todd Harrell.
Running my script on a file like that and then checking it in MusicBee shows that it does work, and it splits up the separate composer names.

(Picard and MusicBee both set to use id3v2.4, but the OP hasn’t been specific about the file types he tried it on. Perhaps he is also using flac files?)


@hiccup You’re right, I did not read it carefully.

No, they’re all pretty much MP3 or wav. I don’t know why it seems to be working for you, but not for me. The issue has to be in MusicBrainz somewhere because it’s not doing anything. I don’t necessarily need support for proper multi-tagging since Musicbee reads ; as a break and automatically separates items. Otherwise even in other applications that don’t do that I’d still rather have A; B than A/B just for readability.

Just in case, this is my current “tags” options panel

and my scripting

You can see the composer line under the pop-up not being affected at all. And it is mp3

This is very strange. With these settings the default would be that the composer tag is a real multi-value tag, and Picard would display it in the tag list separated with ;. If you edit the value the different composers should be displayed as separate entries.

Are you sure you have not other script or plugin interfering with it? How is the composer tag displayed for this release if you don’t have any files attached to it?

1 Like

Then the / in the composer tags is maybe not a / (solidus) as in the script, but a similar looking symbol.
Perhaps a fraction slash?: ⁄

Copy the symbol from the composer tag and paste it into the script and see if that is the case?


Just trying to start over a bit and/or clarify things:

Your end goal is to have composers listed as a single-value tag with individuals separated by semi-colons (e.g., “Brad Arnold; Matt Roberts; Todd Harrell”), right?

If you remove all scripts and disable all plugins and just set the “join multiple ID3v2.3 tags with” value to “;” (and set the ID3 version to 2.3). Does this not work?

Have you tried looking at the post‐Picard tagged files in another tag editor to see how it’s displayed there? Maybe Picard is doing the right thing, but due to the abstraction between the raw data inside the file, the translation of that data into what Picard understand and then again transforming the understood data into something visually comprehensible—sometimes some details get lost or changed so what you see is not actually how it is in the file.

1 Like

The only plugins I have are Fanart, TheAudioDB cover art, and Soundtrack. The scripts I have set up don’t touch composer outside of the replace command I’ve shown.