This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Dynamic PL selecting from "Least Played"

Tags: None
(comma "," separated)
bh_doc
Karma
0
I\'m trying to work out a way to shuffle my playlist in a more sane manner. The problem with straight random selection is that I\'ll often get the case that some songs will end up with a playcount of 6 or more, while others don\'t get played at all. I\'d like to have that all songs have about the same playcount at all times, so somehow a song that hasn\'t been played in a while becomes more and more likely to be played next.

I had this same problem with Noatun, which I used to use before amaroK, and solved it by writing my own playlist plugin that assigned weights to songs based on how long ago they were played previously. That was probably overkill, but it worked.

Now I\'m trying to figure out how I might do something in amaroK that would achieve a similar result. The way I\'ve come up with is to use a dynamic playlist that gets its entries from a \"Least Played\" smart playlist, but this has a couple of problems, not least of being that it doesn\'t work.

1) I have created a \"Least Played\" smart playlist by sorting the songs by play count (ascending) and limiting the results to the top 15 (for example). The dynamic playlist seems to completely ignore this. (\"Playlist shuffle\" mode, \"Least Played\" playlist added to the dynamic PL list thing.) So each time it adds another song it does not pick it from the 15 least played songs as I would like, it just throws in any song in my collection.

2) The \"Least Played\" playlist won\'t list any songs that have not been played at all. It seems that it ignores songs that don\'t have a play count property. Which is stupid. I would expect it to assume 0 play count in that case.

So, any ideas? Am I doing something wrong, or are these missing features?

Peace,
Doc

PS. Otherwise, amaroK is awesome. :)
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS
amaroK does keep track of the like last 100 tracks when playing in random mode to prevent repeats. It is just a mathematical fact that if you do regular random, some tracks will get played several while some don\'t get played at all.

I\'m not sure about the dynamic mode. It should really strive to be a little \"more random\" in its default random mode if it isn\'t already. Have you tried it? I suppose it does just by the virtue of tracks don\'t get repeated in a current playlist at any one time. If you have a dynamic mode random playlist of like 500 (and probably much less then that), you really should have no problem.


Amarok Developer
bh_doc
Karma
0
amaroK does keep track of the like last 100 tracks when playing in random mode to prevent repeats.


I didn\'t know that.

It is just a mathematical fact that if you do regular random, some tracks will get played several while some don\'t get played at all.


While that\'s true, you can still tweak the way songs are picked to make it not so random. This can alter the statistics in such a way that it is much more likely that the number of times a song is played for a small total number of songs played is much more consistent over all songs than it would otherwise be. Damn. I hope that made sense.

I\'m not sure about the dynamic mode. It should really strive to be a little \\"more random\\" in its default random mode if it isn\'t already. Have you tried it? I suppose it does just by the virtue of tracks don\'t get repeated in a current playlist at any one time. If you have a dynamic mode random playlist of like 500 (and probably much less then that), you really should have no problem.


I\'m not sure what you\'re saying here. The aim is to try to make it so that songs are played fairly regularly, not haphazardly as is the case now.

Somewhere in-between totally random selection and simply running one-by-one through a pre-shuffled playlist would be perfect.
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS
If you have 5000 tracks and pick a random track every 5 minutes, you\'ll likely have several repeats over the day. If you have 5000 tracks and pick 500 random tracks, and then a random track that isn\'t already in that 500 every 5 minutes, its unlikely you\'ll have repeats.

So I believe coming up with a more complicated scheme isn\'t really necessary.


Amarok Developer
User avatar
sebr
Moderator
Posts
301
Karma
0
Fixed!

SVN commit 442864 by seb:

Make dynamic playlist shuffle work for smart playlists which depend on order.


M +18 -17 playlist.cpp
bh_doc
Karma
0
If you have 5000 tracks and pick a random track every 5 minutes, you\'ll likely have several repeats over the day. If you have 5000 tracks and pick 500 random tracks, and then a random track that isn\'t already in that 500 every 5 minutes, its unlikely you\'ll have repeats.


The problem isn\'t so much tracks repeating but tracks never, or almost never, being played. Some tracks, over time, will be played considerably more times than others simply because of blind random chance. The aim I have with my little scheme here is to alleviate this by only selecting from a subset of all tracks - the ones that haven\'t been played much and should be played more often.

It\'s more a long-term strategy to make sure my collection is "rotated" better. If that makes sense. Anyway...

Fixed!


Cool! So now dynamic playlists can pick tracks from a limited, sorted smart playlist?
bh_doc
Karma
0
I ended up solving my problem very effectively (better than my original idea) by making a \"25 Least Recently Played\" smart playlist, ordered by \"Last Played\" ascending, limiting to 25, and using dynamic playlist shuffle.

It was working up until 1.3.2. Now new songs are picked from the entire list without regard for the sorting and limiting criteria. Did this get function get removed in 1.3.2?
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS

Re:Dynamic PL selecting from

Fri Sep 23, 2005 10:08 am
bh_doc wrote:
I ended up solving my problem very effectively (better than my original idea) by making a "25 Least Recently Played" smart playlist, ordered by "Last Played" ascending, limiting to 25, and using dynamic playlist shuffle.

It was working up until 1.3.2. Now new songs are picked from the entire list without regard for the sorting and limiting criteria. Did this get function get removed in 1.3.2?
So it worked in 1.3.1 but not in 1.3.2? Sounds like a regression, open a bug report on bugzilla.


Amarok Developer
bh_doc
Karma
0

Re:Dynamic PL selecting from

Fri Sep 23, 2005 10:50 am
That\'s right. I\'m looking through SVN to see if I can pinpoint when and where. I\'ll file it then.
User avatar
eean
KDE Developer
Posts
1016
Karma
0
OS

Re:Dynamic PL selecting from

Fri Sep 23, 2005 1:17 pm
bh_doc wrote:
That\'s right. I\'m looking through SVN to see if I can pinpoint when and where. I\'ll file it then.
Thank you! :)


Amarok Developer
bh_doc
Karma
0

Re:Dynamic PL selecting from

Fri Sep 23, 2005 3:19 pm
Unfortunately I\'ve come to the conclusion that I have no hope in hell of finding it. Someone with a better clue of what\'s going on in that code than me will have to take a look, instead. :(

Bug filed.
bh_doc
Karma
0

Re:Dynamic PL selecting from

Sat Sep 24, 2005 7:28 am
Kickass! I got to bed and by next morning it\'s already been patched. You guys are awesome. :cheer:
User avatar
sebr
Moderator
Posts
301
Karma
0

Re:Dynamic PL selecting from

Sat Sep 24, 2005 7:36 am
No worries, I overlooked that when i did some other fixes.

Thanks for the report


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]