127 points · by winternett · 7y ago · 143 comments
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...
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?
Lots of music players started out with true randomness and then dialed it back because people complained that it wasn’t very random.
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.
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.
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.
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.
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.
I'll work on it when I can get a bit of free time.
Edit: Oh, and it is always on top, you are my favorite open source contributor.
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).
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.
“What is the best to listen after this track?” - just with a super small subset of tracks.
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.
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!
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
We've come so far with UI design now that we can't have that.
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.
It's odd to hear that this is not standard, given that it's a standard algorithm. Maybe memory limitations?
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 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.
I’ve definitely seen scenarios where I’ve heard the same random play order due to some fuckery with a car Bluetooth connection.
This could have the appearance of #4.
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.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.
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."
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.
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.
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.
If you search the Spotify forums, there are a few posts on the issue with no official answer from Spotify whatsoever.
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.
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.
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...)
Unless you specifically want to play the album versions, Apple is likely to give you the single.
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
Discussion: https://news.ycombinator.com/item?id=19978295
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
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.
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.
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. :-(
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.
(That said, I'm one of the animals that shuffles everything in my library regardless of genre or album order anything else.)
mplayer artist/album/*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)
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.
[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.
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.
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.)
This particular bug has been around since at least 2016.
[1] https://community.spotify.com/t5/Other-Partners-Web-Player-e...
When I shuffle a playlist on Amazon Music, it wont repeat until the end of the playlist.
> 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?
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".
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.
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.