Filenaming for classical music

Hi!
I have a library of classical music and I would like picard to rename them. For most classical music the albumartist is like:

albumartist: composer,composer;performer,performer

unless it is a compilation/potpourri. Now what I would like is to have the files renamed as:

composer,composer/albumname/performer,performer/discnr-tracknr trackartist trackname .

For that I assume that I would need the $setmulti(name, value, separator="; ") command but I don’t understand how it works: how can I get the string before the “;” in one variable and the string after the “;” in another variable? As an example:

Berg, Schoenberg/Berg: Wozzeck_Schoenberg: Erwartung/Wiener Philharmoniker, Christoph von Dohnányi, Anja Silja, Eberhard Waechter/2-06 Arnold Schoenberg - Erwartung_ Scene 1, Hier hinein_ Man sieht den Weg nicht… .flac

for a later project: is there also a way to get it catch not only the work, but the work it is part of? So that we can go up the “part of” relationship chain until we arrive at the top and use the top work as a variable for naming (the work relationship “part of” chain only, not the series relationship “part of”) ? It would be great if there was a way to name automatically files like:

composer/mother-work/performer,performer/album/discnr-tracknr trackname
would give:
Arnold Schönberg/Erwartung, op. 17/Vienna Philharmonic, Christoph von Dohnányi, Anja Silja, Eberhard Wächter/Berg: Wozzeck _ Schoenberg: Erwartung/2-06 Erwartung_ Scene 1, Hier hinein_ Man sieht den Weg nicht… .flac

with my example being:
albumartist: Alban Berg, Arnold Schoenberg; Vienna Philharmonic, Christoph von Dohnányi, Anja Silja, Eberhard Wächter
album: Berg: Wozzeck / Schoenberg: Erwartung
artist: Arnold Schoenberg
discnr: 2
tracknr: 6
track title: Erwartung: Scene 1, Hier hinein? Man sieht den Weg nicht…
work: Erwartung, op. 17: 1. Szene: "Hier hinein?.."
mother-work: Erwartung, op. 17
composer: Arnold Schoenberg

on MB: https://musicbrainz.org/recording/7baa2c1d-1daa-4ecc-a0c5-b0916ee024f8

Is there any wizart of picard that could help me?
Dorian

So I spent some time looking at this for my SongKong/Jaikoz taggers and added such fields to Picard/Jaikoz Tag Mapping doc with the hope they would be more widely adopted by taggers such as Picard.

We have both MusicBrainz specific fields that match the work/part hireachy directly and Work/Movement fields that are populated when work/movement identified in other ways such as in the song title even when no direct link to a work from a recording.

Thanks, that looks interesting. What is it exactly? Is it a new set of tags? What is this tag “musicbrainz work composition”? I have never seen it on MB.

There was some discussion a while ago at How to explain Works

Basically it is a list of new tags but they are not currently used in Picard. My logic is that a recording may be linked to a work, and most commonly for classical music that work is part of another top level work, and it that case they represent the Movement and Work. However a recording may be linked to a work which is not part of another work, conversely the work may be part of a work which is part of another work and so on, in the current MusicBrainz database there were a few relationships that extended to six levels. In all cases the two most important works are the one linked directly to the recording which I call MUSICBRAINZ_WORK_COMPOSITION and the top level one called MUSICBRAINZ_WORK then MUSICBRAINZ_WORK_PART_LEVELN can be used for levels inbetween.

If a recording is linked to work that is not part of anything then both MUSICBRAINZ_WORK_COMPOSITION and MUSICBRAINZ_WORK will be set to the same work, this makes the logic for any script/app using these values easier.

Actually, I don’t need the works to have specific tags, I would be perfectly fine if I get tags like work_0 (the work itself), work_1(its father), work_2 etc. because it is quite hard to follow the nomenclature else. I would say that the highest level is per default the composition, in my experience with classical music it always applies. Sometimes collections of works are added as works (like https://musicbrainz.org/work/51e13ca5-dfdc-405e-8e8b-425dc3104f54, where the parts have individual catalog numbers) but these don’t seem problematic to me.

the problem with “work type” is that it is far from complete and sometimes hard to assess (https://musicbrainz.org/work/51e13ca5-dfdc-405e-8e8b-425dc3104f54 and its parts for example.

I filed a feature request to beets to make it order/rename recordings using the works and their parent works, I will see how that turns out: https://github.com/beetbox/beets/issues/2452