randomm3u is a simple program to randomize Winamp style .m3u playlists.

It goes to extreme lengths to ensure the randomization is truly random.


Leech the tar ball here. (9 kb)


This is only provided in source code form now. My apologies to those on windows. Linux users should be able to compile easily enough.

First, you need to create a playlist. This can be done with WinAmp or any other .mp3 player which creates a .m3u list. While WinAmp has a shuffle option, that option is woefully inadequate to produce a good random choice. The biggest problem is that they do selection with replacement. While it is unlikely to pick the same song twice in a row, it is possible.

If you want to listen to each song in your playlist exactly once, but in a random order, there seems to be no default option. Fortunately, you can play a playlist straight through. The solution is to thus randomize your playlist!

After creating a list of all your songs, you run:

randomm3u mybiglist.m3u myrandomlist.m3u www.random.org email@foo.com
(If you don't have internet access, omit www.random.org and the email address for a slightly less random version)

Then you set WinAmp to play from myrandomlist.m3u. When you have completed playing through your list, merely repeat this process to randomize the list once again. (Obviously this works best if your list is long enough that re-randomizing is a rare event)


Another updated version to again match the new guidelines for automated programs on www.random.org.

See: http://www.random.org/clients/http for details.

An updated version which attempts to follow the guidelines for automated programs on www.random.org. The major changes are to include a User-Agent field. It is requested that automated programs provide a contact address in case they go crazy.

See: http://www.random.org/guidelines.html for details.

The other change is to query the checkbuf page to back off if the buffer ever falls below 20%.

The original release of randomm3u.

File List

The file you are reading now.
The C++ source for this program.
The program you should run if you are on Windows.

Note that you may be missing the latest Windows runtime dlls. If you get an error about msvcr*.dll being missing, this is the cause.

The program you should run if you are on Linux.

Note that the executable bit may or may not be set. You can set it with:

chmod +x randomm3u