Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Why are modern music players so bad at playing music in random order?
127 points by winternett on July 3, 2019 | hide | past | favorite | 143 comments
On my phone I have a micro SD card with thousands of Mp3s on it yet I catch both Google Play Music and VLC player playing the same progression of music over and over when I have the random button set to on... I thought this was because it was a tactic to get me to upgrade the music players I was using, but it also happens lately on all kinds of devices I use.

YouTube, Spotify, and SoundCloud provide revolutionary services yet it seems like a lot of the time I am listening to pre-arranged and designated music playlists rather than a truly honest music stream.

In the days of the 5 disk CD changer, people truly knew what random meant. no tune was played twice until all of the tunes were played...



Here's the problem: go ahead and ask a bunch of different people what they want/expect their shuffle/random button to do and you'll get a bunch of different answers.

1. I want it to play in a truly random fashion, with replacement (same song twice in a row is possible).

2. I want it to play in a truly random fashion, without replacement (each song is removed from the list once played).

3. I want it to "seem" random (don't play too many songs by the same artist in a row).

4. I want it to be random, but predictable (same "random" ordering if I start the playlist again).

5. I want it to play my favourite songs more often than my lower-rated songs.

6. I want it to play my less-commonly played songs more often than the stuff I listen to all the time.

So: what exactly do you want when you say random?


Further complicating things, lots of people will say they want 1 or 2, but really want one of the others, because they don’t really understand what randomness looks like.

Lots of music players started out with true randomness and then dialed it back because people complained that it wasn’t very random.


Because users never wanted mathematical randomness. They wanted variety.

Not that saying "random" is wrong, but users mostly mean it in a colloquial sense, while programmers are apt to interpret it in a technical sense. But one leads to math.urandom() and the other to shuffle algorithms.


Good point...

I mainly dont want to hear a playlist that starts with the same tune every time and then progresses through the same order of tunes when I select Random.

So often, in Google Play Music selecting random will play any of of 10 pre-set playlist cues.... The tunes will be a mix of one big polaylist that just starts at various points on the master playlist. This is why I often run across the same tunes, and why they follow each other in the exact same order.

e.g.

Normal Play Cue: A-B-C-D-E-F-G

Random is selected -

Random play attenpt 1. B-A-C-D-F-G-E (Several tunes present on the micro SD card never play)

Random play attenpt 2. F-G-E-B-A-C-D (Several tunes present on the micro SD card never play)

Random play attenpt 3. B-F-G-E-A-G-E (Several tunes present on the micro SD card never play)

I prefer the "Shuffle" feature I guess if you want to look at the semantic side of this discussion, where not tune is played twice or in the same order whenever the random button is pressed, and every time I press random, the player should recall the last tune, and pick a new playable tune each time the skip button is pressed or after the prior tune comes to an end.


80% of people mean this: I don't want to hear the same song too soon after hearing it before. How soon is "too soon"? Probably anywhere from 50 to 200 songs.

Easiest solution that gets you 99% there would be to make a shuffled list, run through the whole thing, then shuffle again. The only reason why this wasn't done in the past was lack of RAM, which isn't an issue anymore.

Or if RAM really actually is an issue on your embedded device, use a Debruijn sequence.


Do you have a source for that claim?

For me, random means: "I want to hear every song in this selection exactly once, chosen randomly". Random should mean uniformly distributed and I don't care whether the same artist or album is played back-to-back. I feel like this is exactly what "shuffle" has meant for decades before some UX quack at Spotify headquarters decided they knew better.


Thats why the feature is usually called "shuffle" rather than "random". Then if you stop to think about it a bit, the expected meaning is reasonably clear.


So... what you're saying is that you don't want to hear the same song too soon after hearing it before?


No, I’m saying I want to hear every song in the list exactly once before any is repeated. Your summary is more generous than my definition.


That's shuffle, not random. Maybe randomized. With random, every song should have the same chance of being picked, which would technically allow the same song to play twice. If you'd let the player run for a decade, every song should have played about the same number of times.

But this usually leads to people perceiving the feature as not being random enough.

See Spotify for example: https://www.quora.com/Is-Spotifys-shuffle-feature-truly-rand...


Random has a lot of meanings, and you are picking a very specific one. It doesn't have to be uniformly distributed, for example, but relevant here is I don't think there's a problem describing a random shuffle as "random". It is playing a list in a random order.


So... You'd say that my summary gets you 80% of the way there?


Lack of RAM? Make an array of pointers or ints or whatever corresponding to the current order of songs, then lookup each new song as the current song ends. Maybe 1kB RAM...


Yes, lack of RAM. First mp3 player I ever worked on consisted of a PIC driving an IDE hard drive over I/O pins, and an mp3 chip over I2C, with 2k RAM for the whole shebang. If you want to support more than 256 songs, you'll need 2 bytes per index value, so 2k RAM just for the shuffle table if you have 1000 songs. Then there's the hard drive controller, the FS driver and file I/O interface, the LCD driver, the send buffer to the mp3 chip, etc, etc.


Mp3 players have had more than 2k of RAM for way longer than two decades.

The hardware restrictions of the earliest IDE HD based MP3 players really have nothing to do with any limitations on modern shuffle ability.

IPod in 2001 had 32MB of RAM. 2k RAM is not relevant to this discussion. You getting close to discussing 3 decade old technology.


It's very relevant. The early technological restrictions become the standard practice, which fail to change after the original restrictions no longer apply.

Using random number generators for shuffle mode was a stopgap measure that everyone else cargo culted because it's easier than critical thought.


> Yes, lack of RAM

So how about using a maximal linear feedback shift register of smallest size greater than the number of songs, skipping entries that are beyond the end of the list?

Either keep the polynomials[1] in a small list, or implement them as separate functions, invoking the one you need via a function pointer. Both approaches take just a wee bit of extra FLASH/ROM, and just a few bytes of RAM.

https://en.wikipedia.org/wiki/Linear-feedback_shift_register...


So a permutation? There's no need to store the whole shuffled array in RAM, a big 64-bit co-prime number is enough, you don't care about cryptographically secure numbers, so even 32 bits could work.

For example for a 1000 songs playlist, you choose n to be 2416648531, start with i = 0, you then get the following permutation: 0, 531, 62, 593, 124, 655, 186, 717, 248.


Take that comment almost verbatim, and turn it into a menu in the options/config area, and you can have my money!


I love this idea so much, I made it an issue on a the Lofi repo -- a somewhat popular Spotify player I built: https://github.com/dvx/lofi/issues/37

I'll work on it when I can get a bit of free time.


That is a really cool app. I have been using Miniplay for this. Already installed it and uninstalled Miniplay.

Edit: Oh, and it is always on top, you are my favorite open source contributor.


Even better, heh heh!


Users want more control. Take this idea apply it to what shows up on your favorite social network feed/timeline.


Also, "I want 'random' songs that are musically appealing to hear in sequence." A sort of lite DJ logic, really; not necessarily modifying the songs' entrances and exits, but more selecting keys and tempos.


From what I remember, Pandora did that really well. It's been a while since I've used it, but their classification system was really cool.


I switched from Pandora to Spotify a couple months back because my daughter wanted Spotify and they have a family plan, and I didn't want to pay for both services. I really, really miss Pandora, to the point I may pay for it separately (and I don't listen all that often), specifically because I love how their radio station type format works. If they had their "play this exact song I want" offering working before Spotify entrenched itself, I can't imagine why anyone would choose Spotify over it.

I'll probably spend a bit more time trying to get Spotify to work as I want, but in general it's resulted in me just listening to less music. I guess that's good for Spotify, since they're still getting paid (but not if it makes be question why I'm still paying them).


Yes, this is still true, and it's great. Within the songs and artists that typically play on my Pandora stations, it will play similar songs in clusters, with the exception that it won't play the exact same artist twice in close succession. This makes the playlist a lot better (in my opinion).

The only quirk I've noticed is when the same person has multiple bands... I've had it play Jack White or Les Claypool 4 times in a row, for example.


That's funny, I don't like how Pandora works on the custom stations I've tried to build. It feels too much like it is going through the set of seed artists in some repeating order, playing a batch of similar items to one seed before switching to the next batch.

I'd much rather have these sub-genres woven together with changing styles at each track boundary, as a sort of counterpoint.

If I can remember all the way back to when I used to make my own "mix tapes" transferred from vinyl records, I think I used to do this sort of interleaving. So, I think my preference existed before I ever experienced the shuffle of a 5 or 10 disc Sony CD changers, which usually changed discs on every track change and avoided any repeats until the entire set was done.

Because of my preference for shuffle, I used to burn a CD or two for use in rental cars, where I added a pseudo-random prefix to the file names. This gave me a shuffled play when the in-dash player was set to just play sequentially, so I didn't have to discover a random mode with repeats in one particular car...


I was very sad when Pandora left the NZ market. :(


It must be the same algorithm they use to propose new tracks, eg when we play “similar artists”.

“What is the best to listen after this track?” - just with a super small subset of tracks.


Or what about this:

I am indecisive about what music I want to listen to in this current moment and I want you to give me options that I will deny until I become decisive about what I want.


This is basically what want too, so I like Quod Libet's "Random Album" (and Random Artist and Random Genre) command. It simply focuses on a new album each time I press Ctrl+M, which I can play or queue up.


This was my favorite feature in winamp and itunes. It doesn't seem to exist in many music apps. I couldn't find an android app that does it, and spotify doesn't do it on any system. On desktop, It's possible to script spotify behavior, so with some work I was able to define a global keyboard shortcut to choose a random album and play it. Not perfect, but gets the job done.


I would say what people usually want is "I want my playlist shuffled in a way that feels like variety". But, I don't have any data to back that up ;)


Most music player developers assume our music collections are small I guess, and they're trying to encourage cloud storage rather than local saved files as well possibly, because it generates money by encouraging music sales, storage upgrades, and monthly subscriptions.


What I want is to have the options laid out before be so I can pick which one I want. Spotify and friends seem to go with a "fuck you, we know what you want better than you do" approach, which is one of many reasons I prefer to own my music instead of streaming it.


Smart playlists in iTunes were great for solving 5 and 6 with separate auto-updated playlists, but sadly Spotify has no interest in this problem.

I hate the trend from product managers of responding to "wow there's a lot of things people might be intending here" with "let's just pick one in the name of simplicity." Give me the hooks to let me make my own solutions for the other possibilities!


To be fair, Spotify do in fact give you the hooks: https://developer.spotify.com/documentation/web-api/

You can have a script sitting on your machine remotely controlling an internet connected player somewhere else.

e.g. here's one I wrote that makes Spotify not play the same track too often: https://github.com/sl236/spotify-deduplicator


#2 seems like it should be the default but I feel I normally get #4.


I want #2 but most players do not do this. Both Amazon Music and Google Play fail although Amazon does a better job at giving me #2. Sometimes it will give me a different random order but sometimes it gives me the same order as it did last time I asked it to shuffle the playlist. To get it to resent the random shuffle I have to manually close down Amazon Music and restart it. Then it resets the shuffle.


In the 90s this would have been solved with a single radio button option in the settings menu.

We've come so far with UI design now that we can't have that.


> 1. I want it to play in a truly random fashion, with replacement (same song twice in a row is possible).

Anyone outside of HN would interpret that as broken random. So we can throw it out.

> 2. I want it to play in a truly random fashion, without replacement (each song is removed from the list once played).

Nope, not good enough for non-specialist randomness.

> 3. I want it to "seem" random (don't play too many songs by the same artist in a row).

Bingo. It should definitely seem random. Because the string "seem random" equals "random" for someone who isn't a technical expert in randomness.

> 4. I want it to be random, but predictable (same "random" ordering if I start the playlist again).

Normies don't care about random seeds for pseudorandom number generators, so nope.

> 5. I want it to play my favourite songs more often than my lower-rated songs.

That's a bonus feature that can be implemented with a slider.

> 6. I want it to play my less-commonly played songs more often than the stuff I listen to all the time.

Same as above

> So: what exactly do you want when you say random?

One obvious definition for normy random, plus a slider with least and most favorited at the left and right, respectively.

Done.


Or if the UI allowed me to easily play music based on which folders tunes are in, it would solve most of my problems... I already have my mp3s organized by genre in folders, and updates are easier to manage that way, and then random play can match my mood better, instead of going from wu-tang to Celine Dion (I also keep wedding music in my collection just in case...)


I would expect from a random playlist function to shuffle the playlist once randomly (or using a good PRNG with long period) whenever the function is called. Option 2 sounds closest to this, but there is no need to remove anything, the player always plays the next song in the list.

It's odd to hear that this is not standard, given that it's a standard algorithm. Maybe memory limitations?


Nice written! I have nothing to complain about Spotify. I also like to think they choose the next songs based on the sound of the last ones. Eg no heavy music after a yoga relaxing soundtrack.

Maybe it is not the way i’d order my playlist, but I trust Spotify knows their stuff. There must be a lot of engineering there.

Why not trusting the musical tastes of a robot, after all?


> I have nothing to complain about Spotify.

I do. 1 and 2 aren't even options. I have playlists with 100 or so songs in it. I don't hate that I can predict what the next song will be. Smart Shuffle is fine, so long as you don't say it's random and you offer an actual shuffle button that works the way shuffle has worked since the introduction of the CD player.


the random function in itunes employs heuristics like this. specifically, it avoids multiple songs by same artist in a row.


There’s another dimension... the playback mechanism. I think that some of these solutions actually make some sort of hidden playlist to accommodate garbage Bluetooth integrations in cars.

I’ve definitely seen scenarios where I’ve heard the same random play order due to some fuckery with a car Bluetooth connection.


Excellent post. Reminds me of the old Warcraft 3 days when some players would be like, "I got Undead four times in a row, this isn't random Bli$$ard!!!1"


They should probably just revive winamp. Winamp really kicked the llama's a$$, and knew what random meant... And also knew how to have a good UI.


Don't forget that the sufflers will often try to match song outros and intros so they seamlessly cross-fade.

This could have the appearance of #4.


Can you name shufflers which actually do this?


4 basically causes the problems though. Who wants that!


I have no idea if this is possible, but it would be awesome to see Spotify implement some kind of learning algorithm that would run your playlists like a professional DJ would, lining them up in progression by tone, tempo, sound, etc. That would be amazing.


> 3. I want it to "seem" random (don't play too many songs by the same artist in a row).

That can still be random, for as long as we're not defining the variable:

    from $artists choose artist randomly
    from $artist.repertoire choose song randomly
    play $song
and then of course with the #2 variation on both variables.


You will get very weird results from that depending on your song library. If you have every song from a prolific artist, and one to two songl you like from a few other artists, you'll get a nice random distribution among artists, but not among your library. For very lopsided libraries, such as people that just started a service and maybe have added one or two full artist catalogues and a smattering of other songs they like that they thought of (which I imagine isn't all that uncommon, it's the state I commonly find myself in on a new service), it will result in a lot of repeats and ignoring a bunch of your library.


Um, no? I would argue most people would say they want 1 or 2, and the rest of those are mostly things that developers convince themselves are adequate substitutes for these things.


We made a music system for the office I worked at a few years back; all of these options came up as possible meanings of "random". We ended up with a system where people could vote on which random they wanted, and all of them got used over the course of a few months. 3 and 4 were very popular.

It also sparked a lively debate about whether people actually wanted what they said they wanted or were just being difficult.

People are weird and English is imprecise.


Steve Jobs in 2005: "You know we've gotten a lot of people that say our shuffle's not random. Well it really is random but sometimes random means you've got two songs from the same artist next to each other. Just happens randomly sometimes.

And so what we've added is smart shuffle to actually make it less random - if you want.

Even though people will think it's more random it's actually less random and what it is, in preferences, there it is right there, it says smart shuffle allows you to control how likely you are to hear multiple songs by the same artist or from the same album in a row."

https://youtu.be/lg188Ebas9E?t=719


I always got the feeling that the original iPod Shuffle would randomize your songs ONCE, and that's why people where complaining. So when you loaded up your Shuffle, the software would order the songs randomly, on a playlist, for that set of songs. The Shuffle would then reshuffle the songs, when new one where added or removed, but only then.

That theory also explained the disconnect between the complaints and Apples response. Apple would indeed be right that the music was randomized, but not continuously, as consumers expected.

It was never clear to me what the issue actually was, perhaps we really don't understand randomness.


Apple's response above was talking about iTunes, not about iPods.


If I remember correctly, the encryption performed by the Enigma machine was cracked largely because they would never repeat the same character twice in a 3 letter key. The Allies discovered this and it was a big help in their code breaking efforts.

My point being, even mathematicians might mistakenly believe that repeating a song or artist is less random. The creators of the Enigma machine were not dumb, but they believed that repeating letters would be more predictable and thus less random.


I thought the weakness was that a character was never replaced by itself? Eg. HH (for Heil Hitler) could never be replaced with HH, no matter what the seed.


Your right, I think I was wrong. They made a few similar mistakes, but what I described might be wrong.

They did not allow a digit in the key to repeat in the same position 2 days in a row, I just reread. If the key was "123" yesterday, it could not be "145" today, because the first position was unchanged.


Spotify (and I assume others) doesn't exactly serve a random playlist, but one that favours/returns more revenue back to them. So older releases, "burned out" songs and so on. Create a playlist with 10 songs, add 8 before the 90s (e.g. Cure, U2 etc.) and add some newer ones (after 2000 - e.g. Radiohead). You'll be living in the 80s for most of the time...

If you search the Spotify forums, there are a few posts on the issue with no official answer from Spotify whatsoever.


I also suspect this is the case. I also feel like it's part of the reason Spotify has aggressively wiped out easy discovery of user-curated playlists in favor of their own playlists. Just about every playlist you see when browsing around is one authored by Spotify. It used to be that you could find lost of community-made content in the Browse tab. If you want a good, user-maintained playlist now, you have to know its exact name in order to find it. There is no community behind the platform anymore, only an algorithm that maximizes margin for the company.


One way to mitigate that is to play music in alphabetical order, it's more random than "random" and you can listen to artists you wouldn't ear with the "random" order


This doesn't work too well if someone adds Nine Inch Nails' Ghosts I-IV or Kendrick Lamar's untitled unmastered to their playlist.


If it literally plays the same progression of music over and over, it's because the randomization is poorly designed. I had an early MP3 player that literally had the same "random" order, to the point where I always knew what song would come next.

In that case, it's because random numbers generated by a computer are pseudorandom, or just generated by the exact same arithmetic sequence. For instance, here's a really bad pseudo-random number generator: Start with 4. Take the last number, divide it by 2, and if it's even add 5. If it goes over 100, subtract 100. (I didn't claim it was good.)

These pseudo-random number generators can be improved by providing a seed number, which means if you give it the same starting point it will generate the exact same sequence, but the key is giving it a random seed. Often programs provide the current time as the seed. My last MP3 player would have been much better if they did that.

Spotify does a much better job with actually randomly shuffling playlists. But the problem with Spotify is if you listen to, say, Wilco radio, it's not adventurous enough and keeps playing the same few songs over and over in random order until you get sick of all of them.

Spotify upped its game with the "daily mix" feature, but yeah, radio stations are kind of crappy right now.


A bit tangential, but for a while I've wanted the ability to "pin" certain songs together for the purpose of random shuffles so that they always get played back to back. One good example of this is the second half Abbey Road; if I'm shuffling some Beatles songs, I really want "Carry That Weight" to come immediately after "Golden Slumbers" (and if I'm being honest, I want "The End" coming right after both of those). I know that I could just manually concatenate the songs together with some sort of music editor and then put that as a single song in my library, but I've always wondered if there were any music players that supported this sort of thing built-in when shuffling music. Has anyone ever used a player that lets you do this, or am I just the only one who wants this?


I, too, want this -- I mostly listen to game soundtracks, and sometimes two tracks according to the OST (or the unofficial rip) really felt like one in the game, from when they played. Other times I really do just want to specifically play part two of whatever, though, so if I manually concatenated them I'd need to still keep the originals around; if I did that, I wouldn't be able to just play through the entire album linearly without a repeat. So yeah, being able to pin in a shuffle would be good.


Dark Side of the Moon, Abbey Road, and We Will Rock You / We Are the Champions are my go to examples for this. I hate going for a run and getting the penultimate track from Dark Side of the Moon on shuffle. It cuts out right at the climax, I always stop my run and manually tell Google to play Eclipse next.

While I'm on my soapbox, another tremendous annoyance I want to get rid of: "Deluxe" tracks. I'm so tired of scrolling through re-released/deluxe versions of albums to find the album with the original track listing. I don't want remixes or rough cuts in my random playlist. With all of the shallow marketing attempts at selling the same classic albums to the general public over and over again, the alternate tracks outnumber the original.


That's a great example! I also can't listen to Brain Damage without want to hear Eclipse after.


Actually, I almost implemented this a few times over the years in Quod Libet (https://github.com/quodlibet/quodlibet/issues/703), my use-case being mainly for classical pieces or DJ mixes... but never got round to it.

Eventually someone kindly wrote a plugin that did pretty much this using what we all agreed was the best way: the under-loved `grouping` tag. Caveat: I haven't actually tried it yet...

(Please file a Github issue if you try it but it doesn't work...)


I have noticed that Apple Music seems to always play “we are the champions” after “we will rock you” despite them being different tracks. Not sure how that works!


Those two songs were concatenated and released as a single.

Unless you specifically want to play the album versions, Apple is likely to give you the single.


I haven't used it much in a while, but doesn't iTunes have the option of grouping songs together in some way? Basically exactly what you're asking for?


This has little to do with music, but as an example of how a program has a "random" setting that doesn't make much sense, my KDE rotating background I've found has a really annoying implementation: Suppose I give it 2 directories full of photos, one of those containing 1000 photos, and the other containing only 1. It'll show that 1 photo half the time, because it's randomly selecting between the directories first, and then selecting among the photos in that directory. It should be selecting randomly between all 1001 photos, but that's not how it works.


This should get fixed. Have you reported this on bugs.kde.org? People are very friendly there.


Every single person can have multiple definitions on what random means in different situations (use-cases).

My hypothesis is that people use the random or shuffle options when they don't know exactly what do they want to listen to, they have a nice collection (or have access to a huge database), and want to be surprised on what follows.

So, a truly random progression is never what you truly want! Instead you want a good DJ, that will suprise you and keep the mood going.

Imaging the opposite. A truly randomized playlist out of a list of 100000 songs. Who would want a truly randomized progression? Imagine listening to Beethovens 6th part II, then Sepultura, then Dua Lipa, then Juzni Vetar, and then only after 20000 other songs forced upon you with no context, you will get to the 6th part III.

So, don't ask for true random. Ask for an option that will give you a nice progression, keep the tempo, keep the mood, ask you if it is good (or measure it somehow). Yes, you want to hear the oldies/goldies, but not only those, otherwise it will get boring, yes you also want to be educated, to hear some good songs that you have not heard about in the past, ... just some of the possibilities.

Playlists are a hot topic in the field of recommender systems these days, and personalized playlists, playlists adapted to your mood and liking and your swings in mood from time to time, are the real future in modern players.

Last years ACM Recommenders systems conference had an competition in exactly that - the challenge of automatic playlist continuation. See this link for more details including the publications that presented some of the results of the challenge. http://www.recsyschallenge.com/2018



They must have changed it since, as they frequently put songs by the same artist right next to each other nowadays.


VLC 4 has an interesting new randomizer that works as you describe: https://blog.rom1v.com/2019/05/a-new-core-playlist-for-vlc-4...

Discussion: https://news.ycombinator.com/item?id=19978295


It sounds like you want a shuffle function that obeys the gambler's fallacy.

https://en.wikipedia.org/wiki/Gambler%27s_fallacy


Funny, when I was looking for my first part time dev job in college, a company interviewed me on “how to create a random playlist”. Didn’t get the job.

To this day I still wasn’t sure what was the purpose of that question? Was it to see how I think or did they really wanted me to come up with a way to create random playlist that satisfies their arbitrary definition of random


My side project is a media player (music, images, videos). I'm not happy with any music player, so when I get frustrated with them, I work on mine, trying to solve the issues. Being able to choose a shuffle mode is one big difference in my player. You can choose from lru, random, similar, least skipped.

I like least skipped mode because I usually skip past the same songs. The more I skip them, the less they are played.

Similar mode is nice because I notice I skip music depending on what mood I'm in, and I have a tendency to just put all my music in one giant playlist. If I'm in a picky mood I put it on similar shuffle and if I listen to a song all the way through it'll play a similar song it hasn't played yet. If I skip a song, it'll use the last one I completed.

Another big thing is being able to see the next song coming up, and being able to dismiss it. So you can refine the next in the queue while you listen through the current song.


Because random is actually "random based on what you've listened to most in your playlist, because we believe that we know the definition of random more than you do"


Hopefully someone will pop up with a logic listing of the way WinAmp did "shuffle". Surprisingly complicated. "Random" isn't enough, even with a good PRNG. Believe it or not radio DJ's had more job than just talking over your favorite bits of the song.


> no tune was played twice until all of the tunes were played...

That doesn't sound random.

I use Google Play Music and it "randomizes" things in the way you desire. It takes your playlist and shuffles the entries; you can even press a button to see how it's sorted it. That ordering sticks around forever if you take no further action, though, so it will repeat that random ordering indefinitely unless you press the shuffle button to disable that, then start playing something, then press the shuffle button again.


If its programmed like youtube, it only shuffles the last 100 you have visited in your list, not the whole list.


Not sure exactly what you're referring to here, but on Google Play Music, there's a concept of a "queue" of music that's currently playing/has been played. Generally it's just the songs in order of the album/playlist/etc. where you selected the song to play, but you can also manually add/delete/reorder the songs on the list. Since it keeps track of the songs that were played previously in the queue (to enable the "previous track" button, among other things), enabling shuffle just reorders the queue in a random way (with the currently playing song first). From the few times when I've used it with extremely large lists of songs (e.g. my entire music library), it doesn't just shuffle a subset of the queue that you have currently active, but the entire thing. You can also choose to start playing an album/playlist/etc. shuffled, which just puts the entire thing in the queue in a random order and starts playing through it.


I don't have a problem playing my local ogg/mp3 collection in shuffle mode with XMMS; but using Youtube for listening to music sucks in a related regard.

It seems like pretty much no matter what song I start listening to on YT, it eventually falls into a rut where I start hearing the same handful of songs that I've heard a million times. It's like it's too good at figuring out "what I like" and tries to only play songs it "knows" I like. Or more likely, since plenty of what I like are "deep cuts", it's just playing the most popular few songs by the given artist(s).

The order within a given session is probably shuffled up OK, but it still sucks from a variety standpoint because I don't want to hear "Eighteen and Life", "Round and Round", "Kickstart My Heart", "Livin' On A Prayer", "Rock You Like A Hurricane", "Fallen Angel", "Shot In The Dark", etc., day after day after day after day after day... as much as I like all of those songs.

It does seem to be at least somewhat genre aware though. If I start out listening to classical music, it doesn't jump to metal/rock, or if I start out listening to synthwave, it doesn't bridge to classical. But the problem I just described seems to exist within each genre. :-(


This is why Apple calls it "shuffle" rather than "random."


Because random doesn't look/seem random to humans. The problem is that these players aren't randomizing the order of the songs, they are randomizing the next chosen song.

You'll want to shuffle the entire playlist at once; or use a player that attempts to avoid this issue (Winamp would let you bias the RNG to choose songs further away from the current one, for example). If you decide on the latter, there is always the chance that you'll hear repetition, because repetition is valid in random sequences.


I believe the issue he's describing is not how random the playlists seem, but rather that it randomizes a list once and uses that as the order instead of each time the list is played. I've definitely seen that behavior in some music players.


what kind of animal listens to music in a random order?!? I have trouble finding a player that organizes by album. I just want to play to a sorted list of albums in order. No player does this.


You can set that up with Foobar 2000 if your albums are correctly tagged. It's also one of the few players I've met that gives you a "middle choice" of randomly picking albums, but playing the albums themselves start to finish.

(That said, I'm one of the animals that shuffles everything in my library regardless of genre or album order anything else.)


Mine does:

  mplayer artist/album/*


Not exactly what you want, but Plexamp[1] has a "random album" mode, where it plays randomly selected albums. I really like this feature, as I find it's a good balance between random and coherence.

Before anyone screams, yes it's an Electron-based app but it's fairly lightweight as far as those go.

[1]: https://plexamp.com/ (required Plex server)


Symphony (found it on F-Droid a while ago) claims to do this but it didn't seem to work well for me.


Here is a nice post about this problem: https://keyj.emphy.de/balanced-shuffle/


Not related to the OP’s complaint, but a shocking few can shuffle by random album. Apple regressed: the iPod could but the iPhone can’t.


This is something my main music player had circa 2003 when I used a linux desktop player.

Since then I've not had it any service or software I use, it's the missing killer feature for me. I want "random"/recommended albums not recommended/random songs.


You can hack the functionality into desktop spotify, if you care enough (on linux and mac at least).


Pandora (even though I gave it up for Spotify years ago) seemed to be the best at keeping variety. Spotify is very bad at it.


Never used pandora but MixRadio was the best for my taste. Spotify is nice but it’s really fucking hard to find new stuff that within Spotify itself.


Am just here to nitpick, but the 5 disk CD changer behavior that you just described is not true randomness (by definition).


Nitpicking your nitpick, the difference is whether the random sampling is with replacement or without replacement. Wikipedia's definition of "simple random sample" defines it to include both ways:

[S]ampling is typically done "without replacement", i.e., one deliberately avoids choosing any member of the population more than once. Although simple random sampling can be conducted with replacement instead, this is less common and would normally be described more fully as simple random sampling with replacement.

Ref: https://en.wikipedia.org/wiki/Simple_random_sample


nitnitnitpick: GP is likely (and overly pedantically) referring to the use of a PRNG to implement the shuffle, rather than using a true random source.


It is in fact a random shuffling. Hence the name that was used for this function.


Which is why it was called "shuffle" and not "random".

Shuffle (mostly) used to do what you expected when you had a medium like CD with a small number of tracks.

As the number of available tracks grew, the definition became less and less obvious.

With a service like Spotify, you could design an entire multi-page specification to cover all the different possible "shuffle" options you could give users - all of which would be useful in at least some settings.

Instead of which users get one button and some guessing.


It is randomness if you are "playing N tracks in random order" and not "select the next track randomly from N choices in a loop".


I got so tired with YouTube's recommendation for playing Hindi songs, because it got so repetitive, that I opted to delete my entire viewing history. This did not help and with-in a few weeks, the 'random' playlist became predictably repetitive again. I'm having similar experience with YouTube Music as well.


I like how I have it on random, then it'll play 3-4 titles from one artist in a row, even though that artist is roughly equal in number as any other artist in my library. This will happen at least once a week driving home. It will also barely ever play probably 30% of my titles but it will play 5-10% of them a LOT.


There's definitely a feeling that track orders feel quite similar between play attempts because there isn't a large enough "shuffle memory" between sessions, or in many of these services any "shuffle memory" at all (some really are just random and hoping the distribution of the random function enough to compensate).

5 Disk Changers had a finite need for memory for recalling what had been played, which was easy enough. Some people's libraries are so large it's an interesting question of how much is it worth storing the played state of a song, and for how long (can you clear that to start a fresh shuffle? can you add individual songs back without just clearing the memory state?).

Some players let you manually manage this: shuffle songs into a shuffle playlist and then play that list in track order, remembering your last heard state.

(For the purposes of dealing with the bad PRNG in my car I wrote a Python script a few years ago to do a version of that shuffle playlist management in how it fills thumb drives intended for my car. It keeps a shuffled track list in YAML and then uses that copy files to the drive by track number for the simple lexicographic default play order of the car.)


Spotify is the worst offender for me. Random won't play any song outside of the top 100-200 in my song library, but depending on how it is sorted. So if it is sorted from A-Z, I will hear only songs that start with A or B. If it is sorted by date added, I will only hear songs recently added.


This sounds like it could be the well-known bug with Spotify Connect, where only the first 100 songs in any given playback context are submitted to the queue[1].

This particular bug has been around since at least 2016.

[1] https://community.spotify.com/t5/Other-Partners-Web-Player-e...


Google Play Music seems to truly understand shuffle. Everytime you press shuffle button, you can see the playlist change randomly. I think it is very straight forward, randomize without repetition, still many streaming apps fail to implement it - add Saavn, Gaana to the list too.


I first noticed this with Spotify's "Shuffle" - it was so infuriating, particularly when I'd skip a song, it would just play another song from the same artist... sometimes even the same album! That's from a playlist with hundreds of artists and songs...


I noticed the same; and it seems to be getting worse...


Seems like a Markov Chain approach--considered over artist and genre--would be a good idea.


This talk by Sid Meier is a good description of the problem of true randomness, from a game perspective:

https://youtu.be/MtzCLd93SyU?t=1166


Seems to me like a perfect opportunity for a simple neural network or machine learning model to predict the next song to play based on the last k songs having been trained on a bunch of existing playlists.


a NN is overkill for something like this. you don't even complex logic to make a good shuffled mix.


This is exactly the reason why I'm stuck with Deezer. The random selection, which is called Flow, it's just a never-ending stream of music from the track I tagged and similar songs.


I've always assumed the royalty cost and popularity factored in, but I've never tried to dig to deep into it.

When I shuffle a playlist on Amazon Music, it wont repeat until the end of the playlist.


Not all music players. I highly suggest you give Roon (https://roonlabs.com) a try, if you haven't already.


What does it do specifically on shuffling?


The answer is that people(like OP) who think they want random, really want shuffle. Or randomly choosing from whatever songs have NOT yet played.


Foobar2000 is pretty good. It seems to have a bias to play two songs of the same interpret in a row. But I don't mind that.


Dunno about contemporary music players, but:

> no tune was played twice until all of the tunes were played

That is definitely not compatible with actual mathematical “randomness”. Try rolling a die multiple times and see whether you get all six numbers before repeats. It’s very unlikely (probability of all six rolls being unique = 6!/6^6 = 1.5%)

Which brings up the interesting question — what do humans actually expect from “shuffle” mode?


Think of every single erroneous belief that people have about randomness. A pleasing music-randomizer algorithm obeys all of these.

The term found on a lot of music players is not "random", it is "shuffle", and this is an important distinction. The term comes from cards. Take a deck of cards, shuffle it, and turn each card over in order from top to bottom. You expect that every card in the deck will be seen once and only once; turning up, say, two eights of clubs in a row means that something is dreadfully wrong with your deck.

Humans tend to expect a similar behavior from "shuffle" modes: the same song does not repeat for a while. If people are shuffling by song, then they may also expect that performers don't repeat within a (smaller) timeframe.

Nobody expects "pick a random number between 1 and numsongs, play that song, repeat, and be perfectly happy to play Baby Shark forty-seven times in a row if that number keeps on coming up".


I don't think mathematics is the issue here, rather problem definition.

OP wants "Shuffle my playlist into a random order and then play it through"

You are thinking closer to "After this song is done, choose a new song at random among ALL available."

Spotify's is a mixture, while good offline clients tend to go to the first.


In statistics classes we learned that all problems can be reduced to problems with balls and urns. In this problems you can put the ball back in the urn or not put it back, both are valid things and can model different problems.


> That is definitely not compatible with actual mathematical “randomness”.

Of course it is, the concept of randomness is much broader than you allow for. The specific issue you refer to here is if you are sampling with or without replacement - both are valid.

There is another issue which is the distribution you use. Should songs be equally likely to occur, or should the ones you've played more occur more likely?

You may also extend sampling strategies to genre, or to exclude repeated artists, or whatever - but all of these things could still be done via random sampling.


Mathematical randomness can describe an enormous range of behaviour, including shuffling. Shuffling is sampling without replacement. Rolling a die repeatedly is sampling with replacement (imagine the numbers 1-6 written on cards and mixed together in a bag; to get a die's behaviour you need to put a card you draw out and look at back again before the next draw).


Personally what i want out of shuffle is that once a song has been replayed more than n amount of times, it gets temporily removed from the queue for that session or an amount of time.


My FiiO M9 does a real good job at random. But the UI leaves a lot to be desired.


I haven't listened to randomized music since Winamp 2 was my primary player.


They aren’t. People are bad at understanding randomness.


vlc with music in folders not individual files is where I would like some better randomness... it favors the folders already open for sure.


Why do you need to remind me of Rdio again? :(


Gone mad music player for android can shuffle your play-queue which is possibly what you want?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: