The art of shuffling music
keyj.emphy.de
keyj.emphy.de
1. Don't repeat songs too soon. A record of the last 100 or so songs should be enough and doesn't use much memory. If shuffling a short playlist or album, don't repeat until they've all been played.
2. Don't attempt to group similar sounding songs together. I've never seen an algorithm succeed at this and it serves no aesthetic purpose. If I want to maintain a mood, I'll create a playlist, select songs manually, or just hit skip.
3. Don't ignore new material. If I add, rename, or reorganize music I don't want to do anything special for it to be included in the shuffle.
4. Don't roll your own random algorithm. Ever since shuffle play was introduced as a feature on CD players, there have been algorithms that will play the same N out of X songs in a collection, clearly using some kind of modulo-based function instead of a good quality PRNG. If your algorithm can permanently exclude songs, it's broken.
None of this helps with songs that should remain part of a suite or have a segue that is abruptly clipped, but some of those shouldn't be separate tracks to begin with.
I think iPod's shuffle was originally truly random at first and it was changed - I'm reminded of this thread from a while back - https://news.ycombinator.com/item?id=4301922
The "random" mode would happily play songs from the playlist multiple times, even directly after one another; "shuffle" on the other hand would never play a song more than once per playlist. When I first got it I was fascinated by this difference – I still wonder why they included both modes.
What I want, and will probably never get round to implementing, is Markov chain playlist generation. Collect play order from (high-quality, human-generated) playlists, then use them to build Markov chains of tracks that tend to be played after one another.
Love. All that sweet Amarok 1.4 UX, untainted by the 2.0 branch shark jumping.
The playlist management just feels right, but the killer feature for me is the indexed library that provides instant searches - perfect for enthusiastically digging into a large collection.
Although it is an entirely different concept, Amarok and later Clementine are what convinced me to jump ship from the file explorer + Winamp-like combo that used to be my sweet spot.
Edit:
I believe it's discontinued now, or something. But also another plus was that it was quite fast at starting up. I got it due to my frustration with how slow iTunes had become. It's hard to find anything close to 'iTunes' as well.
Something: https://github.com/clementine-player/Clementine/commits/mast...
* Keeps track of songs already played, so songs heard recently won't be played as much as songs not played recently
* If Control-C is pressed while listening to a song, it will reduce the frequency the song is played
* If the song is listened through in its entirety, the frequency it will be played is increased
* Any new music just added will be given higher priority than old, already played stuff
* Songs from each directory are played more or less equally. So if you have 30 songs from the Beatles and 500 from Black Sabbath, you won't hear Black Sabbath 94% of the time.
* Keeps track of every time a song is played and whether it is liked or not, so if later you want to use this data for something else, you have it available.
You need to pass the songs to it's standard in, eg:
find /disc1/my_music -type f | the_player.pl
To stop listening, you need to hit Control-Z to stop it, and then kill the process.
Here it is: http://pastebin.com/N7vj1pSc
I have no idea what you're trying to say here. The lack of uniform distribution that results from random sampling is well known. The author even specifically elaborates on exactly what he's referring to in the text that immediately follows your quote.
Random numbers always clump. What people actually have in mind when they think of "random selection" is almost always a sample that visits every part of the space with roughly equal frequency ("uniform"). See e.g. http://en.wikipedia.org/wiki/Halton_sequence .
Uniform random selection is "fair" and "uniform" before the selection happens. But not afterward. What this guy, and most music listeners, want is selection that visits every song in a "fair" and "uniform" manner after the selection has happened -- they care about what the result is, not whether certain aspects of the result could have been predicted in advance.