iTunes Shuffling
April 18, 2004 2:33 PM

Does anyone know/can anyone approximate what shuffle algorithm iTunes uses?
posted by the fire you left me to Technology (8 answers total)
Wow, never relized so many people were speculating about iTunes' shuffle algorithm after doing a bit of googling.

No one seems to know for sure, but I do notice that it tends to play songs from teh same album consecutively more often than just random chance would seem to suggest.

A good experimetn might be to play a single song over and over to drive up its play count, then leave your itunes on on random for a few days and check the distribution of the play counts after that. Then repeat after rating one song with five stars and leaveing the rest unrated.
posted by Space Coyote at 2:41 PM on April 18, 2004


i have the same thing with winamp , theres no way its properly random.
posted by sgt.serenity at 4:59 PM on April 18, 2004


Easy way to tell, with Winamp. Get an audioscrobbler account, load thirty or fourty tracks, leave it playing for a few days, then go look at the tracks-played stats.
posted by Jairus at 5:37 PM on April 18, 2004


a comment on your link - while oleg is a lot smarter than me (or anyone else ;o) he seems to be wildly overstating the problems with shuffling by sorting random keys. he assumes that all four combinations of keys are equally likely, but when the number of possible random numbers is large, then the probablility of equal keys becomes small and it's no longer the case that 3/4 of the time you get the same ordering, even when there are only two tracks (as in his example). afacit.

(and "tracks-played stats" would need to tell you something about what song followed which to help diagnose whether tracks on the same album are more likely to play together; simple total counts won't help)
posted by andrew cooke at 5:46 PM on April 18, 2004


Space Coyote, Sgt: I wrote a little mp3 jukebox for myself, with a shuffle function that I know is perfectly random. But I still find myself thinking that it is, for example, playing songs I've added recently more often than others. It's all psychological. You notice the things that stand out a lot more than the things that don't. By random chance, coincidences will happen, but if they're all that you notice, it will seem that they happen a lot more than they should.

That's not to say that iTunes isn't perfectly random, but just that if it were, you could easily be convinced otherwise.
posted by whatnotever at 5:51 PM on April 18, 2004


I have set up an iTunes "smart playlist" with only items on it that haven't been played in the last 60 days. Once you play a song, of course, it departs from this playlist and you won't hear it again for at least two months, as long as you only play that playlist. Depending on the number of tunes you have and how much you listen to music, the number of days may have to be adjusted.

I also have an AppleScript that runs every five minutes and removes duplicate artists from the playlist, so I'm guaranteed that I won't hear the same artist twice in N songs, N being the number of tracks in the playlist (50 in my case). But that's painting the lily.
posted by kindall at 6:51 PM on April 18, 2004


OT : With my Windows media player at home, if you load it the same 20 tracks it plays them in the same order every time, just with a different start point. Very strange...
posted by twine42 at 1:38 AM on April 19, 2004


Not terribly strange, given how computers generally do "random" things: they usually start from a seed, obtained from the clock or some such, and manipulate it in a standard way to get random numbers.

In junior high we used to turn on all the Apple //e's at the same time and ask for a random number between 0 and 1 -- they all gave the same answer.
posted by gleuschk at 4:14 PM on April 19, 2004


« Older Tips about tipping? (Particularly in a hair salon....   |   What's the best dictionary to use with Word for... Newer »
This thread is closed to new comments.