I wrote a music playlist app years ago called Tobasco's Amazing Clockwheel which was still getting 300 downloads a month after 15 years until I pulled it a few months ago. It was simple playlist generator that guaranteed no repeats within a certain amount of time. It was extremely easy to build and eliminated hearing the same songs over and over, which is an unfortunate result of a computers' ability to perform a true shuffle.
It kills me that I can have a playlist of over 1000 songs yet still hear some songs dozens of times in a month and other songs zero times.
By simply sorting the songs in a playlist by the number of times it's been played in ascending order (least played at the top) to assist you in selecting a song, you can greatly improve the song selection.
My algorithm would select songs with the lowest weight. A rough idea of how weight is manipulated goes like this (would need to be tweaked for perfection):
- All songs start with a weight of 0 (so they all have an equal chance of being chosen)
- Every time a song is played, its weight increased by 4 and every additional song by that artist increased by 2 (thus making that song have to wait longer to be played again while we select other less-played songs from the playlist to add to the queue and that artist come up less frequently since s\he has already been chosen recently.)
- If an artist hasn't been played in over an hour, all of his/her songs are decreased in weight by 1 (thus now alowing that artist to creep back into the selection pool). This requires a timestamp of the last time that song / artist was played.
- Select any song at random with a score of 0, queue it and update the weight.
- If no song has a weight of zero, select randomly from the next lowest weight
This method would at the very least, guarantee a huge decrease in the number of songs from your playlist being skipped over time.