Sub-grouping Header for Classical and Non-Classical Music
(1) Summary
In the Album and Album and Tracks views of the main panel, you can specify a sub-grouping header. In my collection, it is a virtual tag that works for both non-classical and classical music.
For non-classical music, it takes into account Disc# and Grouping.
For classical music, it relies on Grouping, Composer and Work, showing zero, one or more of these fields according to the album content:
- Grouping (if present)
- Composer (if only a part of the album is concerned)
- Work (if only a part of the album is concerned)
Adding
Disc# to the sub-grouping header would fuzzy up the display without adding significant information to classical music albums.
(2) Other related threads
(3) Typical results
Below, a few clickable screenshots showing what the subgrouping header can look like, with:
- a light theme (Faded) + 4 possible colours (one for each element type)
- a dark theme (Oblivion) + 2 colours, always the same (symbol vs. text)
Combination | Light theme + 4 possible colours | Dark theme + 2 colours (always the same) |
Composer + Work |  |  |
Disc + Grouping |  |  |
Grouping + Work |  |  |
Composer |  |  |
Work |  |  |
Work OR Grouping |  |  |
(4) Classical music tagging conventions
The few conventions that are needed for the virtual tags to work are presented hereafter.
Tag | Content Conventions | Example |
Composer | Format = Surname, GivenNames. The other contributing composers, if any, are semicolon-separated. | TCHAIKOVSKY, Piotr |
Work | Populated if the work is split up into several movements. Empty otherwise. | Swan Lake, Op. 20 |
Grouping | Optional. Album section (e.g.: Secular works, Sacred works), or work section (e.g.: Act 1, Act 2, …). | Act 1 |
Genre | The keywords must include Classical. | Classical; Romanticism; Instrumental; Orchestra; Ballet |
The convention on AlbumArtist has been removed. Multi-composer albums (classical music) are now identified by using the $Count function (see below).
(5) Solution with 7 virtual tags
v.SubGrouping.Header is the main virtual tag used as sub-grouping header for the main panel (views 'Album', 'Album and Tracks').
NOTE:
After each encoding phase, [Save] before moving to the next virtual tags.
Encoding phase | Virtual tag | Formula |
1 | v.Str.Album.Composer | <Album><Composer> |
1 | v.Str.Album.Work | <Album><Work> |
1 | v.Composer.Short | $IsNull(<Composer>,,$RxReplace($If($IsMatch($First(<Composer>),"^(BACH, (?!Johann Sebastian)|CASALS,|CHARPENTIER, (?!Marc-Antoine)|COLLINS,|CONTI,|CORNET,|COUPERIN,|HAYDN, (?!Joseph)|JARRE,|LAST,|MARCELLO,|MENDELSSOHN, (?!Felix)|MILLER,|MOZART, (?!W)|PACHELBEL,|PRAETORIUS,|ROBERT,|SCARLATTI,|SCHUBERT, (?!Franz)|SCHUMANN, (?!Robert)|STRAUSS,|TURNER,)"),$First(<Composer>),$RxReplace($First(<Composer>),"([^,]*)[,].*","$1")),"(DA|DE|VAN|VON|CASSANÉA DE) (BEETHOVEN|LASSUS|PALESTRINA|WEBER|MONDONVILLE)","$2")) |
1 | v.chk.Disc | $IsNull(<Disc Count>,,$If($Or(<Disc Count>=1,<Disc#>=0),,$If($IsMatch(<Genre>,"Classical"),,D))) |
2 | v.chk.Composer | $IsNull(<Composer>,,$If($And($Not($Count(<v.Str.Album.Composer>)=$Count(<Album>)),$IsMatch(<Genre>,"Classical")),C,))
|
2 | v.chk.Work | $IsNull(<Work>,,$If($Count(<v.Str.Album.Work>)=$Count(<Album>),,W))
|
3 | v.SubGrouping.Header | $IsNull(<v.chk.Disc>,,{color: 40,140,90}💿 <Disc#>" ")$IsNull(<Grouping>,,{color: 125,105,0}¶ <Grouping>" ")$IsNull(<v.chk.Composer>,,{color: 175,25,25}✍ <v.Composer.Short>" ")$IsNull(<v.chk.Work>,,{color: 0,105,155}♫ <Work>)
|
(6) Explanation of the virtual tags
v.Str.Album.Composer
Concatenation of Album and Composer, used to count the number of different composers (populated OR null) within the same album.
Necessary since:
- $Count(<Album><Composer>) is not accepted
- $Count(<Composer>,<Album>) doesn't take null <Composer> values into account
v.Str.Album.WorkConcatenation of Album and Work, used to count the number of different works (populated OR null) within the same album.
Necessary since:
- $Count(<Album><Work>) is not accepted
- $Count(<Work>,<Album>) doesn't take null <Work> values into account
v.Composer.ShortIf several composers have contributed to the musical piece (semicolon-separated), only the first is shown.
The given names are generally removed, but:
- For some families comprising several composers, the given names are always kept:
CASALS, COUPERIN, MARCELLO, PACHELBEL, SCARLATTI, ... - For some other families, the given names are kept, except for these figureheads:
BACH, Johann Sebastian; CHARPENTIER, Marc-Antoine; HAYDN, Joseph; MENDELSSOHN, Felix; MOZART, Wolfgang Amadeus; SCHUBERT, Franz; SCHUMANN, Robert - The first word of the surname (DA, DE, VAN, VON) is omitted when customary:
DA PALESTRINA, DE LASSUS, VAN BEETHOVEN, VON WEBER
v.chk.DiscThe disc number is shown, if:
- <Disc#> is not null
- AND <Disc Count> is not 1
- AND <Genre> doesn't contain "Classical"
v.chk.ComposerThe composer's name is shown for a multi-composer classical album, i.e. if:
- <Composer> is not null
- AND <Genre> contains "Classical"
- AND the track count for the combination <Album>+<Composer> differs from the track count for <Album>
v.chk.WorkThe work is shown if:
- <Work> is not null
- AND the track count for the combination <Album>+<Work> differs from the track count for <Album>
v.SubGrouping.HeaderSub-grouping header for the main panel (views '
Album', '
Album and Tracks').
Colour codes used: 4 different colours.
(7) Colour codes and symbols
In the formula of v.SubGrouping.Header, just adapt the colour codes to your taste and the skin(s) you use. The four-colour scheme has been tested with several light and dark skins.
4-colour set
One colour for each component type: disc / grouping / composer / work.
Header part | Colour code |
Disc | {color: 40,140,90} |
Grouping | {color: 125,105,0} |
Composer | {color: 175,25,25} |
Work | {color: 0,105,155} |
2-colour setOne colour for any symbol, one for any text.
Symbol vs. text | Colour code |
Symbol | {color: 150,130,60} |
Text | {color: 40,140,90} |
Symbols + alternative versionHeader part | font: default | font: Segoe MDL2 Assets |
Disc | 💿 | {font: Segoe MDL2 Assets; Regular; 12}{font: default} |
Grouping | ¶ | {font: Segoe MDL2 Assets; Regular; 12}{font: default} |
Composer | ✍ | {font: Segoe MDL2 Assets; Regular; 12}{font: default} |
Work | ♫ | {font: Segoe MDL2 Assets; Regular; 12}{font: default} |