Mike Anderson Wrote: 
> Does one row correspond to one song?  And do you know if it samples with
> replacement? (I would assume the answer to the latter is "yes", because
> I *think* I've seen the same song twice in a randomly generated list
> before.)
You're talking about the Random Mix plugin, correct?  Given the way the
Random Mix plugin operates - by placing N items into the playlist, then
when on has played, selecting another, I wouldn't be surprised if it
does a very simple random selection "with replacement".  The plugin
author would have to answer this question.

I suppose a better method would be to do a random ordering of all
tracks that meet the selection criteria, hold that list in memory, and
feed them one-by-one into the playlist.  But that's a very memory
intensive way of doing it when you have a large database.

A less memory-intensive method, a random select _without_ replacement,
would be to keep a list of tracks that have already been selected and
exclude them from the random query for the next track.  In SQL, this is
easily done with a NOT IN ({set of track_id}) in the WHERE clause,
although this gets pretty expensive when that set grows large.


-- 
JJZolx

Jim
------------------------------------------------------------------------
JJZolx's Profile: http://forums.slimdevices.com/member.php?userid=10
View this thread: http://forums.slimdevices.com/showthread.php?t=19696

_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to