Author Topic: Sub-Grouping Header (Classical and Non-Classical Music)  (Read 168 times)

karbock

  • Full Member
  • ***
  • Posts: 128
The purpose here is to use the sub-grouping header for both classical and non-classic music, provided that tags Composer, Work, and Grouping are already populated when needed for your classical tracks. Requires the use of virtual tags.
The presentation below is of course just a proposal that you can adapt to your taste.


Table of Contents

    • Other related threads
    • Summary
    • Showcase
    • Tagging conventions
    • Virtual tag formulas


Other related threads by fellow forum contributors


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 those fields according to the album content:
    • Grouping (if present)
    • Composer (if 2+ composers in the album)
    • Work (if present)
Adding Disc# to the sub-grouping header would fuzzy up the display without adding significant information to classical music albums.


Results with typical examples

Composer + Work:

Grouping + Work:

Composer:

Work:

Grouping:

Disc + Grouping (NON-CLASSICAL):


Classical Music Tagging Conventions

The few conventions that are needed for the virtual tags to work are shown hereafter.

TagContent ConventionsExample
AlbumArtistIf the album concerns several composers, AlbumArtist must include at least the string: [Various].
TCHAIKOVSKY, Piotr
ComposerFormat = Surname, GivenNames. The other contributing composers, if any, are semicolon-separated.
TCHAIKOVSKY, Piotr
GenreThe keywords must include Classical.
Classical; Romanticism; Instrumental; Orchestra; Ballet
GroupingOptional.
Section of the album in general (e.g.: Secular works, Sacred works), or work section comprising several movements (e.g.: Act 1, Act 2, …).
Act 1
WorkPopulated if the work is split up into several movements.
Empty otherwise.
Swan Lake, Op. 20

Virtual Tags to achieve the result

  • Virtual tag names are in the form v.(something) below.
  • v.SubGrouping.Header can be used as sub-grouping header for two main panel views: Album, Album and Tracks. Specify it in their corresponding configuration panels.
  • v.Str.(something): a string to display, along with its formatting codes.
  • v.Chk.(something): IF the corresponding part of the sub-grouping header must be displayed, THEN returns a single character, ELSE returns null.
  • v.Composer.Short keeps only the composer's surname, unless there are several composers with the same surname (such as in the following families: Bach, Couperin, Haydn, Marcello, Mendelssohn, Mozart, Scarlatti). Moreover, if several composers are involved in the track (semicolon-separated), only the first is shown.

For the sake of readability and maintenance, the table below presents 11 virtual tags, which you can reduce to 6, 2 or even 1 if needed.
Should you lack enough free entries in your virtual tag table, you can:
  • within the formula of v.SubGrouping.Header, replace the calls to v.Str.(something) by their matching formulas (5 virtual tags less);
  • or even do the same for v.Chk.(something) (4 virtual tags less, but be cautious: they are called twice each);
  • renounce trimming the composer names (1 virtual tag);
Virtual TagFormula
v.SubGrouping.Header$IsNull(<v.chk.Disc><v.chk.Grouping><v.chk.Composer><v.chk.Work>,<v.Str.Default>,$IsNull(<v.chk.Disc>,,<v.Str.Disc>" ")$IsNull(<v.chk.Grouping>,,<v.Str.Grouping>" ")$IsNull(<v.chk.Composer>,,<v.Str.Composer>" ")$IsNull(<v.chk.Work>,,<v.Str.Work>))
v.Composer.Short$IsNull(<Composer>,,$If($IsMatch(<Composer>,"Bach|Couperin|Haydn|Marcello|Mendelssohn|Mozart|Scarlatti"),$RxReplace(<Composer>,"([^;]*)[;].*","$1"),$RxReplace(<Composer>,"([^,;]*)[,;].*","$1")))
v.Str.Default{color: 0,105,155}•••{color: default}
v.Str.Disc{color: 20,125,20}💿 <Disc#>{color: default}
v.Str.Grouping{color: 125,105,0}¶ <Grouping>{color: default}
v.Str.Composer{color: 155,20,20}✍ <v.Composer.Short>{color: default}
v.Str.Work{color: 0,105,155}🎼 <Work>{color: default}
v.chk.Disc$IsNull(<Disc Count>,,$If($Or(<Disc Count>=1,<Disc#>=0),,$If($IsMatch(<Genre>,"Classical|Film|Synthesizer"),,D)))
v.chk.Grouping$IsNull(<Grouping>,,G)
v.chk.Composer$IsNull(<Composer>,,$If($And($Contains(<Album Artist>,[Various]),$IsMatch(<Genre>,"Classical")),C,))
v.chk.Work$IsNull(<Work>,,W)

Last Edit: January 25, 2023, 11:56:54 AM by karbock

karbock

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