Support and General Use > Audio Playback, Database and Playlists
Shuffle
SoloBSD:
Has anyone noticed that the shuffle of songs is not as random?
I have like 8,000 songs and when I use "shuffle" on all songs, it goes (example):
- Beatles song
- Beatles song
- Nirvana song
- Beatles song
- Metallica song
- Metallica song
- Beatles song
- Beatles song
- Kiss song
- Beatles song
- Metallica song
Even when I have many "Artists" songs, seems is not as random as I wanted to be, or expected to be.
Is there a way to make it more random?
I'm using a HiFi Walker H2
256 SD
rockbox_dev123:
I'll likely get corrected by someone more knowledgeable, but it's my understanding that true randomness is a "hard" computer science task. I don't believe there are any good entropy sources for Rockbox to use. I'm not sure what seed Rockbox is using for srand (or if it's even using srand) but it should be fairly easy to poke into the code.
For what it's worth I have had the same tracks come up frequently enough with Rockbox to notice. Even with a shuffled playlist of 90,000+ tracks.
The same thing (getting the same tracks from shuffle) also happens when I play the same playlist with Audacious on a PC.
Maybe add some more music/diversity to your library? ;)
EDIT:
The shuffle is handled by randomise_playlist_unlocked and uses current_tick as the seed.
gevaerts:
A random shuffle means you *can* get adjacent "related" tracks, as excluding those wouldn't be random at all (you *can* get ten heads in a row when flipping coins!).
Other software sometimes has shuffling mechanics that are deliberately less random to make human brains think they're more random, rockbox does not.
Bilgus:
This article touches on the topic gevaerts is talking about
Random Doesn't Feel Random
https://www.howtogeek.com/847793/why-spotify-shuffle-is-not-truly-random/#random-doesn-t-feel-random
Prior to 2014 at least spotify used the same method for randomness.
--- Quote ---until 2014, this was how the shuffle feature worked, but people complained that it wasn't random enough. So, Spotify changed it up.
--- End quote ---
(by making it less random)
If we were to implement something like what Spotify has now we would have to add a lot of extra logic and keep state
(that might be as easy as looking back over the already generated entries) but keeping that state costs processing time and or RAM which might work for a small playlist but gets crazy (and slow) when dealing with 1000's of tracks
Some related links mentioned in that post
https://web.archive.org/web/20250103102558/https://engineering.atspotify.com/2014/02/how-to-shuffle-songs/
http://keyj.emphy.de/balanced-shuffle/
Frankenpod:
Just wondering what the exact nature of the OP's issue is. Are they saying they want a randomly-selected artist, then a random song by that artist, rather than just a randomly-selected track (that is likely to be by an artist that has more tracks present in the library?).
If that's the issue, it's presumably solvable in theory, though probably the demand for it isn't enough for anyone to implement it, assuming the OP isn't able to themselves?
Navigation
[0] Message Index
[#] Next page
Go to full version