Author Topic: Managing (levels of) classical music works using MusicBee and MusicBrainz Picard  (Read 296 times)

hiccup

  • Member
  • Hero Member
  • *****
  • Posts: 2759
The intention of this post/tutorial is to explain a method of how to achieve some consistent tagging, filtering and displaying the different levels of classical compositions by using MusicBee in combination with MusicBrainz' Picard.

Using the by default available options and settings still make it very difficult to filter, display, and juggle around with the separate components (levels) that may build up a classical work/recording.
I am referring to the concepts of: Work, Act, Scene, Movement, Part, Title, etc.

The 'work' and 'movement' tags that have been introduced and implemented for this purpose more recently have brought some improvement, but their usability and applicability is limited, and certainly not suited for all filtering and displaying purposes.


Note that the system as explained here completely ignores, and is agnostic to the existing 'work' and 'movement' tags.

So if you currently have your 'work' and 'movement' tags carefully populated, you don't have to worry that this system will do anything to them.
Unless of course you have setup Picard yourself to do that.
So if you are already using Picard, you would be quite safe to test this out without much risk of altering your library, except for the addition of one custom tag.
But of course the advice is still—as always—to try this out on a testing area of your library first.

You can of course use the 'work' and 'movement' tags additionally for releases that are not matched in MusicBrainz' database, or e.g. in cases where you want to use them to overrule tags as provided by Picard.
It shouldn't be too hard to alter the virtual formulas to accomplish that.


The system as described here will result in having several virtual tags available, each one providing specific information about the different level(s) of a classical work.
They can be used for for all sorts of further processing, filtering and displaying.
(with rather consistent and satisfactory results, as I am happy to say after quite a lot of experimenting.)



some premises:

Picard:

- You have MusicBrainz' Picard installed
- You are using the plugin called Classical Extras for it. (available through Options > Plugins)
- You know where and how to enter and activate a script. (don't worry, it's just gonna be a copy&paste)


MusicBee:

- You need to setup one (yes, only 1) custom tag for this to work.
- Depending on how far you want to take this, you'll probably need to setup at least four virtual tags.
  In case you are running short on virtual tags, I would recommend using at least: V3 work sub-top, V6 parts, V7 title short and V9 title full
  You might also be able to reduce your amount of virtual tags by some nesting, or by integrating these new tags in your existing virtual tags for non-classical music.




Let's start with just the plain steps to perform, without much ado or explanation:


1. Picard's Classical Extras plugin:

- navigate to the plugin's option panel.
- In the tab 'Works and parts', check:
   ⦁  'Use canonical work metadata enhanced with text'
   ⦁  'Full MusicBrainz work hierarchy'
   ⦁  'replace work names by aliases'

- in the same tab, in the 'Tags to create' pane, locate the field 'Tags for Movement -including embedded movt/part numbers', and enter:
CE_movement_inc_nr

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 that might mess up formulas further down the road.


2. Picard

In Picard's scripting pane, add and activate this as a script:

Code
$if($get(_cwp_work_part_levels),$if($eq($get(_cwp_work_part_levels),0),,$set(_work_top_cond,$get(_cwp_work_top))),)
$if($eq($get(_cwp_work_part_levels),4),$set(_work_sub,$get(_cwp_work_3)))
$if($eq($get(_cwp_part_levels),2),$set(_part,$get(_cwp_part_1)))
$if($eq($get(_cwp_part_levels),3),$set(_part1,$get(_cwp_part_2)))
$if($eq($get(_cwp_part_levels),3),$set(_part2,$get(_cwp_part_1)))
$if($eq($get(_cwp_part_levels),4),$set(_part1,$get(_cwp_part_2)))
$if($eq($get(_cwp_part_levels),4),$set(_part2,$get(_cwp_part_1)))
$if($get(_cwp_work),$if($get(_cwp_title_part_levels),,$set(_title_short,$get(_cwp_extended_part))),$set(_title_short,$get(_recordingtitle)))
$if($lte($get(_cwp_title_part_levels),1),$set(_title_short,$get(_cwp_extended_part)))
$if($eq($get(_cwp_title_part_levels),2),$set(_title_short,$get(CE_movement_inc_nr)))
$if($eq($get(_cwp_title_part_levels),3),$set(_title_short,$get(_cwp_title_part_0)))
$set(picardtitlefull,$if($get(_work_top_cond),₁$get(_cwp_work_top)¹,)$if($get(_work_sub),₂$get(_work_sub)²,)$if($get(_part),₃$get(_part)³,)$if($get(_part1),₃$get(_part1)³,)$if($get(_part2),₄$get(_part2)⁴,)$if($get(_part1),₅$get(_part1) » $get(_part2)⁵,)$if($get(_title_short),₆$get(_title_short)⁶,))

save and close Picard


3. MusicBee

Create a custom tag named: Picard title full

That should look like this:




Create these virtual tags:

V1 work top
$If($Contains(<Picard title full>,₁)="T",$Split($Split(<Picard title full>,₁,2),¹,1),)

V2 work sub
$If($Contains(<Picard title full>,₂)="T",$Split($Split(<Picard title full>,₂,2),²,1),)

V3 work sub-top
$IsNull(<V2 work sub>,$IsNull(<V1 work top>,,<V1 work top>),<V2 work sub>)

V4 part1
$If($Contains(<Picard title full>,₃)="T",$Split($Split(<Picard title full>,₃,2),³,1),)

V5 part2
$If($Contains(<Picard title full>,₄)="T",$Split($Split(<Picard title full>,₄,2),⁴,1),)

V6 parts
$If($Contains(<Picard title full>,₄)="T",$Split($Split(<Picard title full>,₅,2),⁵,1),$If($Contains(<Picard title full>,₃)="T",$Split($Split(<Picard title full>,₃,2),³,1),))

V7 title short
$If($Contains(<Picard title full>,₆)="T",$Split($Split(<Picard title full>,₆,2),⁶,1),)

V8 works-parts
$IsNull(<V1 work top>,$IsNull(<V2 work sub>,,<V2 work sub>" ≡ "$IsNull(<V4 part1>,,<V4 part1>)),$IsNull(<V2 work sub>,<V1 work top>" ≡ "$IsNull(<V4 part1>,,<V4 part1>),<V1 work top>" ≡ "$IsNull(<V4 part1>,,<V4 part1>);<V2 work sub>" ≡ "$IsNull(<V4 part1>,,<V4 part1>)))

V9 title full
$IsNull(<V3 work sub-top>,$IsNull(<V6 parts>,$IsNull(<V7 title short>,,<V7 title short>),<V6 parts>$IsNull(<V7 title short>,," › "<V7 title short>)),<V3 work sub-top>" ≡ "$IsNull(<V6 parts>,,<V6 parts>)$IsNull(<V6 parts>,$IsNull(<V7 title short>,,<V7 title short>),$IsNull(<V7 title short>,," › "<V7 title short>)))

(I chose to post these in plain text since I feel that that keeps the looks and readability of them a lot cleaner compared to the ugliness that the forum {code} feature turns it into.
Let me know if there are any issues when copy/pasting them like this.)



These are pretty much the basic initial steps and requirements.



What you now have—after you have run a release through Picard and imported it into MusicBee—is:


A:
One custom tag named 'Picard title full' that is constructed like this:


₁work top¹₂work sub²₃part³₄part2⁴₅part1 » part2⁵₆title short⁶

You can pretty much ignore it, but know that this is the source tag that the 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 next level work name if a certain amount of work levels is detected.
part   displays the name of an 'in-between' level of a recording. So that could be the name of a movement, the name of an act, scene, etc.
part2   displays the name of an additional, second 'in-between' level when present.
part1 » part2   displays both 'in-between' levels if more than one is present.
title short   displays only the title, excluding any possibly present work and part names.

Rest assured, unless you later on want to create your own additional virtual tags, you can just forget about how this custom tag works.
If you do 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 above should give you a clue how to do that.



B:
Nine virtual tags, and they are your working tools:


V1 work top   displays the name of the highest work level. E.g it would display 'Der Ring des Nibelungen, WWV 86'
V2 work sub   displays the name of the work level just below the top level (only when present, usually only in more complicated deeper-layered works)
                          Using the previous example it would display 'Die Walküre, WWV 86B' since that is the work one level below the top level of that release.
V3 work sub-top   displays the highest level of a work, unless there is work level below that, in which case it will display that.
V4 part1   displays the name of an 'in-between' level of a recording. So that could be the name of a movement, an act, a scene, etc.
V5 part2   displays the name of a second 'in-between' level when present. So e.g. for a recording, 'V4 part1' could display 'Act', and 'V5 part2' could display 'Scene'.
V6 parts   displays the name of the 'in-between' part if there is one, or both if there are two, delimited by a small double arrow symbol.
V7 title short   displays only the title, excluding work names and part names. If no work levels were detected it will display the original recording title.
V8 works-parts   displays work levels and part levels, excluding the title of the track. (This one is very useful for use in the Column Browser)
V9 title full   Is a concatenation of work, part and title in a more visual attractive style with unique and distinctive delimiters separating them.



I'm sorry, not much eye-candy screenshots in this post, but to at least provide some visual impression of what this all can achieve:


V1–V8 will produce something like this:



to enlarge:





V9 title full will produce something like this:





V3 and V8 can be very useful for filtering purposes in the column browser:





That's pretty much it.
The rest is up to you(r imagination).

___________


Let me know if you find that I have omitted any essential steps in this tutorial that made it unnecessary difficult to complete or understand.
(I hate it when that happens to me too ;-)

Any other feedback or suggestions are welcome also.

Or, in case you are happy with what it brings you, perhaps post some resulting screenshots here?
That might also encourage other users to have some fun with MusicBee and classical music.
(hm, can those really go well together?)


Some closing remarks:

Classical music is quite a b**** to handle and control perfectly in pretty much any database system and playing/managing software.
So I am 101% sure you will encounter releases that will give unsatisfying results.

The cause may lie in how they are entered in MusicBrainz' database, or perhaps in the way the plugin works, or in the way my script and/or my virtual tags are setup.
Hell, sometimes all these three and a full moon combined may be messing things up all at the same time.

But in case—after at least some investigation—you find 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 too.

Else:
Hhmm


and,

A big thanks to MetaTunes at the MusicBrainz forum!
He is the creator of the Classical Extras plugin that is an essential ingredient in all this, and has been kind in giving support.


Enjoy!
Last Edit: July 01, 2019, 07:45:34 PM by hiccup

hiccup

  • Member
  • Hero Member
  • *****
  • Posts: 2759
I made a correction to the script.

The previous version labeled single-level compositions both as a work and as a title, in some places resulting in it's name being displayed twice sequentially, which looked a bit confusing.

Now it shows single-level compositions no longer under 'work'.

JZStudios

  • Newbie
  • *
  • Posts: 14
Yeesh. I just leave the song titles as they are, make the composer the album artist, the symphony or orchestra as artists, and the conductor as composer since I wouldn't use conductor for anything else. Then again, I suppose we don't have a massive classical collection, and I'm left unsure what to do with classical compilation albums, but they also tend to not have conductor or symphony information anyways.

hiccup

  • Member
  • Hero Member
  • *****
  • Posts: 2759
You are talking about another aspect of handling classical music, namely what you would consider to be an 'artist' in classical music.
That is an interesting and complicated topic by itself, and there are many different opinions and approaches about that.


This topic is specifically about the names of existing work levels and the titles of the sections.

If you only care about 'the title', you would have something like this:

Prelude and Fugue no. 10 in E minor, BWV 879: I. Praeludium

If you use Picard, my script and the virtual tags, you would have this as a full title:

The Well-Tempered Clavier ≡ Book II » Prelude and Fugue no. 10 in E minor, BWV 879 › Prelude {I. Praeludium}

And even better, every section is separately available for filtering, searching and displaying purposes. So:

The Well-Tempered ClavierBook II » Prelude and Fugue no. 10 in E minor, BWV 879Prelude {I. Praeludium}


The start-post is a long-read and may seem complicated at first sight, but the steps to perform are not difficult.
It's only long because I wanted it to be complete in explaining the backgrounds.

If you already use Picard and know how to use virtual tags, you could set it up within 5 minutes.
And after that, from then on it will only take a couple of mouse clicks and maybe some 30 seconds for an album to get these results.

frankz

  • Hero Member
  • *****
  • Posts: 1379
My Classical library is very limited, but I'm glad to see that there is a clear and well-detailed procedure for organizing it uniformly and effectively if I ever decide to make that portion of my library less limited.  Thanks for the work you put into this, hiccup.

hiccup

  • Member
  • Hero Member
  • *****
  • Posts: 2759
Thanks, and you're welcome frankz.

I understand what you and JZStudios are saying, but wouldn't it be nice to even have a small classical library in perfect shape with displaying works and titles in a correct and pleasant way?

Or maybe your rock-opera's, or jazz-suites, or Porgy and Bess?

(hm, I haven't even tried it out on any of those myself...)

Bizy

  • Sr. Member
  • ****
  • Posts: 271
Thank you so much, hiccup, for this 'tutorial'.

Sooner or later, I was going to post some related questions to ordering classical music anyway.

I'm kind of postponing doing that...  seems to be so much work...  Guess this is gonna make it a lot easier! :-D
(Up so far, I kind of resorted to a more 'simple' strategy, similar to the one suggested by JZStudios - also fine, for the time being.)

b.
Full installer Version 3_3_7101
Portable Editon 3_2_7109
OS: Windows 10 Home Edition

hiccup

  • Member
  • Hero Member
  • *****
  • Posts: 2759
For those that are not that much interested in the finer-grained results and extended possibilities that using the script and the virtual tags will make available, but are satisfied to have the standard Title, Work and Movement tags filled properly by Picard and it's Classical Extras plugin:

Install Picard, activate the Classical Extras plugin, navigate to it's Works and Parts settings tab, and set it up something like this:



JZStudios

  • Newbie
  • *
  • Posts: 14
I understand what you and JZStudios are saying, but wouldn't it be nice to even have a small classical library in perfect shape with displaying works and titles in a correct and pleasant way?
Mmm, in my case most of the... acts or suites or whatever are the album title, so throwing it in the song title just makes them longer. Otherwise they'e weird compilation albums where it might be useful, but Picard doesn't have them in the database anyways.
I get what you're talking about now and it makes sense but I don't listen to classical music enough or know all the symphonies. And then I'd still have to fiddle with all of the compilations or random symphony albums we got from.... somewhere? With no real information on them. I'm guessing it won't just take "Fur Elise" or "Ode to Joy" and input the symphony info.
It might help "organize" this in various artists though.


Frankly I'm more interested in getting the artist, composer, and conductor information in a quicker way than searching for the album on Discogs and manually transferring them over. Thankfully I don't have a large classical collection so I've already done it.