Your script in general would work. It would write the performers with a generic role of “performer” to the file (instead of the individual instruments).
I am not sure if the list of instruments is specific, or if the actual goal was to flatten all performers if so you could also do this:
$setmulti(_performers,$performer(/.*/,;))
$performer(/.*/,;)
will give you all performer names independent of role / instrument, and separate them by semicolon.
I think the rest is answered in:
One additional note would be that MusicBee to my knowledge has no standard “PERFORMER” tag. I don’t know right now how the list of performers you see in the UI is internally called. But I assume when you talk about “standard PERFORMER” tag is that you just added a custom tag with that name to MusicBee?
One option would be to avoid confusion and have the plain list of performer names you want to have with a different tag name, e.g. “PERFORMERS”, to avoid confusion with the internal name performer
:
$copymerge(PERFORMERS,$performer(/.*/,;))