Shuffle Algorithm

Hey! First off, I just wanted to say this app is fantastic!

I just wanted to inquire about the shuffle algorithm. I’ve been shuffle playing a playlist of mine and have had the same initial song a few times and I haven’t heard a few songs (I understand larger playlists will have this issue from a statistics perspective). I understand that shuffle algorithms are always hard, and I was just curious how this specific one was implemented.

Thanks again!

Well there’s only one “shuffle” and it’s a raw shuffle without any special algo.

So I suppose you are talking about the personal mixes, those are not shuffle, they are meant to be personal mixes, so the algo takes in account playcounts, ratings, last played dates and things like that. So this evolve with times, specially for providers that does not return history of playback like the local device.

Thanks for the info!

One quick follow-up question on this. I have started using Personal Mix on playlists and it seems to work really well, whatever algo you’re using seems to generate a good mix.

Does the Personal Mix take the whole playlist into account, and then play something “similar”, or does it just pick one track at random and choose it as a root, sor something else?

Some of my playlists contain a wide mix of songs, some from artists that would never be considered to be related, it might range from 80s to Hard Rock, to traditional Blues, to 60s rock-n-roll. If the algo only takes one of the tracks to generate the personal mix, it would never play things from other artists on the list, but I don’t want it to shuffle from my entire library because my wife has stuff on there that I would never listen to. The happy medium is that it takes all the songs on the list into account and plays a generated list of songs that are kind-of similar to the whole list

Just interested about what kind of mix I would get over time.

This depends on what button you use.

The personal mix at top of list or playlists generate a mix from only the data that is present in the list.
The instant mix buttons generate a mix based on the genres of the song or artist selected. And when seeded by an artist ensure some “priority” to that artist.

OK, thanks. I’m always using the “Personal Mix” button right at the top of the list with no songs selected; expectation is that it gives me a mix which somehow takes the whole list into account, from what you describe, it seems like it would do that. Enjoying this feature, great for background listening.

Yes that’s what it does.