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


#1

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?


#2

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.


#3

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…


#4

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.


#5

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.


#6

#7

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.“)


#8

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


#9

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


#10

Thank you. It works.


#11

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: