Dr. David Alan Gilbert schrieb: > * Alexander Senger ([EMAIL PROTECTED]) wrote: >> In the course I noted, that the "history" of a song isn't updated before the >> next song is played, >> but after the next but one (in the SVN-checkout of rhythmbox 0.11.6). Let's >> give me an example: song >> A is played and was never played before (rhythmdb_entry_get_ulong (entry, >> RHYTHMDB_PROP_LAST_PLAYED) >> returns 0). When the function "rb_random_by_age_and_rating_get_entry_weight" >> is called in the >> process to select the next song, the query "rhythmdb_entry_get_ulong (entry, >> RHYTHMDB_PROP_LAST_PLAYED)" for song A returns 0 again! Only after the next >> song you get the correct >> result. A reason might be, that the next (random) song is choosen before the >> database is updated, >> but I never checked for this. >> >> This behaviour makes it rather pointless to try to avoid a song being played >> twice in a row in >> random play. I always wanted to improve on that but couldn't find the time >> to learn the principles >> of bookkeeping in rhythmbox. Maybe someone could give a hint? >> > > Look back on the list a few weeks; I remember there was someone who was > discussing this > or had a patch; they were considering doing it at some point into the song > (e.g. 2/3rds of the > way). > (Having said that, last song repeats seem to be very rare, if it's happening > as you say > why would that be?)
Actually songs repeat far too often. I checked this (that's why I did all graph stuff) with the result that the probability that a song is played twice in a row is almost the same as that it is repeated with three or thirty songs in between. What you get with the "random_by_age_and_rating"-method as implemented in 0.11.6 is an evenly distributed "repeatedness" almost as if there would be no weighting at all. The reason for this is that the logarithmic weight function used so far grows fast during the first 500 seconds or so (which is roughly the length of a normal pop song) and then doesn't alter very much in the next 5000 seconds, which could be the total length of a short playlist, let's say containing only one album, together with "RHYTHMDB_PROP_LAST_PLAYED" not being updated soon enough. >> Anyway: I think the patch of Alan is a great idea. I would like to have >> something like this in >> rhythmbox. >> @ Alan: I have a little setup here for testing the "randomness" of songs >> being played which gives >> nice little graphs as output (sweet ;) ). If you like I could run it with >> your patch applied. Please >> give me a note if this is of any help. > > Oh yes, graphs are always good - of course with the biases in there it > shouldn't > actually be truly random - it should be nicely skewed. This skew is what I'm waiting for. Hopefully your patch will do it. I'm looking forward to it. Alex _______________________________________________ rhythmbox-devel mailing list [email protected] http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
