Author Topic: Sub-grouping Header (Classical and Non-Classical Music)  (Read 3271 times)

karbock

  • Sr. Member
  • ****
  • Posts: 320
Sub-grouping Header for Classical and Non-Classical Music


Table of Contents

(1) Summary
(2) Other related threads
(3) Typical results
(4) Tagging conventions
(5) Solution with 7 virtual tags
(6) Explanation of the virtual tags
(7) Colour codes and symbols



(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)


CombinationLight theme + 4 possible coloursDark 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.

TagContent ConventionsExample
ComposerFormat = Surname, GivenNames.
The other contributing composers, if any, are semicolon-separated.
TCHAIKOVSKY, Piotr
WorkPopulated if the work is split up into several movements.
Empty otherwise.
Swan Lake, Op. 20
GroupingOptional.
Album section (e.g.: Secular works, Sacred works),
or work section (e.g.: Act 1, Act 2, …).
Act 1
GenreThe 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 tagFormula
1v.Str.Album.Composer<Album><Composer>
1v.Str.Album.Work<Album><Work>
1v.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"))
1v.chk.Disc$IsNull(<Disc Count>,,$If($Or(<Disc Count>=1,<Disc#>=0),,$If($IsMatch(<Genre>,"Classical"),,D)))
2v.chk.Composer$IsNull(<Composer>,,$If($And($Not($Count(<v.Str.Album.Composer>)=$Count(<Album>)),$IsMatch(<Genre>,"Classical")),C,))
2v.chk.Work$IsNull(<Work>,,$If($Count(<v.Str.Album.Work>)=$Count(<Album>),,W))
3v.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.Work
Concatenation 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.Short
If 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.Disc
The disc number is shown, if:
  • <Disc#> is not null
  • AND <Disc Count> is not 1
  • AND <Genre> doesn't contain "Classical"

v.chk.Composer
The 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.Work
The 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.Header
Sub-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 partColour code
Disc{color: 40,140,90}
Grouping{color: 125,105,0}
Composer{color: 175,25,25}
Work{color: 0,105,155}

2-colour set
One colour for any symbol, one for any text.

Symbol vs. textColour code
Symbol{color: 150,130,60}
Text{color: 40,140,90}

Symbols + alternative version

Header partfont: defaultfont: 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}
Last Edit: July 25, 2023, 09:02:29 AM by karbock

karbock

  • Sr. Member
  • ****
  • Posts: 320
Added:
    • Reference to related threads
    • Screenshot for disc + grouping (non-classical music)
Improved:
    • Screenshots side-by-side

karbock

  • Sr. Member
  • ****
  • Posts: 320
Changes:
    • Removed v.Str.Default, v.Chk.Grouping
    • Simplified v.SubGrouping.Header
    • Reduced the number of virtual tags
    • Added Pachelbel to v.Composer.Short
Last Edit: February 16, 2023, 10:05:20 PM by karbock

karbock

  • Sr. Member
  • ****
  • Posts: 320
Improved:
  • Work name:
    The work is shown IF it is present AND the track count for the combination <Album>+<Work> differs from the track count for <Album>.
  • Composer name:
    The given names are generally removed. Exceptions:
    • Couperin, Marcello, Pachelbel, Scarlatti: given names kept
    • Bach: given names removed only for Johann Sebastian
    • Haydn: given name removed only for Joseph
    • Mendelssohn: given name removed only for Felix
    • Mozart: given names removed only for Wolfgang Amadeus

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
From my library:

Pau Casals
Enric Casals

Franz Schubert
Heinz  Schubert

karbock

  • Sr. Member
  • ****
  • Posts: 320
From my library:
Pau Casals / Enric Casals
Franz Schubert / Heinz  Schubert
Thanks for your contribution! I'll add them to the next update (coming soon...)

karbock

  • Sr. Member
  • ****
  • Posts: 320
Improved:
* No more condition on AlbumArtist
* $Count used to identify multiple-composer albums instead

Split up:
* the solution with 7 virtual tags (but easy to maintain)
* the solution with 3 virtual tags (but difficult to maintain), with aggregated formulas


Updated:
* list of composer names in v.Composer.Short
Last Edit: April 23, 2023, 01:06:26 PM by karbock

karbock

  • Sr. Member
  • ****
  • Posts: 320
New screenshots (clickable) comparing the display, with:
  • a light theme + 4 possible colours (one for each element type)
  • a dark theme + 2 colours, always the same (symbol vs. text)
Last Edit: February 24, 2023, 06:41:38 PM by karbock

karbock

  • Sr. Member
  • ****
  • Posts: 320
Added:
  • v.Composer.Short:
    The first word of the surname (DA, DE, VAN, VON) is omitted when customary:
    • DA PALESTRINA, DE LASSUS, VAN BEETHOVEN, VON WEBER
  • List of symbols + alternative version
Last Edit: March 16, 2023, 06:57:18 PM by karbock

karbock

  • Sr. Member
  • ****
  • Posts: 320