Weighting And Logic Used For Radio And Genre Featuers

Artist radio, genre radio & related artists. A Subsonic server for music nerds.

Moderator: moderators

Weighting And Logic Used For Radio And Genre Featuers

Postby precipitous » Mon Feb 04, 2013 11:58 pm

Hakko: I am running version 7.21b and am very happy with it. With each version it just gets better and better. Thanks!!!!

I do have a question about the weighting and logic used for the radio and genre features, though: I have thousands of albums tagged with the genres Dark Ambient, Ambient, Experimental and Post-Punk. Yet if I select to play a MusicCabinet radio for one, or any combination of those genres most of the time a large number of the pieces that play are the same each time. Sometimes the tracks will be different ones, but from the same set of artists, and almost always from only one album by the artist. For a lot of the bands I own 10 or more of their albums, but all of the tracks that get selected are always from the same one album. Also, there a hundreds of artists within those genres who are never selected at all. I do not have this problem when playing random tracks from my collection as a whole. This makes me wonder if specific artists and albums/tracks are given a greater weight than others... If so, is there any way to equalize the weighting so one can get a truly random selection when playing music from specific genres only?

Thanks in advance for you help and insights.
User avatar
precipitous
 
Posts: 91
Joined: Fri Aug 14, 2009 6:43 pm
Location: Santa Barbara CA USA

Re: Weighting And Logic Used For Radio And Genre Featuers

Postby hakko » Wed Feb 06, 2013 9:20 pm

The artist radio and the genre radio are implemented as SQL select statements. They're found here: https://github.com/hakko/musiccabinet/b ... o.java#L92

Or, maybe easier to read: https://gist.github.com/hakko/3389980

It might not be super obvious, but the strategy is to create a list of (n) songs where an individual artist appears at most (m) times. Popular tracks by an artist are favored. Relevant artists are favored. (Based on genre relevance for genre radio, and based on artist similarity for artist radio.) Tracks are favored based on how many times you've listened to them (if this is configured to be imported from last.fm).

The numbers n and m are configurable. Nothing else is configurable (but it could be).

The track ranking is currently random() * (110 - rank + (play_count/3)) where rank is global popularity (1-50) from last.fm and play_count is the number of times you've listened to a track. The artist ranking is currently random() * weight * weight where weight is genre relevancy resp artist similarity, for genre radio resp artist radio.
Higher means more likely to be picked.

There are some problems with this. For example are your local tracks matched against the last.fm top lists exactly (no name fuzziness), so if your tracks are misspelled, they will run a much lower chance of being picked in the radio system.

If you have a lot of artists with genre weight 100, an artist with genre weight 50 will run a very low chance of being picked.

A truly random selection can be achieved by modifying the code above. Or maybe through the advanced search? Or by configuring the genre radio playlist to be much larger (to include more artists into it)? You might also want to turn off the feature of having tracks that you've listened to a lot favored to make it more random.

But in general, the best way to make it fit your needs exactly is to mess with the code and change the algorithm for picking tracks. I just wrote something that I thought would fit me but there's no absolute truth here, everyone will have different ideas on how it should work.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Weighting And Logic Used For Radio And Genre Featuers

Postby hakko » Wed Feb 06, 2013 9:28 pm

There is actually a much more random way of generating genre playlists, but it's only available through apps. When you specify random songs and a genre, there's no weighting involved of artists/tracks. It's handled here:

https://github.com/hakko/musiccabinet/b ... .java#L544
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Weighting And Logic Used For Radio And Genre Featuers

Postby precipitous » Wed Feb 06, 2013 9:33 pm

@hakko: Thank you for this incredibly informative reply! It all makes a lot of sense and gives me the information necessary to both understand why certain tracks/artists/albums are almost always selected, and why others are not. I think I will try turning off the option to favor tracks I have listened to a lot, and also see where I get using the Advanced Search. If I end up editing any of the code (and come up with anything useful) I will pass it on to you...

Thank you again for all of the AMAZING work you have put into MusicCabinet. I regard it as one of the top 5 most useful applications that I could not imagine having to do without...
User avatar
precipitous
 
Posts: 91
Joined: Fri Aug 14, 2009 6:43 pm
Location: Santa Barbara CA USA

Re: Weighting And Logic Used For Radio And Genre Featuers

Postby hakko » Wed Feb 06, 2013 10:06 pm

Thanks for your feedback! It's really fun to hear that it comes in useful.
MusicCabinet developer
hakko
 
Posts: 1416
Joined: Tue Apr 17, 2012 7:05 pm
Location: Sweden

Re: Weighting And Logic Used For Radio And Genre Featuers

Postby wikke » Fri Apr 05, 2013 11:42 pm

at this late hour, I also want to chime in to say I love musiccabinet and I appreciate the many hours you have poured into this.
A year ago, I couldn't have imagined such a fantastic system existed.
I didn't like basic subsonic that much - this is the definitive version though !

I already discovered some new music which I otherwise would have missed.
The continuous updates make it worthwhile to read about the working of the program as well.. the faq is a good idea!
wikke
 
Posts: 33
Joined: Thu Oct 04, 2012 10:01 pm


Return to MusicCabinet

Who is online

Users browsing this forum: Bing [Bot] and 1 guest