It's been under my skin for a long time now, but every single free music player app I've used in the past 8 years plays my locally stored mp3s in the exact same order each time the shuffle button is on. Many others complain about that too.
I don't know if it's happening on Android OS level, but even VLC, plays songs in the exact same predictable order. I've left support notes on VLC's forums, and submitted the issue to issue cues and there are no responses each time.
None of that encourages me to pay for a premium app, shuffle has been around since CD changers.
I would rather have the same "random" order than what Spotify does; random never plays some songs, and overplays other. I get true random has the possibility of that, but when I've heard the same song for the 4th time in an hour, on a 20-hour playlist, something is wrong.
It sounds like maybe what you want is to have the "shuffle" mode play songs close to truly randomly while still penalizing songs that have been played too much recently. This gives us an optimization problem:
minimize KL(π || uniform) - β E_π[times played already],
where β is an inverse temperature determining how much you dislike repetition and π is your policy. Here I've arbitrarily chosen a reverse KL divergence because it leads to a nicer closed form:
π(song) ∝ exp(-β⋅"times song played already").
I wonder if anyone has implemented this before in a music playlist.
I have this issue with youtube music only for some reason. For me "Shuffle" seems to be starting random, then after a handful of songs entering a loop of 6 or 7 songs. I never figured out why or looked it up, I just refresh the page. I know it must be only me somehow, but don't know what's happening.
I think you can have a rss feed of your playlist, you could grep the urls, | rand them like you want and play with mpv or just download everything with yt-dlp.
My car's player (reading from a flash drive full of MP3s) doesn't have "shuffle", it has "random". The difference is subtle, but it means that each time it advances to a new track, it selects that at random. The result is that I never hear all the tracks in an album/playlist without hearing a bunch of repeats. Infuriating!
But when I play from my phone or PC, I use PlexAmp (backed by my Plex media server), which is the opposite extreme. Not only does it know what randomly shuffling is, but the server has analyzed the sonic profile of every track, and knows about similar artists and similar albums. So you can play an "artist radio" featuring that artist and other related stuff. And you can choose an auto DJ, which inserts between tracks the closest sonic match to the song it just played, or a brief detour of about 3 tracks that are spaced along the path from the track that just played to the one that's about to play. It's fantastic for discovering stuff you haven't heard in a long time within a very large library.
To implement shuffle play, it is not necessary to actually shuffle filenames in memory. Just generate a random number modulo the number of files, and then play that file. That way your program can shuffle play any number of files, no worries about running out of memory.
By the way, the Roku box has a "media player" app in it by default, and it cannot shuffle play more than a handful of files. Completely useless.
BTW, Windows Media Player is the winner, as it "just works". Just point it at the root directory of the music files, turn on shuffle play, and it works, and doesn't crash.
I just looked at the code and it's apparently using the Fisher-Yates shuffle with a call to arc4random each pass. It's literally eight lines of Swift!
I've never suggested this before, but if the Android app store has truly been as bad as you claim for as long as you claim, you should seriously consider buying an Iphone to solve your problem.
Is what you call the "shuffle button" a "shuffle playlist" button or a "shuffle mode" button? There is a subtle difference between those two and for what I understand you want the second
Interesting Story. Starting my own hardware music player as a learning project[1] (that will probably take years until the first release) I noticed how MANY music player projects are out there (software and hardware ones).
This seems to be a field with so many different approaches and requirements, that no solution can fit them all and everyone settles with the least annoying one or starts their own.
Personally, I've found that since breaking up with macOS/iOS in 2020 my most missing feature is using my headphone remote to control volume or skip songs without taking my phone out of my pocket / touching my keyboard. It's still in my muscle memory, because I'm using my iPod Nano 7 to listen to audio books a lot and while every iPod and MacBook does support this, Linux capable notebooks don't.
Besides this single feature, for music I found navidrome with smart playlists[2] and Substreamer[3] / DSub[4] to be a great way to listen to local music, since Substreamer supports OFFLINE sync for playlists. So every time I get home I sync my smart playlists, which includes a "last played" filter / ordering - so I get to listen to "new" music every time.
Unfortunately the headphone remote stuff probably will never be fully fixed on Android, because google chose to block "longpress" on OS level for their own Voiceover, but like I said: The least annoying option.
For audio books I can recommend Audiobookshelf[5], which is self hosted and can be combined with the official Android app or some third party ones (Lissen, Storii and Voice from Paul Woitaschek). I'm probably sticking to my iPod until it dies completely - but lately I found the HiBy R1 to be Linux based and hackable[6], maybe I try to implement my own player / UI for it :-)
> I’ve got no pre-rewrite history of the repo to check).
I love this type of story, because it describes a different Internet that I'm familiar with. And honestly it sounds pretty rough out there! But regardless, we all should be using some kind of version control (git), and as an added bonus you'd get your pre-rewrite history from it.
I mean they mentioned they had the code on codeberg initially, so it must have been in a git repo before. Maybe they just did the ol' `rm -rf .git && git init .`
This post makes no sense. The author goes from having no internet due to a bombardment to LLM'ing. I find it hard to share the plight of a warzone when they go unhinged to build their own audio player afterwards (?!). If I want a music player every OS comes with one, and phones hold enough storage. USB thumb drives are also good. Failing that, burning CDs and using rechargeable batteries is another off-the-grid solution that will work fine, and CDs are easily transportable and will last for decades. Slightly physically damaged CDs are somewhat resilient and can be brought back to life with toothpaste, so they're somewhat "better" than files which shit the bed if there is any data corruption.
It's been under my skin for a long time now, but every single free music player app I've used in the past 8 years plays my locally stored mp3s in the exact same order each time the shuffle button is on. Many others complain about that too.
I don't know if it's happening on Android OS level, but even VLC, plays songs in the exact same predictable order. I've left support notes on VLC's forums, and submitted the issue to issue cues and there are no responses each time.
None of that encourages me to pay for a premium app, shuffle has been around since CD changers.
I would rather have the same "random" order than what Spotify does; random never plays some songs, and overplays other. I get true random has the possibility of that, but when I've heard the same song for the 4th time in an hour, on a 20-hour playlist, something is wrong.
It sounds like maybe what you want is to have the "shuffle" mode play songs close to truly randomly while still penalizing songs that have been played too much recently. This gives us an optimization problem:
where β is an inverse temperature determining how much you dislike repetition and π is your policy. Here I've arbitrarily chosen a reverse KL divergence because it leads to a nicer closed form: I wonder if anyone has implemented this before in a music playlist.I have this issue with youtube music only for some reason. For me "Shuffle" seems to be starting random, then after a handful of songs entering a loop of 6 or 7 songs. I never figured out why or looked it up, I just refresh the page. I know it must be only me somehow, but don't know what's happening.
I think you can have a rss feed of your playlist, you could grep the urls, | rand them like you want and play with mpv or just download everything with yt-dlp.
My car's player (reading from a flash drive full of MP3s) doesn't have "shuffle", it has "random". The difference is subtle, but it means that each time it advances to a new track, it selects that at random. The result is that I never hear all the tracks in an album/playlist without hearing a bunch of repeats. Infuriating!
But when I play from my phone or PC, I use PlexAmp (backed by my Plex media server), which is the opposite extreme. Not only does it know what randomly shuffling is, but the server has analyzed the sonic profile of every track, and knows about similar artists and similar albums. So you can play an "artist radio" featuring that artist and other related stuff. And you can choose an auto DJ, which inserts between tracks the closest sonic match to the song it just played, or a brief detour of about 3 tracks that are spaced along the path from the track that just played to the one that's about to play. It's fantastic for discovering stuff you haven't heard in a long time within a very large library.
Pretty much every USB music player has the same faults:
1. shuffle play does not work
2. crashes if there are more than N songs
3. does not find songs in subdirectories
All of these are trivial to fix. I do not understand the programmers who make the firmware.
wow hacker news wins again. i am going to fix these in my music player. i think 2 & 3 are chill already... and i can totally fix 1. thanks!
To implement shuffle play, it is not necessary to actually shuffle filenames in memory. Just generate a random number modulo the number of files, and then play that file. That way your program can shuffle play any number of files, no worries about running out of memory.
By the way, the Roku box has a "media player" app in it by default, and it cannot shuffle play more than a handful of files. Completely useless.
[delayed]
BTW, Windows Media Player is the winner, as it "just works". Just point it at the root directory of the music files, turn on shuffle play, and it works, and doesn't crash.
Amperfy for the Iphone randomizes the shuffle.
I just looked at the code and it's apparently using the Fisher-Yates shuffle with a call to arc4random each pass. It's literally eight lines of Swift!
I've never suggested this before, but if the Android app store has truly been as bad as you claim for as long as you claim, you should seriously consider buying an Iphone to solve your problem.
Is what you call the "shuffle button" a "shuffle playlist" button or a "shuffle mode" button? There is a subtle difference between those two and for what I understand you want the second
Most people want the second - if they hit it, it picks a random song, and then plays all of the remaining songs randomly before repeating.
Few people want to shuffle the playlist (which is closer to above) or worse, to actually randomly select a song each time.
"AMP" is unfortunately close to "AIMP", another music player. (https://aimp.ru/)
And Winamp.
Musicolet for android has a shuffle, and also folder view, that works very well. Truly shuffled up.
Interesting Story. Starting my own hardware music player as a learning project[1] (that will probably take years until the first release) I noticed how MANY music player projects are out there (software and hardware ones).
This seems to be a field with so many different approaches and requirements, that no solution can fit them all and everyone settles with the least annoying one or starts their own.
Personally, I've found that since breaking up with macOS/iOS in 2020 my most missing feature is using my headphone remote to control volume or skip songs without taking my phone out of my pocket / touching my keyboard. It's still in my muscle memory, because I'm using my iPod Nano 7 to listen to audio books a lot and while every iPod and MacBook does support this, Linux capable notebooks don't.
Besides this single feature, for music I found navidrome with smart playlists[2] and Substreamer[3] / DSub[4] to be a great way to listen to local music, since Substreamer supports OFFLINE sync for playlists. So every time I get home I sync my smart playlists, which includes a "last played" filter / ordering - so I get to listen to "new" music every time.
Unfortunately the headphone remote stuff probably will never be fully fixed on Android, because google chose to block "longpress" on OS level for their own Voiceover, but like I said: The least annoying option.
For audio books I can recommend Audiobookshelf[5], which is self hosted and can be combined with the official Android app or some third party ones (Lissen, Storii and Voice from Paul Woitaschek). I'm probably sticking to my iPod until it dies completely - but lately I found the HiBy R1 to be Linux based and hackable[6], maybe I try to implement my own player / UI for it :-)
1: https://github.com/nanowave-player/nanowave-ui
2: https://www.navidrome.org/docs/usage/features/smart-playlist...
3: https://substreamer.org/
4: https://f-droid.org/de/packages/github.daneren2005.dsub/
5: https://github.com/advplyr/audiobookshelf
6: https://github.com/Jepl4r/sonix-player
> I’ve got no pre-rewrite history of the repo to check).
I love this type of story, because it describes a different Internet that I'm familiar with. And honestly it sounds pretty rough out there! But regardless, we all should be using some kind of version control (git), and as an added bonus you'd get your pre-rewrite history from it.
I mean they mentioned they had the code on codeberg initially, so it must have been in a git repo before. Maybe they just did the ol' `rm -rf .git && git init .`
This post makes no sense. The author goes from having no internet due to a bombardment to LLM'ing. I find it hard to share the plight of a warzone when they go unhinged to build their own audio player afterwards (?!). If I want a music player every OS comes with one, and phones hold enough storage. USB thumb drives are also good. Failing that, burning CDs and using rechargeable batteries is another off-the-grid solution that will work fine, and CDs are easily transportable and will last for decades. Slightly physically damaged CDs are somewhat resilient and can be brought back to life with toothpaste, so they're somewhat "better" than files which shit the bed if there is any data corruption.
The point is that the author wrote the music player app because they wanted specific features and for their own pleasure/coping.