Scripting help to create a multi-value 'involved people' tag?

I would appreciate help in getting a script working for the following purpose:

For flac files, I need Picard to write a single multi-value tag containing the ‘involved people’. (performer, engineer, arranger etc.)
By default for flac files you will get separate tags for those, such as:
producer: John
arranger: Jim
engineer: James

But I need a single multi-value tag like:
producer: John;arranger: Jim;engineer: James

I am not very savvy with Picard scripts and have been struggling with it, using this as some starting point:
$if(%producer%,$set(INVOP,producer: %producer%),)
That by itself works to populate a tag with that one role.

But now I need to retrieve the other roles too, and concatenate them in the same tag.
That will probably need some advanced nesting, and probably require functions such as $copymerge or $setmulti?
I haven’t been able to figure this out and getting the syntax right by myself.

Scripting warriors to the rescue?

I don’t know how to do it with scripting, perhaps others do. You can do it in Classical Extras by tag mapping the source e.g.:

\producer: + producer,\engineer: + engineer, \arranger: + arranger

onto the required tag

EDIT: just realised you are probably on Picard 2.0 - which is not compatible with the plugin, but the new version should be out in a few days.

2 Likes

Thnx. It might be useful to do this for my classical collection, but I am mostly interested in this for my non-classical collection, and for that I usually disable your CE plugin.

So scripting warriors are still welcome…

In some ways “Classical” Extras is a bit of a misnomer as I designed it to work with my non-classical albums too. If you just disable the “part levels” functionality (top left hand check box of the “works and parts” tab) then only the “artists” and “tag mapping” tabs are relevant and it all runs a lot faster (about the same as “vanilla Picard” on my machine) as there are no additional lookups with the enforced 1 sec delay for each. So you get the artist and tag-mapping functionality without having to use scripts and with virtually no performance penalty.
The only slight issue is that the plugin does not “remember” this setting for each release, so it’s best not to mix classical and other music if you want to take advantage of the faster processing (but that’s clearly what you are doing anyway when you enable/disable the plugin).
EDIT: And I should add that the plugin WILL remember (i.e create a tag for) the artist and tag mapping options for each release and will re-use these if you set the advanced options accordingly.

3 Likes

Thnx, and I will certainly try that out after the 2.x version of the plugin has been released.

But I am still interested in learning how to create a Picard script accomplishing what I have described in post #1.

1 Like

Hi Meta Tunes,
Is there a way with classical extras to have the ARTISTS Tag as a string (like „Nicki Minaj; Drake; R. E. M.“ ) and not as a proper multi-valued tags ( not
„Nicki Minaj“
„Drake“
„R. E. M.“)

I wonder if a tagger script might do it. I tried, but scripts seem to be crashing Picard 2.0.3.

1 Like

Using the following tagger script works:
$set(artists, %artists%)
But run it from the context menu, not automatically, otherwise Picard crashes.

1 Like

Thank you. It works.

See also the related discussion below for some more info / background how multi value tags are handled and why $set(artists, %artists%) works in this case:

1 Like