Type: Music, Algorithm, Programming
Drafted: 2017.09.26
Posted: 2017.10.10
Status: In Progress - Working on PoC
I use shuffle to listen to my music library. Although shuffle is terrible! Shuffle frequently picks the same songs, even though I constantly skip them, and it rarely plays other songs. Shuffling shouldn't be this difficult!
Here is an outline for anyone to use, please fix your shuffles!
Every category has a weight (specified in parenthesis). Weight corresponds to the category's positive or negative influence. Positive influence means the category should be used to more likely pick a song, negative influences means that category should be used to less likely pick a song.
Percentages below represent a point of time in a song. Example, if a song is 3 minutes (180 seconds) long, then 0% - 10% is 0 seconds - 18 seconds.
* Backward skips do not count
Skip weight should be calculated with the result of the last 10 plays. For example if a song isn't skipped then skipped at varying positions, it might look something like this:
0 + 0 + 0 + 0.1 + 0.25 + 0.5 + 1 + 1 + 1 + 1 = 4.85 / 10 = 0.485 * .45 = 0.21825
* The above weights were arbitrarily picked (untested)
If the song was last played weeks or months ago, shuffle should be more likely to pick it.
Last Played Cateogries:
If I just added a song to my collection, I want to hear it. Most of the time when I add new songs, they don't get thrown into the top of the shuffled list. So I have to directly go to the song and play it.
I add a song to my collection, and play it 5 times in a row. I like this song.
If a song has been selected in the top 10 spots the last 3 times, maybe it's time to move it down to 11 - 20, and bump up a song from 10 - 20. If I'm in the car, most trips are 15 - 25 minutes. Which is 5 - 10 songs depending on length. The first 10 songs the algorithm selects is very important. I don't want to spend time skipipng, I want to enjoy listening to my music collection.