How to Shuffle Songs? (2014)
engineering.atspotify.com
engineering.atspotify.com
Spotify will only repeat a song during shuffle if you also activate repeat. It will also repeat a song if you actually added the song twice or more to said playlist. You can try it out by shuffling a playlist+deactivate repeat then check which songs have been queued from start to finish.
Smart Shuffle -despite the name- is more a playlist function than a shuffle function. It's like the Radio playlists but with the songs interspersed temporarily in your own playlist. Note that these songs were not already in your playlist - so they do not repeat unless you activate repeat.
If they paid indie artists properly, their operational budget would be much lower. Payola is the real reason why music doesn't play randomly almost anywhere anymore. It's even the case with many app music players that you download in app stores, the whole music industry is skewed to favor just a few well known and industry planted artists under the hood. And it's bent on getting worse..
If you hear an already popular TikTok song playing in the supermarket or at a gas station, it's literally driving royalties up for the involved artist. It's also why you rarely hear new music from small artists, and why Taylor Swift dominates news media every time she scratches her nose.
If you are regularly featured on the front page of YouTube, Spotify, and on CNN.Com, you dominate streaming now, and nobody else can get that spot without being backed by major money.
This is why I back up and always carry my own personal music collection. Streaming now is a generically engineered and controlled repetitive hellspot for me without real choice.
When people say they want to "randomly shuffle a playlist", they really don't want that. They want the perception of randomness, but _true_ random doesn't abide by rules.
If you're actually random, there is a probability that it might just play all the songs straight through. Or just pick songs by a single artist back-to-back.
Sadly youtube just picks the next one based on the current ones ID + some seed, so it constantly gets stuck in loops
As another neat trick, they have added a small animation while seeking to next track with some lower time bound, so it looked like thinking for a second or so. In reality, the decision was instant, seeking was not.
Actually not sure if it's even that far fetched. Making the logged-out-experience worse on purpose is something all the big internet firms do.
There could be advanced implementations (like with the remembered passwords, where YT would store a list of seeded hashes of your viewed videos). But they are that: advanced implementations, that impose an extra cost.
Though I still think "not remembering watch history" (and adjusting what you are shown based on that) to mean that a functionality that doesn't have anything to do with tracking (because it only requires information from your current session) to be a little lazy.
You wouldn't expect a slide-show of images to be shown in random order, just because you didn't consent to the cookie banner.
But in all fairness - I really like youtube's auto-play and suggestion algorithm when it comes to music. I use it for free and I haven't seen an ad in years so I don't want to complain :)
I even went so far to seek out a website that does it for me, and which I set up as a bookmark https://youtube-playlist-randomizer.bitbucket.io/
Altough, seems like the site is now broken
I used to get it all the time and haven't experienced it since switching to an account where it's enabled. I guess it may have just been a coincidence.
Same in games. "I had an 80% chance to hit and didn't" is a perfect example.
Say you're playing through someone's electronic D&D module and you try to do something with a 90% chance of success. Then you roll a 2. You didn't make a mistake when deciding what to do, so that feels wrong -- this is a problem with randomness.
What do you do? You reload from right before you tried to do the thing, and you reroll. The game can't actually make you accept randomness if you don't want to. So they have to do something else.
It had a toggle for random play. It indeed apparently played the tracks at random.
By random I mean random, not shuffle. It would play the same track multiple times during a listening session. For example tracks in order like 2, 2, 7, 8, 7, ...
I actually liked that.
If memory serves, it would stop playing after it had played each track at least once. If there were a lot of tracks it would not finish, at least not before the batteries ran out.
> ..at least once a week, a developer would come to my office, and say "the random number generator is broken, we need to look at it."--It's because they hit a streak. [1]
[1] https://www.youtube.com/watch?v=FhC0NaB6ock&t=2343s
He shares more details about game design choices in the video.
- X-Com 2 lies in favor of the playing when displaying a chance of hitting of 85% [ https://www.gamedeveloper.com/design/jake-solomon-explains-t... ]
- Baldur's Gate 3 "Karmic Dice" will prevent streaks of very high or lows rolls
- Tetris games doesn't use Math.random for piece distribution. Most modern Tetris (like Tetris Effect) uses Fischer-Yates with 7 pieces (in the community we call 7-bag) or 14 pieces (it avoids repetition "at the seam" of a bag). The Tetris game I like the most (Tetris the Grand Master) uses a history system (the chance of receiving a recently distributed piece is heavily reduced; it's less predictable than 7-bag). IIRC even classic NES Tetris has a repetition avoidance system.
This had consequences on competitive play; they wouldn't even tell you how exactly the algorithm worked, so the only way to build a deck was lots and lots of simulations.
Cheaters, like in any game, tend to look for methods that maximize the combination of impact and plausible deniability. Marked sleeves, sleight of hand (pun very much intended) etc.
https://news.ycombinator.com/item?id=20872110 - Sep 2019 (41 comments)
https://news.ycombinator.com/item?id=37107346 - Aug 2023 (16 comments)
Then you are not lying to the users, and your tooltips/docs etc. are correct as well.
There is a probability that entropy will decrease, it's just small enough to neglect. Playing songs straight through isn't really a concern.
It might help that my bar for favouriting a track is as background noise for the office or around the house rather than purely 10/10 killer desert island tracks.
The idea is that it was random, but that it tended to keep the same mood, and once it did switch, it would tend to stay in that mood for a while. (I suppose I would have also made it sticky once it did switch genres, but I didn't get to use it for long enough to matter.) This also trivially gives you three "No, not this, go to next" buttons, one for the album level, one for the artist level, and one to switch out the genre entirely.
Unfortunately, I have not had time to pour over the mp3 players around to see who has pluggable shuffle algorithms exposed conveniently enough to make this work, and unfortunately it's a lot of work to tag MP3s enough to make this work since those "genre" tags are generally pretty bad, so I haven't had this in a while and I've gotten used to just manually curating my genre mood shifts.
I don't like any of the cloud service shufflers I've used, though. They are concerned about aspects of the song I'm not and oblivious to the ones I do care about and the net effect is about like listening to a radio station, where I end disliking every third song or so no matter how I tune it. Fortunately, I've been building my personal MP3 collection for over 20 years so I'm not even remotely dependent on them.
Do not believe me? Simply clean spotify's cache and look closely at somehow magically new songs start popping up in the shuffle!
Wait no, it does, right? Since we are not doing random independent events, but taking things out off a finite set. Going back to the colors, if there are 4 green and 4 not-green, there's a 50% chance that the first song is green. But if the first song is green, doesn't that mean that there's now a 3/7, or 43% chance, that the second song is green? And 57% that it's NOT green?
At the extreme, if I have a single song of My Chemical Romance among 10 songs, and it plays first, I expect MCR not to play again (until the list resets, the algorithm describes a finite set, not a rolling one).
If we're shuffling the set of my liked songs, and 90% of my liked songs are by Taylor Swift, even after hearing 3 of her songs back-to-back on shuffle, chances are I'm hearing her again next
Ideally, you'd use this, plus the year and metadata about whatever microgenre. Use the radio adage of "don't hit me with a brick after you tickle me with a feather."
Occasionally do a "two from Band X" or "three from the year NNNN." I would probably weight the microgenre in the metadata by how rare it is: "rock" isn't particularly descriptive as compared to "doom rock" or "Southern rock."
Spotify does try to do it, but it's not an exact science: https://everynoise.com
From https://everynoise.com/EverynoiseIntro.pdf
--- start quote ---
There are other ways to plot music genres, of course, than the one used by the map at any given time. We use 10 dimensions internally, and two completely independent measures of genre similarity. Iʼve flipped the map once already since first publishing it, and I might do so again without warning if I find another configuration that seems more interesting.
--- end quote ---
Something like this would be nice to add to my app JukeLab that turns your tablet into a jukebox, powered by Spotify.
It currently uses Fisher Yates to shuffle for auto play which does feel weird sometime.
Other polish I’m working on in the app…
How to skip skits and interviews during autoplay.
Removing (remastered) etc from album and song names correctly.
Taking total control over playback and the queue through the Spotify SDK which is buggy and hostile wrt auto playing unwanted tracks.
Give me "NOT made for airstrike", please. I often want to start a radio off a song precisely because I'm trying to find new songs that go with that one, not so I can have an excuse to unironically listen to "More Than This" for the 20th time this week...
Almost felt like a little 'hack' to get a broader selection of suggestions for a few years (though still largely mainstream stuff)
I understand that you need to make something that the average user perceives as random, but please give me some control in the advanced settings, it's literally one of the few things I want to control.
I'd prefer a weighted shuffle based on the staleness of a song in a playlist. That way you eventually get through all of the music but in a pseudo-random order.