July 11, 2011, 08:28:19 Last Edit: July 11, 2011, 08:37:32 by ochosi
ok, i managed to push the code for using the "similar-artists autofill" queuemode before the weekend but since the forums were down then and i was away, here comes the kinda late call for testing.

this is how the current implementation works:
* it pulls a list of similar artists from lastfm's database (no lastfm login/account needed for that)
* it respects the "similar artists"-settings of the artistinfo plugin (limited results, limit to similarity above n%) and it always only uses locally available artists
* this means that you can check the list of similar artists that your queue will be composed of in the "similar"-tab of the artistinfo plugin (with filter set to show local library results only)
* the queue will also contain songs from the "master"-artist him/herself, meaning: if you want to play artists similar to bob dylan you'll also find bob dylan himself in the queue (this is partly due to the fact that with some artists you won't get *many* useful results and therefor a very shortlisted queue)

to test the current implementation you have to check out the "testing"-branch of my github-repo (https://github.com/shimmerproject/gmusicbrowser).
here's how to do it with git (meaning: you gotta have git installed):
1) git clone git://github.com/shimmerproject/gmusicbrowser.git (this will clone the whole git tree into your working directory)
2) git checkout testing (this will switch to the testing branch)
3) perl gmusicbrowser.pl (possibly you need to switch directories first for that into the "gmusicbrowser"-folder; also: you should close all running instances of gmusicbrowser first)
4) happy testing!

so that's it.

what results am i interested in?
the code basically works and i know that already, so what i'm interested in is whether this works in a real-life situation where you'd like to listen to a certain kind of music and then use the queue-mode for that. obviously much depends on 1) lastfm's database and 2) your similarity settings, but i'd be very eager to know what works (best) for you. (maybe i can even set better default values then.)

disclaimer: obviously i cannot promise anything, so if this breaks your local library you might have to use a backup (in ~/.config/gmusicbrowser/gmbrc.bak.$date) to restore it.

#1 July 11, 2011, 09:28:47 Last Edit: July 11, 2011, 09:34:19 by mgrubert
It works, but I need to go down in similar artist percent (30% or less) and down in autofill number (3, to often change the master song) to randomize well .

With Thom Yorke in master song, I only have Radiohead in my local library, and with Radiohead, only Thom Yorke :( but the problem came from lastfm similar artist.
With Bon Iver in master song, it rocks.

Maybe it could be great to be able to not link the autofill number and the master song dependency. For instance : autofill with 10 songs but use the last (n) song added for master(s) song(s) each time ?

There are artists who seems to be "hole" or "bi-hole" : when you fall on those artists, it will be hard to change.
For instance, at home, Thom Yorke and Radiohead, but James Blake and Nicolas Jaar are close to a bi-hole.
On Lastfm, Radiohead is close to Thom Yorke, and, far away (less than 20%), Sigur Ros, Portishead and Blur

May be it would be better to give (local or lastfm) genre more importance (or to give user the ability to decide of the ponderation of each parameter) ?

QuoteMaybe it could be great to be able to not link the autofill number and the master song dependency. For instance : autofill with 10 songs but use the last (n) song added for master(s) song(s) each time ?

I've been thinking about an "infinite" playmode that is mostly an answer to short queues. This is something I'm keeping in mind for later, but I'm not entirely sure how to do it. In general changing the master-artist in cases where there's a short queue could either rely on user-feedback/input or gmb could switch to a new master-artist (or gmb could simply stop playback after the "complete" queue has been played once).
These different approaches imply different user-interfaces and for starters I'd prefer to keep it lean.

QuoteThere are artists who seems to be "hole" or "bi-hole" : when you fall on those artists, it will be hard to change.
For instance, at home, Thom Yorke and Radiohead, but James Blake and Nicolas Jaar are close to a bi-hole.
On Lastfm, Radiohead is close to Thom Yorke, and, far away (less than 20%), Sigur Ros, Portishead and Blur
I'm not entirely sure I understand what you mean with "bi-hole" and "hole", but if I understand "bi-hole" correctly you mean that only the two artists connected by the "bi-hole" will be played. That's one restriction of lastfm's similarity, I guess the only way to work around that is to lower the similarity level (you can test it with the similar-tab in the artistinfo plugin), however the percentage of similarity is not connected to the probability with which these songs will be drawn.

QuoteMay be it would be better to give (local or lastfm) genre more importance (or to give user the ability to decide of the ponderation of each parameter) ?
Not sure, maybe you can apply an additional local filter on genre and lower the similarity-limit? Haven't tried myself but it's possible that they are combinable.

Stuff like more lastfm-querying to extend the similarity-parameters is definitely an option, but for later.

#4 July 11, 2011, 12:20:46 Last Edit: July 11, 2011, 12:35:22 by mgrubert
Yes : a "hole" is an artist not connected to any (local) other artist by lastfm similarity (if you fall in the hole, you can't escape) ; a "bi-hole" is, in my mind, when only two artists are connected (if you fall in one of them, you only switch between those two artists).

I put the similarity-limit to 20%, but it's not less enough.

In my local library I've got a lot of artists with the same (local or lastfm) Radiohead genre, but they never appear. It seems genre doesn't affect the similarity drop (I mean : may be genre affect the choice in the similarity drop, but the drop is always taken in the similarity artist but it could be taken in the similarity genre).

QuoteYes : a "hole" is an artist not connected to any (local) other artist by lastfm similarity (if you fall in the hole, you can't escape) ; a "bi-hole" is, in my mind, when only two artists are connected (if you fall in one of them, you only switch between those two artists).
ok, makes sense. we can call it that from now on :)

Quote
I put the similarity-limit to 20%, but it's not less enough.
i tested the queuemode using 5% as limit, but i guess it could be raised a bit.

Quote
In my local library I've got a lot of artists with the same (local or lastfm) Radiohead genre, but they never appear. It seems genre doesn't affect the similarity drop (I mean : may be genre affect the choice in the similarity drop, but the drop is always taken in the similarity artist but it could be taken in the similarity genre).
hm, i think we should clarify what we're talking about when referring to genres in lastfm. as far as i can see there's only tags, which are very messy (not even sure they would be usable for creating "similar"-playlists).

with genre-stuff i mostly referred to local genre-settings.

Yes, local genre = tag in lastfm.
Lastfm gives the five(+) most popular tags for each artist (in artist page, for instance : http://www.lastfm.fr/music/Alexi+Murdoch) and gives too, for each tag, the ten(+) popular artists for each tag (http://www.lastfm.fr/tag/singer-songwriter) and related tags (same url).
Is it usable ?

#7 July 11, 2011, 20:12:47 Last Edit: July 11, 2011, 21:16:13 by mgrubert
Quote from: ochosi on July 11, 2011, 14:10:41
QuoteYes : a "hole" is an artist not connected to any (local) other artist by lastfm similarity (if you fall in the hole, you can't escape) ; a "bi-hole" is, in my mind, when only two artists are connected (if you fall in one of them, you only switch between those two artists).
ok, makes sense. we can call it that from now on :)
Cool. Strange attractor could be use too :)

I notice the hole are very important because when a hole appears in the list, all the next song will be hole'songs.
I try similar artist all this afternon the plugin (and it's running actually again) with autofill at 3 and Big K.R.I.T. appears in the list (a hole in my local library). And now, I've always got a Big K.R.I.T.'song dropped  (2 songs and 1 hole song). I hope another hole won't appear in the 2 other songs !

I think when a hole appear, the plugin must find a way to escape !

Edit : Another hole appears : EMA. Now in my 3-autofill songs, I've got a Big K.R.I.T and a EMA song. The third is still ok (actualy : Sonic Youth).

Quote
I think when a hole appear, the plugin must find a way to escape !

odd, that sounds a bit like the queue can "fall into a hole" while playing. but since the master artist is never changed while the queue is playing i'm not sure how this can happen for you.

if you mean that with some artists and settings there's a "hole" or even a "bi-hole" then yes, this obviously can happen. the question is whether the plugin should automatically e.g. decrease the similarity-level until there are more artists in the queue?
i'm really not sure what the appropriate course of action would be.

maybe one thing that would help is to make a few of the settings more easily accessible, so people don't have to navigate through the settings menu to e.g. change the similarity-limit. (i was actually thinking about implementing a good way to get to plugin settings directly from within the plugin-widget for a while now, still not sure what would be best.)

one more note: i'm not entirely sure how to solve this issue (maybe i even can't) but e.g. "Kings of Convenience" and "Kings Of Convenience" are seemingly not matched when they should similar to something else.
in the above example "the whitest boy alive" shows up as similar artist of the "kings of convenience", but the "kings of convenience" don't show up for the "whitest boy alive". in this example it's simple upper/lowercasing that creates the problem and i guess i can work around that, not sure about more difficult matching problems (that i'm sure will appear, e.g. "Surname, Firstname" vs. "Firstname Surname").

Quote from: ochosi on July 12, 2011, 09:54:15
Quote
I think when a hole appear, the plugin must find a way to escape !

odd, that sounds a bit like the queue can "fall into a hole" while playing. but since the master artist is never changed while the queue is playing i'm not sure how this can happen for you.

I test the plugin with autofill number = 3. I'm not sure, but I guess the plugin do that : I've got a song playing (master) and 3 songs in the queue added by the plugin ; when the (master) song ends and the first song in the queue begin playing, I've got now only 2 songs in the queue, so the new song playing became the new master song for add a third song in queue. Do I understand well ? In this case, a hole could appear in the queue : an artist A can have the hole in his similar artist, but it's not reflexive (could be 50% of lastfm users listening A listening B too, but only 20% of lastfm users listening B, listening A too) so the hole could not have artist A in his similar artist.

Quotethe question is whether the plugin should automatically e.g. decrease the similarity-level until there are more artists in the queue?
i'm really not sure what the appropriate course of action would be.
For the hole (let down the bi-hole) it could be : if only one artist in local similar artist, then check the more frequent lastfm tag for this artist and choose song in the top artists ? For instance, Big K.R.I.T is a local hole here => the more frequent lastfm tag for Big K.R.I.T is Hip-hop => top artists for Hip-hop (http://www.last.fm/tag/hip-hop?setlang=en) are Kanye West, Beastie Boys, Eminem, OutKast, Jay-Z, A Tribe call quest, Black Eyes Peas, The Roots => I've got Kanye West, OutKast, Jay-Z, A Tribe call quest, Black Eyes Peas and The Roots in my local library !

Quote(i was actually thinking about implementing a good way to get to plugin settings directly from within the plugin-widget for a while now, still not sure what would be best.)

It sounds great.


Quote from: ochosi on July 12, 2011, 10:06:39
one more note: i'm not entirely sure how to solve this issue (maybe i even can't) but e.g. "Kings of Convenience" and "Kings Of Convenience" are seemingly not matched when they should similar to something else.
in the above example "the whitest boy alive" shows up as similar artist of the "kings of convenience", but the "kings of convenience" don't show up for the "whitest boy alive". in this example it's simple upper/lowercasing that creates the problem and i guess i can work around that, not sure about more difficult matching problems (that i'm sure will appear, e.g. "Surname, Firstname" vs. "Firstname Surname").

Same problem here : Angus And Julia Stone has Kings Of Convenience in similar artists, but Kings Of Convenience only has Angus & Julia Stone in similar artist (doesn't match with my local name).
Not solvable IMHO.

Another plugin project could be "change all local name and genre with the lastfm name and five main lastfm tags" :)

Quote
I test the plugin with autofill number = 3. I'm not sure, but I guess the plugin do that : I've got a song playing (master) and 3 songs in the queue added by the plugin ; when the (master) song ends and the first song in the queue begin playing, I've got now only 2 songs in the queue, so the new song playing became the new master song for add a third song in queue. Do I understand well ? In this case, a hole could appear in the queue : an artist A can have the hole in his similar artist, but it's not reflexive (could be 50% of lastfm users listening A listening B too, but only 20% of lastfm users listening B, listening A too) so the hole could not have artist A in his similar artist.
k, i just started investigating this. it seems that the master artist is really affected by the queue. will let you know as soon as this is resolved.

QuoteFor the hole (let down the bi-hole) it could be : if only one artist in local similar artist, then check the more frequent lastfm tag for this artist and choose song in the top artists ? For instance, Big K.R.I.T is a local hole here => the more frequent lastfm tag for Big K.R.I.T is Hip-hop => top artists for Hip-hop (http://www.last.fm/tag/hip-hop?setlang=en) are Kanye West, Beastie Boys, Eminem, OutKast, Jay-Z, A Tribe call quest, Black Eyes Peas, The Roots => I've got Kanye West, OutKast, Jay-Z, A Tribe call quest, Black Eyes Peas and The Roots in my local library !
not sure about it, but maybe. alternatively there could be a "similar-tag" autofill-mode for the queue, maybe that would even work better...

Quote
Same problem here : Angus And Julia Stone has Kings Of Convenience in similar artists, but Kings Of Convenience only has Angus & Julia Stone in similar artist (doesn't match with my local name).
Not solvable IMHO.

i think i'll display a warning in the artist biography's header if the artist-name on last.fm differs from the local artist name.

Note 1 : actually the plugin works very well.
My autofill number is very small and I let similary-artist-queue working during 3 or 4 hours before notice the first hole, and 5 or 6 hours before notice the second hole.
With autofill = 10, I guess holes will passed unnoticed (1 hole / 10 songs in queue).

Note 2 : changing the master artist after each song in autofill mode is, IMHO, the best ; there are nothing to solve for me : I WANT that !

Note 3 : A similar-tag would be great additionnally

Quote
i think i'll display a warning in the artist biography's header if the artist-name on last.fm differs from the local artist name.
just added a small warning notice in the testing-branch. feel free to give it a spin (just use git pull if you're already using/testing it via git).


re: Note 1: yeah, i guess increasing the queue-limit in autofill helps greatly with this. good to hear it works for you!

re: Note 2: ok :) well it wasn't planned this way, but if it works ok then i guess i don't have to scratch my head too much about changing this.

re: Note 3: right, it sounds very do-able, just have to dig into the last.fm api a bit more and maybe invest yet another night... (not sure this will happen before next week.)


all in all i'll leave this in the testing-branch for maybe the rest of the week and if i can get more (positive) feedback until then i'll merge it into master and update the ppa with it.