Live data from Hacker News

Ask HN: Why are modern music players so bad at playing music in random order?

news.ycombinator.com

121–130 of 152 posts

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#121

Earlier quoted context omitted.

From what I remember, Pandora did that really well. It's been a while since I've used it, but their classification system was really cool.

Yes, this is still true, and it's great. Within the songs and artists that typically play on my Pandora stations, it will play similar songs in clusters, with the exception that it won't play the exact same artist twice in close succession. This makes the playlist a lot better (in my opinion). The only quirk I've noticed is when the same person has multiple bands... I've had it play Jack White or Les Claypool 4 times…

That's funny, I don't like how Pandora works on the custom stations I've tried to build. It feels too much like it is going through the set of seed artists in some repeating order, playing a batch of similar items to one seed before switching to the next batch.

I'd much rather have these sub-genres woven together with changing styles at each track boundary, as a sort of counterpoint.

If I can remember all the way back to when I used to make my own "mix tapes" transferred from vinyl records, I think I used to do this sort of interleaving. So, I think my preference existed before I ever experienced the shuffle of a 5 or 10 disc Sony CD changers, which usually changed discs on every track change and avoided any repeats until the entire set was done.

Because of my preference for shuffle, I used to burn a CD or two for use in rental cars, where I added a pseudo-random prefix to the file names. This gave me a shuffled play when the in-dash player was set to just play sequentially, so I didn't have to discover a random mode with repeats in one particular car...

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#122
post #3

Dunno about contemporary music players, but: > no tune was played twice until all of the tunes were played That is definitely not compatible with actual mathematical “randomness”. Try rolling a die multiple times and see whether you get all six numbers before repeats. It’s very unlikely (probability of all six rolls being unique = 6!/6^6 = 1.5%) Which brings up the interesting question — what do humans actually expec…

> That is definitely not compatible with actual mathematical “randomness”.

Of course it is, the concept of randomness is much broader than you allow for. The specific issue you refer to here is if you are sampling with or without replacement - both are valid.

There is another issue which is the distribution you use. Should songs be equally likely to occur, or should the ones you've played more occur more likely?

You may also extend sampling strategies to genre, or to exclude repeated artists, or whatever - but all of these things could still be done via random sampling.

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#123
Spotify is the worst offender for me. Random won't play any song outside of the top 100-200 in my song library, but depending on how it is sorted. So if it is sorted from A-Z, I will hear only songs that start with A or B. If it is sorted by date added, I will only hear songs recently added.

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#125
post #15

Here's the problem: go ahead and ask a bunch of different people what they want/expect their shuffle/random button to do and you'll get a bunch of different answers. 1. I want it to play in a truly random fashion, with replacement (same song twice in a row is possible). 2. I want it to play in a truly random fashion, without replacement (each song is removed from the list once played). 3. I want it to "seem" random (…

I have no idea if this is possible, but it would be awesome to see Spotify implement some kind of learning algorithm that would run your playlists like a professional DJ would, lining them up in progression by tone, tempo, sound, etc. That would be amazing.

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#126

Earlier quoted context omitted.

Lack of RAM? Make an array of pointers or ints or whatever corresponding to the current order of songs, then lookup each new song as the current song ends. Maybe 1kB RAM...

Yes, lack of RAM. First mp3 player I ever worked on consisted of a PIC driving an IDE hard drive over I/O pins, and an mp3 chip over I2C, with 2k RAM for the whole shebang. If you want to support more than 256 songs, you'll need 2 bytes per index value, so 2k RAM just for the shuffle table if you have 1000 songs. Then there's the hard drive controller, the FS driver and file I/O interface, the LCD driver, the send bu…

> Yes, lack of RAM

So how about using a maximal linear feedback shift register of smallest size greater than the number of songs, skipping entries that are beyond the end of the list?

Either keep the polynomials[1] in a small list, or implement them as separate functions, invoking the one you need via a function pointer. Both approaches take just a wee bit of extra FLASH/ROM, and just a few bytes of RAM.

https://en.wikipedia.org/wiki/Linear-feedback_shift_register...

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#127
post #15

Here's the problem: go ahead and ask a bunch of different people what they want/expect their shuffle/random button to do and you'll get a bunch of different answers. 1. I want it to play in a truly random fashion, with replacement (same song twice in a row is possible). 2. I want it to play in a truly random fashion, without replacement (each song is removed from the list once played). 3. I want it to "seem" random (…

> 1. I want it to play in a truly random fashion, with replacement (same song twice in a row is possible).

Anyone outside of HN would interpret that as broken random. So we can throw it out.

> 2. I want it to play in a truly random fashion, without replacement (each song is removed from the list once played).

Nope, not good enough for non-specialist randomness.

> 3. I want it to "seem" random (don't play too many songs by the same artist in a row).

Bingo. It should definitely seem random. Because the string "seem random" equals "random" for someone who isn't a technical expert in randomness.

> 4. I want it to be random, but predictable (same "random" ordering if I start the playlist again).

Normies don't care about random seeds for pseudorandom number generators, so nope.

> 5. I want it to play my favourite songs more often than my lower-rated songs.

That's a bonus feature that can be implemented with a slider.

> 6. I want it to play my less-commonly played songs more often than the stuff I listen to all the time.

Same as above

> So: what exactly do you want when you say random?

One obvious definition for normy random, plus a slider with least and most favorited at the left and right, respectively.

Done.

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#128

Earlier quoted context omitted.

No, I’m saying I want to hear every song in the list exactly once before any is repeated. Your summary is more generous than my definition.

That's shuffle, not random. Maybe randomized. With random, every song should have the same chance of being picked, which would technically allow the same song to play twice. If you'd let the player run for a decade, every song should have played about the same number of times. But this usually leads to people perceiving the feature as not being random enough. See Spotify for example: https://www.quora.com/Is-Spotifys…

Random has a lot of meanings, and you are picking a very specific one. It doesn't have to be uniformly distributed, for example, but relevant here is I don't think there's a problem describing a random shuffle as "random". It is playing a list in a random order.

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#129

what kind of animal listens to music in a random order?!? I have trouble finding a player that organizes by album. I just want to play to a sorted list of albums in order. No player does this.

Not exactly what you want, but Plexamp[1] has a "random album" mode, where it plays randomly selected albums. I really like this feature, as I find it's a good balance between random and coherence.

Before anyone screams, yes it's an Electron-based app but it's fairly lightweight as far as those go.

[1]: https://plexamp.com/ (required Plex server)

Re: Ask HN: Why are modern music players so bad at playing music in random order?

#130
post #111

Earlier quoted context omitted.

Take that comment almost verbatim, and turn it into a menu in the options/config area, and you can have my money!

I love this idea so much, I made it an issue on a the Lofi repo -- a somewhat popular Spotify player I built: https://github.com/dvx/lofi/issues/37 I'll work on it when I can get a bit of free time.

That is a really cool app. I have been using Miniplay for this. Already installed it and uninstalled Miniplay.

Edit: Oh, and it is always on top, you are my favorite open source contributor.

Post reply on HN