Randomness?

Need help with MPD?
Post Reply
kevinlech
Posts: 2
Joined: October 6th, 2020, 7:31 am

Randomness?

Post by kevinlech »

I was hoping someone could tell me if the random playback feature of MPD is truly random. Is there some way to introduce or increase the randomness? I seem to hear many of the same songs out of a large collection and I'm wondering if MPD has poor randomness or if it is just chance.

I could—but haven't—pulled my logs to count the occurrences of songs to see if there really is bias or if it is random. The problem with this approach, of course, is that it will include all of the things played on random as well as those that I've asked it to play. Obviously, this will cause problems with the count and those outliers would need to be removed ...unless I could somehow extract just the songs played on random.
max
Forum team
Posts: 1139
Joined: January 15th, 2013, 3:43 pm

Re: Randomness?

Post by max »

It's not truly random, it is pseudo-random, like almost all computer programs.
MPD uses a Mersenne-Twister pseudo-random number generator, seeded from the kernel's random pool.
This is pretty good, better than what most programs use (most programs use the standard C PRNG, which is rather bad), and certainly good enough for random playback.

If you have numbers demonstrating that there are problems with randomness, post it in a bug report.
Post Reply