Script to create an album genre from its various recording genres

Around holiday tasks, I’ve created an ‘album genre’ script. It’s based on the idea that if a recording genre appears in half or more of the tracks, it gets added to the ‘album genre’. It’s based on the clever routine that @rdswift provided.

$noop(___Create album genre from genre counts___)
    $if($gte($mul($get(Genre '%_loop_value%' count),2),%totaltracks%),

After this script, the album_genre result for “Suave Suave” is “Electronic; New Age”.

Next, I will be creating a genre prioritization routine to set the order of genres within the multivariable from high to low (like Rock before Folk-Rock, Electronic before Techno, Jazz before Hard Bop, etc.). It will likely be similar to @hiccup’s approach.

Once they’re prioritized & sorted, I’ll truncate a potential long list to 5 or so genres maximum.