Randomly Selected Music

2021-01-01

I don't think this will interest anyone but me but ...

I've been listening to music via my iPhone for many years playing my collection of mp3s. I guess that dates me as I'm not using Spotify or Apple Music or Youtube Music but, I haven't had any luck using any of those services.

As some examples, Spotify, I picked "Caro Emerald" Radio. I'd classify her as modern Swing

and Spotify played "How Would You Feel" by Kzezip who I'd classify as pop.

Another example I put in Prince Radio

And Spotify played rap. Prince had nothing to do with rap. The list from when I pasted it above is basically "Hits from the 80s" but that's not what I want if pick "Prince Radio". I want music that sounds similar to Prince. Maybe Windy and Lisa, or maybe Rick James? or maybe some bands I never heard of. Checking the list though Spotify will give me Huey Lewis & The News. I have nothing against them, I like their songs, but they aren't similar to Prince.

An example from Youtube Music, I put in "Fuck you till your Groovy" by Jill Jones and pick "Radio"

And it played "All Night Long" by Lionel Richie. WAT!???!

Note: I got the Jill Jones recommendation from doing the same thing on Google Play Music who's radio feature actually seemed to work, or rather actually played music similar to the artist and not just music popular by people who like that artist.

Another Youtube Music Example, I put in "Swingrowers" radio which is an electro swing band.

And youtube played "Bliss on Mushrooms" by Infected Mushroom, an Industrial Band

WTF!!

Anyway, all this means I sadly I keep going back to just my own collection of mp3s because trying any of the other services means hitting "no" or "don't like" for 9 of 10 songs.

All that was really beside the point though. What I wanted to write about was I'd been listening to music via my iPhone for years and recently went through my entire list of ~8500 songs trying to make a playlist and that's when it became clear to me,

iPhone SUCKS at playing music!!! ๐Ÿ˜ญ

In particular I noticed lots of songs I never heard my iPhone play and conversely there were some albums it would seem to play way too often. One example is I have this album called "Pure Sugar" by Pure Sugar. It's house music from 1998

As far I know it was some album I bought at a record store,probably in 1998, because on a short listen it sounded ok and back then buying CD was the only way to add to your music collection. I had over 1100 CDs at the time.

I have no particular affinity for this CD. I wouldn't add any song on the album to a playlist but if you like house music as like background music it's fine. I can listen to the entire album which is better than most.

In any way, out of ~8500 songs my iPhone seemed to pick songs from this album all the friggen time?!?! I never really gave it much thought because I just assumed it was bad luck or one of this weird artifacts of random selection but then, when I was going through the entire list of songs and seeing all the stuff not being played I started to be clear something was broken.

I didn't actually figure out what the problem was. I've never rated any albums or tracks. iTunes/Music apparently auto rates albums. No idea what it does to do that. If it's by the number of times played that would suck because it would re-enforce its bad choices. If it's by looking up on the net other people's opinions that would suck too as I don't want other people choosing music for me from my own collection. I also have no idea if the rating are used to pick random tracks.

If shuffling is related to rating, apparently the solution is to set all the ratings to 1. That way the app will assume you set it and won't auto rate.

I actually have no idea if that works. Instead I switched to using a different music app and suddenly I'm hearing much more of my collection than I was on the built in app.

We'll see how it goes. I have no idea how the new app chooses songs though. I can think of lots of algorithms. The simplest would just be to pick a random track from all tracks.

I'm pretty confident the app isn't doing that because it's also played too many tracks from the same albums. In other words lets say it played a song from "Unbreakable" by Janet Jackson. Within about 10 songs I'd hear another song from the same album, and 10 songs later yet another. I'm not sure what the odds of that are but I think they are low for 8500 tracks. I might guess that it picks a random album and then a random track. Would that be more likely to hear songs from the same albums? Or maybe it picks N albums and then picks random tracks from just those albums trying to make a theme? I have no idea.

I wrote some code to try just picking songs at random and to see how often it picks a song from some album of the last 20 albums.

It just keeps picking songs at random until it's played every song at least once. Using JavaScript's Math.random() function, for ~8500 tracks it would have to play around 80k tracks until it's played every track once. During that time at least one track would have been played ~25 times. Also about one out of 36 tracks will be from the same album as one of the last 20 albums played. That wouldn't remotely explain getting 3+ songs from the same album in say 60 songs. Yes I know random = random but in my own tests that situation rarely comes up.

Apparently the there's also a difference between "random" and "shuffle". "Shuffle" is supposed to by like a deck of card. You put take all the tracks and "shuffle" them, then play the tracks in the shuffled order. I suppose I should check that.

Well, according to that on average every ~40 tracks I'll get a track from the same album. Maybe that's what I'm experiencing.

It's ridiculous how much of my collection I'm being re-introduced to since I switched players

In any case, within the first 60 tracks on the new app it played 2 songs from "Pure Sugar"!!! ๐Ÿ˜ญ๐Ÿ˜…๐Ÿคฃ๐Ÿคฏ

Comments
JSBenchIt.org and JSGist.org
Zip - How not to design a file format.