I am creating a Spotify app using Angular. I aim to provide an alternative to Spotify’s shuffle play.
Spotify shuffle play
Spotify does not document for us the internals of their shuffle play mechanism, but it seems to construct a new random selection from your playlist whenever you return to the playlist after listening to something else. I call this resampling. The problem with resampling is that a song that you have recently heard might play again while there are other songs in your playlist that have not yet played once.
Use my shuffle instead
My solution is to provide an external utility that shuffles the playlist itself, rather than just making random selections from it for the play queue. Then the user can turn off Spotify’s shuffle and listen to the randomized playlist in its new order. The effect is much like Spotify’s shuffle play but each song plays just once.
Until you start from the top again.
Or give up and simply go back to using Spotify’s shuffle play.
Because you got lost.
When you return to a big playlist it’s practically impossible find where you left off, assuming you even remember.
Use my shuffle again
So there is a bit more to my solution. My shuffle knows what you have listened to and puts these songs at the end.
Returning to your big playlist? Use my utility to shuffle it again. Then in Spotify simply start listening from the top. The songs will be in random order. You will not hear recently played songs. You don’t have to find where you left off.
Still under development
My shuffle utility is my project for learning Angular. So I am taking my time with it. But it’s pretty far along now, so I expect to make a version of it available soon. I will continue to talk about it – a few more features it has, and also some of the challenges behind the scenes both with Angular and with the Spotify API – in future blog posts.