What's this all about Alfie?The intention of this post/tutorial is to describe a method in achieving a consistent system for tagging, filtering, displaying, and managing the different levels of classical compositions by using MusicBee, MusicBrainz' Picard tagging tool, and a tailor-made script created for this purpose.
If your music library contains some larger classical works, for e.g. displaying purposes you may have the desire to be able to achieve something resembling what you will find on the printed covers of physical releases of classical albums:

Also you may want to have some additional tagging options (virtual tags) available, optimized for organising, managing and playing your classic music.
This 'howto' attempts to be helpful in achieving that and more.
While this has expanded into a pretty long read, you can probably trust me when I say that the actual steps you'll have to perform to get this operational are not very complicated, and that the instructions are designed and worded to be as clear and straightforward as possible.
Introduction:Suppose somebody accidentally slipped some classical music in your digital music playing and managing software. (never admit you did that yourself)
The first thing to understand is that an essential distinction between popular music and classical music is that while popular music could be described as a single sheet of paper (or for the purpose of convenience and commercial gains an album, a.k.a. record, cassette, CD), classical music is usually more like a book, a story, with maybe a main title, perhaps chapters and paragraphs, etc. Maybe even a volume comprised of several books.
Obviously the original composer of classical music was—and is—not hindered or obstructed that a composition should not be longer than 3 minutes to be played on the radio, or that an LP can contain only 20 minutes per side, a CD some 70 minutes, nor that a CD should really have an Album Title and an Album Artist printed somewhere behind it's ugly polycarbonate enclosure.
So, while for non-classical music it is usually sufficient to know only the name of the band, the album title and the track title, for understanding and managing classical music it is quite helpful (essential?) to have some understanding of- and be able to manage levels of works, parts, movements, etc.
Note that certainly not all classical compositions will be multi-level works though.
There are many stand-alone compositions that are
not part of an overarching work.
For the sake of this scheme and tutorial, such individual compositions will not be considered to be a 'work', and so the 'work' tag for those will remain empty, and they could be treated similar to a regular pop song.
Only compositions constructed of at least two levels will get a 'work' tag besides the 'title' tag.
These occurring varieties of compositions and levels obviously makes tagging classical music, and enjoying it on a computer a whole different ball game.
With newly acquired classical recordings, you will often find any pre-existing tags to be be inconsistent, containing sparse or incomplete information, or containing too much information and long titles cramped into one poor single tag.
Also there will be a variety in how titles or work/composition levels are constructed, or e.g. you'll see differences in the language chosen for the artist or the titles of the compositions.
This is where Picard & MusicBrainz, MusicBee, and this tutorial and my script can play a valuable role.
They make it possible to source very specific tagging information from the MusicBrainz database, and make it available for you to put to good use in MusicBee.
If you would just run recordings through Picard without a beforehand thought-out plan and/or the use of scripts and plugins, the results could seem disappointing.
Been there, done that.
But after lots of trial and error, and running scripts on a large amount and a variety of sorts of classical music, I have concocted a system that works quite well for me, so I thought to share it here.
If you follow the steps, you will end up with Picard automatically writing some consistently populated tags that you will be able to use in MusicBee to filter, group, organize and play your classical music.
Premises:Picard:- You have MusicBrainz' Picard installed (v2.3.2 or higher, this is important!)
(I would suggest using a portable install, so you can e.g. set that one up solely for your classical music, and possibly using a different Picard install for your popular music)
- You have enabled the 'Classical Extras' plugin. (an impressive plugin created by MetaTunes, available through Picard > Options > Plugins)
- You are not fearing to enter a script in Picard. (don't worry, for this tutorial it's just going to be a simple copy&paste)
MusicBee:- You will need to setup one (yes, isn't that great? only 1!) custom tag for this to work.
- You will need to setup a couple of virtual tags. Depending on how far you want to take this, anywhere from six, up to ...
Action:The plain steps to perform, without much ado or explanation:
1 : PicardMake sure that under Options > Metadata you have both release- and track- relationships enabled:
(I have it set like this:)

In Picard's Options > Scripting panel, add and activate this as a script:
$set(_work_top,$if($gte($get(_cwp_work_part_levels),1),$get(_cwp_work_top)))$if($gte($get(_cwp_work_part_levels),3),$set(_temp,$find(%_cwp_work_1%,:))$set(_work_sub,$substr(%_cwp_work_1%,,$if($lt(%_temp%,0),,%_temp%)))))$if($eq($get(_cwp_work_part_levels),2),$set(_part,$get(_cwp_inter_work)))$if($eq($get(_cwp_work_part_levels),3),$set(_part,$get(_cwp_part_1)))$if($eq($get(_cwp_work_part_levels),4),$if($eq($get(_cwp_title_work_levels),4),$set(_part,$trim($substr(%_cwp_work_2%,$find(%_cwp_work_2%,:),),: )),$set(_part,%_cwp_inter_work%)),)
$set(_title_piece,$if($get(_cwp_extended_part),$get(_cwp_extended_part),$get(_recordingtitle)))$set(picardtitlefull,$if($get(_work_top),₁$get(_work_top)¹,)$if($get(_work_sub),₂$get(_work_sub)²,)$if($get(_part),₃$get(_part)³,)$if($get(_title_piece),₄$get(_title_piece)⁴,))
Apply, close Picard, and then open it again.
2 : Picard's Classical Extras plugin:- navigate to the plugin's options panel.
- In the tab 'Works and parts', check:
⦁ 'Use canonical work metadata enhanced with text'
⦁ 'Full MusicBrainz work hierarchy'
⦁ 'replace work names by aliases'
It should then look something like this:

Next, in the 'Genres etc.' tab, disable 'Include workdate in workname'.
This may not be necessary, but I am a bit apprehensive of the added parentheses it will produce that might mess up formulas further down the road.
Apply/save/close.
3 : MusicBeeCreate a new tag named: Picard title full
That should look like this:

Create a custom tag that links to this newly created tag:

Create these virtual tags:
Work [top]¨$If($Contains(<Picard title full>,₁)="T",$Split($Split(<Picard title full>,₁,2),¹,1),)
Work [ sub ]¨ (Important: read the note about [ sub ] at the bottom of this post)$If($Contains(<Picard title full>,₂)="T",$Split($Split(<Picard title full>,₂,2),²,1),)
Work [full]¨ (Important: read the note about [ sub ] at the bottom of this post)$If($Contains(<Picard title full>,₁)="T",$If($Contains(<Picard title full>,₂)="T",<Work [top]¨> - <Work [ sub ]¨>,<Work [top]¨>),$If($Contains(<Picard title full>,₂)="T",<Work [ sub ]¨>,))
Work [adapt]¨ (Important: read the note about [ sub ] at the bottom of this post)$If($Contains(<Picard title full>,₂)="T",<Work [ sub ]¨>,$If($Contains(<Picard title full>,₁)="T",<Work [top]¨>,))
Part¨$If($Contains(<Picard title full>,₃)="T",$Split($Split(<Picard title full>,₃,2),³,1),)
Title [piece]¨$If($Contains(<Picard title full>,₄)="T",$Split($Split(<Picard title full>,₄,2),⁴,1),)
(Note the minuscule tremas ¨ used at the end of the tag names. That's just a habit of mine, only to make it a bit more obvious in the panel headers of MusicBee to see that a tag is a virtual tag)
Those are pretty much all the necessary initial steps.What you now have—after you have run a release successfully through Picard and imported it into MusicBee—is:
I.
One custom tag named 'Picard title full' that is constructed like this:₁work top¹₂work sub²₃part³₄title piece⁴
You can pretty much ignore it, but do understand that this is the source tag that all virtual tags will rely on as a source to retrieve their information from. So guard it with your life from now on.
A brief explanation of it's assembly:
work top displays the highest level of a work.
work sub displays a secondary, lower level work if applicable and present.
part displays the name of an 'in-between' level of a recording. It could be the 'act', the 'scene', etc.
title piece displays only the title of the recording, leaving out any related higher level work and part names.
If you want to create your own virtual tags, you'll probably notice that you can use the sub- and superscript numbers in this custom tag to retrieve the specific fields.
The virtual tag examples presented above should give you an idea how to do that.II.
Six virtual tags that will be your main working tools for filtering, displaying, etc.:Work [top]¨ displays the name of the highest work level. E.g it would display 'Der Ring des Nibelungen, WWV 86'
Work [ sub ]¨ displays the name of the work level just below the top level when present and applicable. (Usually only for more complicated deeper-layered works)
Using the previous example it would display 'Götterdämmerung, WWV 86D' since that is a work title one level below the top work level of that release.
(Important: read the note about [ sub ] at the bottom of this post)Work [full]¨ displays both of the above when present.
Work [adapt]¨ displays the name Work [top], or when present, the name of Work [ sub ].
Part¨ displays the name of an 'in-between' level of a recording. So that could be the name of an act, a scene, a movement, etc.
(this is a good candidate to use for sub-grouping)
Title [piece]¨ displays only the recording title excluding work names and part names. If no work or part levels were detected (i.e. for stand-alone compositions) it will display the full recording title.
An example to clarify what the different 'work' tags would look like:

A couple of additional virtual tags that you may find useful, or use as an example for creating your own virtual tags:
Work + part¨$IsNull(<Work [adapt]¨>,$IsNull(<Part¨>,,<Part¨>),$IsNull(<Part¨>,<Work [adapt]¨>,<Work [adapt]¨> ≡ <Part¨>))
(displays the work title and part title, useful to use in the Column Browser)
Part + title¨$IsNull(<Part¨>,$IsNull(<Title [piece]¨>,,<Title [piece]¨>),$IsNull(<Title [piece]¨>,<Part¨>,<Part¨> › <Title [piece]¨>))
(displays the title including parts, excluding work titles)
Title [full]¨$IsNull(<Work [adapt]¨>,$IsNull(<Part¨>,$IsNull(<Title [piece]¨>,,<Title [piece]¨>),$IsNull(<Title [piece]¨>,<Part¨>,<Part¨>" › "<Title [piece]¨>)),<Work [adapt]¨>$IsNull(<Part¨>,$IsNull(<Title [piece]¨>,," ≡ "<Title [piece]¨>)," ≡ "<Part¨>$IsNull(<Title [piece]¨>,," › "<Title [piece]¨>)))
Some examples of what these tags would look like:


An example how you could use this for the Column browser:

_ _ _ _
Update, I have added another (optional) script:This one will attempt to create a consistently constructed 'Artist' tag for classical recordings.
The reason for it is that another difference between classical and non-classical music is what can be considered to be 'the artist' for a recording.
For popular music that's usually simple and unambiguous. E.g. Davis Bowie, Radiohead, etc.
But for classical music, even aficionados can have long discussions if it should the composer, the conductor, a soloist, the orchestra, all performers, etc.
Picard for example will by default create an artist tag that will not contain the name of the composer.
The 'artist' tag it creates will also require a harder look to see who the performing artist and who the conductor are.
Since I myself prefer to have the name of the composer in the artist tag, and I like to have some indication of 'who is what' I created a script that will look for the presence of composers, conductors and various 'performers', and then attempts to outputs a consistent tag, without it getting too lengthy.
Brief is good here in my opinion, since more complete and extensive information on orchestra, performers and soloists will (should) be available from the appropriate tags anyway.
Obviously this is a matter of personal preference, and not something that everybody will have the same opinion on.
So before activating this script, first take a good look at the examples and do some tests to see if you like the results.
Some examples:
(on the left Picard's default, on the right the script's output)

The script:
$if(%composersort%%_cwp_composer_lastnames%,$if(%_conductor_sort%,$if(%_cea_album_soloists%%_cea_recording_artist%,$set(artist,$if(%composersort%,$rsearch(%composersort%,^\([^\,]*\)),$rsearch(%_cwp_composer_lastnames%,^\([^\,]*\))) \($rsearch(%_conductor_sort%,^\([^\,]*\))\) ‹ $if(%_cea_album_soloists%,$replace(%_cea_album_soloists%,;, ·),$rsearch(%_cea_recording_artist%,^\([^\,]*\))) ›),$set(artist,$if(%composersort%,$rsearch(%composersort%,^\([^\,]*\)),$rsearch(%_cwp_composer_lastnames%,^\([^\,]*\))) \($rsearch(%_conductor_sort%,^\([^\,]*\))\))),$if(%_cea_album_soloists%%_cea_recording_artist%,$set(artist,$if(%composersort%,$rsearch(%composersort%,^\([^\,]*\)),$rsearch(%_cwp_composer_lastnames%,^\([^\,]*\))) ‹ $if(%_cea_album_soloists%,$replace(%_cea_album_soloists%,;, ·),$rsearch(%_cea_recording_artist%,^\([^\,]*\))) ›),$set(artist,$if(%composersort%,$rsearch(%composersort%,^\([^\,]*\)),$rsearch(%_cwp_composer_lastnames%,^\([^\,]*\)))))),$if(%_conductor_sort%,$if(%_cea_album_soloists%%_cea_recording_artist%,$set(artist,$rsearch(%_conductor_sort%,^\([^\,]*\)) ‹ $if(%_cea_album_soloists%,$replace(%_cea_album_soloists%,;, ·),$rsearch(%_cea_recording_artist%,^\([^\,]*\))) › ),$set(artist,$rsearch(%_conductor_sort%,^\([^\,]*\)))),$if(%_cea_album_soloists%%_cea_recording_artist%,$set(artist,$if(%_cea_album_soloists%,$replace(%_cea_album_soloists%,;, ·),$rsearch(%_cea_recording_artist%,^\([^\,]*\)))),$set(artist,%artist%))))
_ _ _ _
That's pretty much it.Let me know if you find omissions of any essential steps in this tutorial that made it unnecessary difficult to complete or understand.
(I hate it when that happens to me too ;-)
Some closing remarks:
This all should not interfere with an existing library containing predominantly non-classical music.
This whole scheme only needs one single custom tag that has no effect whatsoever on your current library.
So this should also help in making it easier to manage a diverse, mixed classical/non-classical music collection.
Tip: For that you could e.g. use virtual tags such as:
Album/Work : $If(<Genre Category>="Classical",$IsNull(<Work [adapt]¨>,<Album>,<Work [adapt]¨>),<Album>)
If you are somewhat hesitant and uncertain about all this; a good advice would be to use a separate, portable install of MusicBee, a separate, portable install of Picard, then create a library containing only some copies of your precious music/albums, and then just start messing around and experimenting. While the system as described here should make it quite easy to get fast, correct and easy to use results,
please do do understand that classical music will still be quite a b**** to handle and control in pretty much any database system and music playing/managing software.
So I am 101% sure you will encounter releases that will give unsatisfying or unexpected results.
The cause may lie in how they are entered in MusicBrainz' database, or maybe in the way the plugin works, or it could be because of the way my script or my virtual tags are constructed.
Hell, maybe sometime all these three and a full moon combined may be messing things up at the same time. (then just chill and have a cigar)
But in case you find (after having done at least some investigation) that my Picard script or my MusicBee formulae virtuariis are the culprit, or that they can be improved in any way; please let me know‽
You'd help me, and possibly others.
The screenshots provided are obviously cherry-picked examples that turned out nice.
In reality you will not always get such nice results in all cases, and you will probably need or want to do some additional editing. You can do that either at the stage where Picard loaded the recordings, or after you have imported them into MusicBee's library.
But I think that these scripts will make it a lot easier to get nice and useful results without requiring too much additional effort.
With this tutorial I tried to describe all steps, with as a starting point having Picard and the CE plugin both at default settings.
I may have overlooked some specific settings that I perhaps did change/remove/added before testing all this, so if you get some very different and unexpected outcomes, let me know, and I will then see if I perhaps overlooked to mention some other required settings.
Acknowledgements go to MetaTunes, outsidecontext, rdswift, and many others at MusicBrainz.
Without their work and support this would not have been possible.
Good luck, and enjoy!
Important note: the spaces surrounding 'sub' were necessary to prevent this forum from disfiguring this post. If you prefer to remove the spaces, make sure you do that in all tag names and formulas where they occur.