

Why isn't iTunes shuffle random? - benihana
http://apple.stackexchange.com/questions/23194/why-isnt-itunes-shuffle-random

======
user49598
I think this is one of those problems where smart people think too hard. It
has nothing to do with non engineers misunderstanding randomness or the human
mind intrinsically superimposing structure. All it has to do with is being an
algorithmic dj.

Users don't want a random playlist. They want their songs shuffled, and they
want them shuffled in a way that keeps songs from the same album distributed
far apart. No one presses the shuffle button to get satisfaction out of pure
randomness. They press the button because they want to listen to music. If
think your users are dumb because they don't understand randomness then you
don't understand the job that shuffle is supposed to do.

~~~
kstenerud
This is something any game programmer can tell you. Pure randomness in a game
kills the fun. You have to shape the randomness to match human expectation.

~~~
pmelendez
That depends on the game and the feature of the game that requires the
randomness though. True... pure randomness over spawning points for enemies in
an action rpg game, might kill the experience. But if I am playing poker.. I
do expect something close to pure randomness when you are dealing my cards.

~~~
klodolph
I think people are confusing the term "true random". It's still truly random,
but it won't have a uniform distribution over all possible values. For
example, a common trick in FPS games is to pick a random spawn point, but
exclude spawn points that are too close to other players. Still truly random.

Another trick in RPGs is to increase or decrease the odds of a successful hit
according to recent hits and misses, bringing the short-term average much
closer to the expected value. It's still "true random", but uses correlation
between attacks to create an underdispersed distribution overall. (Basically,
you want to make the variance lower to make people happy.)

~~~
zeroonetwothree
"Truly random" is usually contrasted with "pseudorandom". In that sense almost
all games are not "truly random". But you are right in that "truly random"
also doesn't mean "uniform".

------
jesseendahl
I also recall Steve Jobs explaining in a keynote once that they had made the
shuffle feature less random in response to user feedback about not wanting to
hear the same song twice in a listening period.

Aha... just found what I was thinking of. Quote from article:

As humans, when we come across random clusters we naturally superimpose a
pattern. We instinctively project an order on the chaos. It's part of our
psychological make-up. For example, when the iPod first came out and people
started to use the shuffle feature, which plays songs in a random order, many
people complained that it didn't work. They said that too often songs from the
same album, or the same artist, came up one after another. Yet that's what
randomness does - it creates counter-intuitively dense clusters.

In response to complaints from users, Apple CEO Steve Jobs changed the
programming behind the feature: 'We're making it (the shuffle) less random to
make it feel more random.' In other words, each new song now has to be
significantly different from what came before, so as to conform to our
expectation of randomness. Which isn't really random at all.

Read more:
[http://www.dailymail.co.uk/home/moslive/article-1334712/Huma...](http://www.dailymail.co.uk/home/moslive/article-1334712/Humans-
concept-randomness-hard-understand.html#ixzz21pzqiW5O)

~~~
danudey
>In other words, each new song now has to be significantly different from what
came before, so as to conform to our expectation of randomness. Which isn't
really random at all.

That's the trouble with randomness.
<http://dilbert.com/strips/comic/2001-10-25/>

~~~
jerf
I like to say "Random is blotchy". If we mean "uniformly randomly chosen with
fully independent choices", smoothness is proof that it's not that sort of
random.

This comes up surprisingly often. For instance, the mere presence of clusters
of some non-communicable disease or something prove diddly. It must be shown
that the clusters are unexpectedly large, not merely that they exist. Of
course they exist. That's the default presumption.

------
joshuahedlund
I solved this problem by creating a smart playlist that only includes songs I
haven't heard in X days. I actually went further and made it include 5-star
songs I haven't played in X days, 4-star in X weeks, and 3-star in X months. I
hear the songs I like the most, but the constantly updated list prevents the
"random" shuffle algorithm from picking the same songs too often.

------
powrtoch
The top answer is good, but it doesn't explain why iTunes couldn't maintain
the seed while skipping forward and back, but reshuffle whenever a new song is
selected, or whenever iTunes is restarted, or whenever you switch to a
playlist and back, or all the other times you wouldn't expect it to maintain
the sort order. So this still seems like something that Apple could (and
should) really improve on without breaking important functionality.

~~~
abruzzi
That approach could have some random unintended consequences. I shuffle my
playlist and listen to a few tracks. One comes on that I don't like or doesn't
match my mood, so I peek at the playlist to find on that does match my mood
and double click it to start it playing. Unbeknownst to me, iTunes triggers a
reshuffle when I do that, and the very next track to play is the one I was
trying to get away from.

The better solution (at least from my perspective) is to not pretend that
shuffle is a setting, but an action. Simply have a button that says something
like "Shuffle this Playlist" or more explicitly "Re-Shuffle this Playlist".
Play, stop, forward, back all would work normally within the existing order
(straight or shuffled), and if you wanted a new order, you click the "Re-
Shuffle" button.

~~~
pavel_lishin
> Unbeknownst to me, iTunes triggers a reshuffle when I do that, and the very
> next track to play is the one I was trying to get away from.

What are the odds of this happening?

~~~
ertdfgcb
Pretty low if I'm listening to all my music at the same time, but what if I
have a playlist of 10 songs?

~~~
Mordio
> Pretty low if I'm listening to all my music at the same time, but what if I
> have a playlist of 10 songs?

You wouldn't listen to a playlist of 10 songs when there are many of them in
it you are not in the mood for?

~~~
to3m
Well, you only need one for it to be annoying!

Just about every album I have has one song that I will routinely skip over,
because I don't like it much.

~~~
ertdfgcb
Yeah, sometimes I like to just toss a album in a playlist and listen to it,
and I always seem to end up skipping at least one song

------
dllthomas
It sounds like it's a naming issue. It's not "shuffle mode" - there's a
shuffle action.

~~~
kennon
If that's the case, then there's also a bit of a UI issue. The current shuffle
button is a toggle, not a "click once each time you want to shuffle" button.

~~~
farnsworth
Yes, but you still need to be able to "unshuffle", so they kept it as a
toggle. not the most natural ui, but it works.

~~~
dllthomas
"unshuffle" is a sort action

~~~
farnsworth
For a playlist, it's "sort by the original arbitrary order that the user put
it in" so you can't rely on the usual sort methods - e.g. clicking the column
header.

~~~
dllthomas
Right, but it's still an action - "put it in some specific order"

------
mrspandex
I really like the way Winamp handles shuffle. It takes the current playlist
(whatever is selected to play), then shuffles it in memory for stable play
order. If you select a new song manually, it will play that song, then resume
the old play order.

~~~
chimeracoder
I use ncmpcpp (a client for mpd) and it does the same thing. I've never had
any issues with its shuffling; it just works exactly as I would expect it to
for everything.

~~~
tsahyt
On a sidenote, mpd + ncmpcpp is a killer combination for playing and managing
music. I can only recommend that to anybody geeky enough to use a CLI music
player :)

------
delinka
This wasn't the question I thought it was. It's actually "why don't things get
reshuffled when I expect?"

The answer to the stated question is: because randomness clumps and plays too
many songs from the same album/artist/wtfe and bugs people. See also
<http://news.ycombinator.com/item?id=4301922>

------
egb
I got tired of hearing the same songs over and over during my train rides, so
I wrote an app that plays your songs with no repeats ever until you've heard
them all.

[http://itunes.apple.com/app/true-shuffle-
pro/id355913111?mt=...](http://itunes.apple.com/app/true-shuffle-
pro/id355913111?mt=8) , if you're interested.

I priced it high on the theory that people with lots of music have already put
hundreds or thousands of dollars into their music collections and wouldn't
mind spending a little to enjoy all their songs in a useful way. I actually
tried a free version at one point and it sold the same number of copies as the
$4.99 version, so I ditched it and just have the paid version.

EDIT - Don't want to feel spammy here, and wasn't going to include a link to
my app, but for those who do want a "listen to all my songs with no repeats"
solution, True Shuffle does the job. Hit me up for a promo code if you need
one, eh.

~~~
xshoppyx
iTunes will play all of your songs without repeats until you have heard them
all as-is. A user would simply go to their music collection, select the
shuffle action, and then begin playing a song. No song will be repeated until
all of them have been played, which you should have been able to take away if
you read the OP or the comment thread. As for the fact that your app is $5, I
will refrain from saying anything besides do not spam the link to it on HN
please.

------
rprospero
I remember when the iPod first came out and was truly random. People would
notice that song X came up twice before having played song Y and conclude that
the iPod wasn't truly random. There was a big thing on Slashdot about how the
record labels were paying off Apple to weight certain songs more heavily in
the shuffle for their own nefarious purposes.

Then again, my memory isn't what it used to be, so maybe the Slashdot crowd
was right about that one and I just forgot.

------
igorgue
I remember on the Banshee mailing list a while ago (with fear to be corrected
here right now) a discussion about how randomness should work. They
implemented some awesome random options though: Random by album and random by
artist. So you can play different albums or different artists all the time.

But a really random playlist, really sucks. You get incredibly random stuff,
e.g.: the same artist 5 times in a row or sometimes, the very same song.

------
msg
I observed this with Google Music too. Nirvana is underrepresented in my music
collection (1-2% tops) but I seem to hear multiple Nirvana songs every time I
log in and shuffle all (4-6 hour period). I have wondered if Google Music is
picking music that is related to previously heard music.

But I have no way to check without looking at the source.

Until Google Music gets smart playlists, I have no recourse I guess.

------
nicholassmith
One of the more interesting things I've heard about iTunes/iPod shuffling is
the phrase 'it knows me so well', obviously every shuffle isn't a win, but I'm
guessing it's not just seeding it pseudo-randomly but also applying some
specific constraints on the playlist.

I don't realllly like completely random shuffles as jazz into techno isn't the
smoothest transition, but I've never really seen that with iTunes.

------
Steko
Not mentioned but I think the randomness is also not equally weighted, 5 star
songs will show up way more then lower rated songs. A few years back someone
gathered a large dataset of shuffles and plays with songs clipped to a second
or less.

~~~
jopt
I find that hard to believe. The songs are actually "shuffled," in the same
sense as a deck of cards is. One a song is "drawn" from the shuffled deck, it
is not put back until the deck is exhausted and shuffled again. So in any
shuffle, each song must show up exactly once.

There's a setting in iTunes DJ, however, to "play higher rated songs more
often."

~~~
Steko
Yep thanks, I was confusing features there.

This appears to be the article I was remembering (caveat: it's from way back
in 2005):

[http://www.omninerd.com/articles/How_Much_Does_iTunes_Like_M...](http://www.omninerd.com/articles/How_Much_Does_iTunes_Like_My_Five_Star_Songs)

------
cowpewter
Also, back when iPods had platter harddrives, if it predetermines the whole
shuffle order in advance, the iPod can load the few next songs into memory and
not have to spin the harddrive up as often. Saved a _lot_ of battery.

------
yason
Who expects shuffling to be _random sampling_ and not shuffling?

All shuffle modes I've ever encountered have shuffled the playlist or songs on
a compact disc and then played them in the once-randomized order.

------
stevewillows
I had a similar issue with Foobar until I realized that 'random' meant 'won't
play song twice in a row' while 'shuffle' was more of a 'won't play song again
until everything else is played'.

------
pavel_lishin
The bigger problem is that if I select a single album, tell it to shuffle, and
click play, it hardly EVER plays the entire album. I've had it play two songs
and stop.

------
wangweij
If the major reason for this behavior is so that you can press back to play
the previous song, it can simply remember a short period of history.

------
Evbn
Note that "shuffle" isn't "random". A mathematically "perfect shuffle" of a
deck of cards is not random at all, but still provides a pleasing
distribution.

------
dsirijus
Probably the same reason iPhone camera output is filtered (or any other
technical term that ends up with photos looking better than they really are).

I had my doubts WinAMPs shuffle was acting on some heuristics, though I never
bothered to check.

