Author Topic: Proposal: Extend 'Genre' hierarchy with 'Subgenre'  (Read 93693 times)

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
I just need to get my hands on the file.
Heya,
there's 4 flavours here:
https://getmusicbee.com/forum/index.php?topic=32352.0
https://github.com/alectron/MusicBee_TagHierarchies

3 for Genres, 1 for Instruments.
There is no default yet.
But juts copy the contents from:
MusicBee_2Layer.txt
or
MusicBee_3Layer.txt
and copy it into a file named TagHierarchy.txt in the location you mentioned (or, just go, in MB -> Tag Hierarchy Explorer Panel (Menu) -> "Edit Tag Relationships" and paste the contents of any/either of the above into the MB window that pops up, and it auto generates that file)
And you'll have MusicBee's olden 2 Layer deep Category/Genre representation, and a first stab at a 3 Layer approach (grouping some of the larger genres, with what I would consider sub genres (House, techno, Metal, etc) - that's probably has a few errors, and much room for opinion, subjective tinkering...) and you should be good to go and adjust it to your tags

c.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9302
Thanks.

When I open the explorer and click 'Edit Tag Relationships" and paste either 2Layer or 3Layer into the window it's throwing
"Error parsing test: Indentation must be a multiple of 4 spaces. @node: <head>"

Any suggestions?
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Can you copy the first 5 to 10 lines of what you pasted and post into a "code" snippet (formatting option in this forum up top in the menu bar, marked with "</>") here on the forum ? Then I could take a stab at trouble shooting what might be wrong.
c.

ps. Info - white-space & line indents are text format conventions for programming concepts/languages, and these need to be followed to a T for the formatting to be picked up correctly here, by the panel...
in case you want to trouble shoot yourself:
This is what it needs to look like, starting with no whitespace on the first line, then an indent per hierarchy level (i.e. 4 spaces "    Afro-Pop", followed by 2 x 4 leading spaces for the next - "        Afrobeat::Genre" and so on an forth), like so:
Code
Genres (MusicBee 2 Layer)
    Afro-Pop
        Afrobeat::Genre
        Apala::Genre
        Benga::Genre
Last Edit: July 25, 2020, 02:54:38 PM by alec.tron

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9302
Here you are. This is straight from MusicBee_2Layer.txt including all the blank lines. I also wonder why it's calling out to github.
Code




<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
  <link rel="dns-prefetch" href="https://github.githubassets.com">
  <link rel="dns-prefetch" href="https://avatars0.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars1.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars2.githubusercontent.com">
  <link rel="dns-prefetch" href="https://avatars3.githubusercontent.com">
  <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com">
  <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">



  <link crossorigin="anonymous" media="all" integrity="sha512-YR0i2ZAJ3fFf7L2CvMny+FWH76iHZNNIcD1YX57o4cdBHev8ffMXOfzy5F/lpBJpLttwPahk3zY/8XXaRH12ew==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-611d22d99009ddf15fecbd82bcc9f2f8.css" />
  <link crossorigin="anonymous" media="all" integrity="sha512-37pLQI8klDWPjWVVWFB9ITJLwVTTkp3Rt4bVf+yixrViURK9OoGHEJDbTLxBv/rTJhsLm8pb00H2H5AG3hUJfg==" rel="stylesheet" href="https://github.githubassets.com/assets/site-dfba4b408f2494358f8d655558507d21.css" />
    <link crossorigin="anonymous" media="all" integrity="sha512-rRjA9My/PBBcaPVlqM+Itl3dsS0snuqXO9XFrSmJNNQz6okQW4a4+jBjpKxZQ4sTiaFtDS1hthUIhMDQSbbTpw==" rel="stylesheet" href="https://github.githubassets.com/assets/github-ad18c0f4ccbf3c105c68f565a8cf88b6.css" />
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
ehm, ok. That's an html document.
What you need is the raw txt file. It needs to look as the above 4 line example (but a few 100 lines long...)
You can grab the MusicBee_2Layer.txt content directly from here - without the danger of grabbing html formatting:

https://raw.githubusercontent.com/alectron/MusicBee_TagHierarchies/master/Genres/MusicBee_2Layer.txt

Just highlight all text in the above, and copy&paste into the panel.

github is for hosting code, and is a very complex system...  so can be a bit overwhelming... but the above direct link to raw text is what you need, and my explanation in the previous post should give you an insight as to what it needs to look like I hope.
c.
Last Edit: July 25, 2020, 02:51:34 PM by alec.tron

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9302
I was just about to write that what I'm downloading doesn't look anything like what you're posts show. Apparently since there's no "download" link for any other the text files on GitHub, I right-clicked and did a Save As.

I'm quite familiar with MB and the workings of the Internet, but let me suggest that you reference a straight text file download for the various iterations. I'm sure some of the more novice users will run into the same issue I did. Don't direct users to GitHub for the download.

Now that I've copied and pasted the text file all is well. Is there a direct link for the 3Layer?

Thanks for your help.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
No worries.

MusicBee_3Layer.txt as
Github file view:
https://github.com/alectron/MusicBee_TagHierarchies/blob/master/Genres/MusicBee_3Layer.txt
Github raw text view:
https://raw.githubusercontent.com/alectron/MusicBee_TagHierarchies/master/Genres/MusicBee_3Layer.txt


I'm quite familiar with MB and the workings of the Internet, but let me suggest that you reference a straight text file download for the various iterations. I'm sure some of the more novice users will run into the same issue I did. Don't direct users to GitHub for the download.

I've asked that question :D
i.e. here:
Also, @psychoadept and others active in the MB Wiki - would there be a space that would lend itself to storing and maintaining various mappings/txt files for others to use ?
I pasted a fair few in the above thread already, but forum is a tad limited for that, and would be nice if there was an agreed upon resource to store, collaborate on, and version these Tag Hierarchy Explorer Panel txt files.

Github is what works for me best atm for this, as the forum does not allow posting texts with 20k + characters, and github also allows versioning & collaboration...
But yes, user-friendly it is not.

Maybe Steven could take one of the files (whichever he likes best, I just try to help pre-formatting these for people, and trying to make it easy/ier for the average user), and add one of them as a default to the MusicBee patched packages, so there's a TagHierarchy.txt file people can start with.

c.
Last Edit: July 25, 2020, 04:02:23 PM by alec.tron

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
https://getmusicbee.com/patches/MusicBee34_Patched.zip

- fixes a few bugs
- now filters out nodes that have no matching files

Perfect! I can confirm that this fixes the interactivity issue for me. The new filtering makes it much more usable as well.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9302
add one of them as a default to the MusicBee patched packages, so there's a TagHierarchy.txt file people can start with.
YES! This would've saved me a lot of time. And I'm sure others would appreciate it. Perhaps Steven isn't quite comfortable with it yet to be included in a distribution/patch. Right now it seems like it's only for the "early-adopters."
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here


alec.tron

  • Sr. Member
  • ****
  • Posts: 752
Hai,
the idea to chuck it on github was to be able to cooperate  :D
So thanks for the request!

But at this point I would refrain from adding new genres to the 2 'MusicBee' sets, as these (i.e. MusicBee_2Layer.txtm & MusicBee_3Layer.txt ) should be based on the genres that always shipped with MB & were defined within MB 'Configuration.xml'.
So I will probably deny the merge into those atm, but I'll take your alphabetical order fixes you've added, and up a version with those (might take me a bit, as am a noob in github land as well... so this endeavor is meant for me to learn the official github ways some more as well. So next is - learning merge requests, and how to cherry pick changes, which I will try today or tomorrow on these - so don't remove the request yet please!...), but dobn't really want to add any new genres at this point as then it would become a personal/subjective variant of the original MusicBee category/genre definitions...

But, your edit would be great to have/keep as well!!
But imo this then should sit under a new name as your variant of those maybe... (?)
So maybe add them as
MusicBee_2Layer (zkhcohen version).txt
MusicBee_3Layer (zkhcohen version).txt
or somesuch ?

Churs.
c.

zkhcohen

  • Sr. Member
  • ****
  • Posts: 346
But at this point I would refrain from adding new genres to the 2 'MusicBee' sets, as these (i.e. MusicBee_2Layer.txtm & MusicBee_3Layer.txt ) should be based on the genres that always shipped with MB & were defined within MB 'Configuration.xml'.

Thanks for the clarification!

I've created a new PR with this in mind here:

https://github.com/alectron/MusicBee_TagHierarchies/pull/2

Quote
Here's a suggested fix for the issue discussed here: #1 (comment)

While we could still have individualized versions of these files, this "community" version gives us the option to publicly contribute to a common hierarchy. It would be nice if people could provide a source for the reasoning behind their changes -- for example, I added Nu-disco and Post-disco as subgenres of Disco:

https://en.wikipedia.org/wiki/List_of_electronic_music_genres


...although I reverted my previous re-categorization of Disco as derivative of Electronic Music, instead of R&B.
Last Edit: July 25, 2020, 07:20:21 PM by zkhcohen

alec.tron

  • Sr. Member
  • ****
  • Posts: 752
https://getmusicbee.com/patches/MusicBee34_Patched.zip

- fixes a few bugs
- now filters out nodes that have no matching files

Perfect! I can confirm that this fixes the interactivity issue for me. The new filtering makes it much more usable as well.

Thanks for the filtering!!
One little request - if not too late and potentially easily do-able... could this 'filters out nodes that have no matching files' functionality become a setting for the panel one can switch on/off...?
I have a hunch being able to not filter might be helpful later on, when troubleshooting etc.

Cheers.
c.


Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
https://getmusicbee.com/patches/MusicBee34_Patched.zip

- in the tag relationship editor, it now displays all the tags from files that are not in the hierarchy
- the panel drop down menu now includes a "Files with Tags Missing in the Hierarchy" report. The report runs off the displayed files only ie. select the "All" node if you want to see the results for all files. In the header bar, the report shows all the tag values not in the hierarchy and the main panel lists all the "problem" files

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
I have created a new genre hierarchy list.

This one contains all the genres that are currently used by Discogs and MusicBrainz.
It is using categories I think will be practical for the average user.

I also created a genre grouping list that matches these genres and categories.
(which can be added via Tags (2) > group genres)

download Genre hierarchy and grouping list