New Plugin: Import Discogs Genre
For certain kinds of music, Discogs provides excellent genre tags. A new beaTunes plugin now lets you import those genre tags directly via an analysis task. Analysis task—that means that the installed plugin shows up as the last option in the Analysis Options dialog that appears once you choose to analyze some track (similar to the Bandcamp plugin). The code for the plugin is rather trivial and open source. If you are interested in programming I highly encourage you to check it out at GitHub.
How difficult would it be to modify this code to pull down multiple style tags, not just the top voted one? Ideally I would like to pull down the top 3-5 top voted tags for genres. For example, if I ran it on Francis Harris - Lean Back, I would like it to tag it as 'Deep House, Downtempo, Drone' instead of just 'Deep House'.
I have rudimentary java programming experience but none with Maven or Beatunes API.
It's trivial. Please take a look at the source code on GitHub.
I attempted to modify the code- and was successful at getting it to query and tag multiple genres/styles. There appears to be something of a glitch, however, and it is present even in the unmodified version.
It appears the list created by querying the style tags does not seem to be ordered by the number of votes/tags. This means grabbing the tag stored at list position 0 does not always return the most popular/voted tag for a specific track. In some of my test cases, it ended up tagging a song with a style that had only 1 vote/tag.
Hm. As far as I know, Discogs styles/genres aren't user tagged, but assigned by the folks running Discogs. Am I misinformed?
My comment about this being trivial was more about the programming part. Apologies, if I mislead you.
Ahh! Happy to clarify what I mean.
Take Maceo Plex - Solar for example
In the left column, under 'Style', you'll see:
Tech House 1
Deep House 1
Well, ideally if you polled the style list you'd get 'techno' at position 0, 'electro' at position 1, and then one of the ones with a value of '1' (likely 'tech house') at position 2.
But what you actually get is 'leftfield' for list position 0, 'breaks' for list position 1, and 'electro' for list position 2.
It's clear the style values on discogs represents something akin to votes or endorsements- popular songs have way more tags and much higher values than lesser known songs. So what this tells me is the style list are probably unsorted. While it is most likely the function will return the style with the highest value, that won't always be the case.
I hope I'm being clear?
The link you sent refers to a composition, not a release. A composition may have been released many times by different artists. I believe the style counts you see are not votes, but just aggregated views on the release data. So in this special case, three of the releases of that composition were marked with the style "Techno".
beaTunes does not look up compositions (as far as I know those are not exposed via the Discogs API), but only releases and masters.
Fantastic- that clears things up nicely. I wrongly assumed it pulled from the track composition rather than the album release. Shame that the compositions aren't exposed in the API- they often provide better style tags than the album overall.
Thanks for helping with this issue- I can figure the rest out!
You're welcome. I agree, exposed compositions would be helpful.
Post a Comment