Open SusannaMaria opened 7 years ago
Seems very cool! It sounds like there are a couple of ideas for the data source: either getting the similarity data from Last.fm or computing it based on AcousticBrainz features. Do you have a plan for which you'd like to tackle first?
If the main goal is to export GraphJSON (rather than running graph queries directly on the data), I'm not certain we need a full-fledged graph database abstraction like GraphLite. It might make enough sense just to record plain adjacency lists in flexible attributes on the beets database schema as-is.
For a head start interacting with the Last.fm API, I might recommend stealing setup code from the lastgenre
and lastimport
plugins.
Is it okay to use the API Key mentioned in the plugin.py for the simularity plugin?
Anyway I have created one at last.fm already, it you have concerns because I'm not a member of beets.
... by the way: is similarity as plugin name okay?
Yep, beets.plugins.LASTFM_KEY
is meant to be used by any plugin that needs it. Go right ahead.
And that name sounds great to me!
beet similarity artist:Tool, artist:Mars Volta
I will create a pull request and start working on seriously, I have made a very basic implementation with lastfm so far.
It seems that last.fm is not reliable to search beets artist with mbid tag. :-( Found to much of last.fm artist without mbid tags. will try to search by name and query the user if more than one is found.
Ah yes, that’s happened to me before too—the Last.fm API purports to index by artist MBID, but very few, if any, artists seem to actually have that information included.
For something like this, there’s a chance a quiet mode (with no prompts; just guessing the first match) would be useful too.
Idea
I want to write a small plugin which collects "similar artists from artist" The first source can be last.fm: http://www.last.fm/de/api/show/artist.getSimilar But I really want to go in direction of acoustic brainz and t-SNE
In the end, the data I will collect are weighted relations between artists and I'm not sure if sqlite directly s the best for doing this. But maybe with graphlite it can be interessting to stay on sqlite https://github.com/eugene-eeo/graphlite
But in the beginning to evaluate artist relation I will work with https://github.com/GraphAlchemist/GraphJSON and http://graphalchemist.github.io/Alchemy/#/examples
beets plugin -> lastfm -> export as GraphJSON file -> Import in Alchemy.js