Old 11th August 2005, 17:02   #1
tastegood
Junior Member
 
Join Date: Apr 2005
Posts: 20
need a 'smarter' shuffle!

I noticed that the devs implemented a new random number generation with 5.094, so I was hoping that the days of putting a playlist on Shuffle and hitting the same songs in gigantic playlists was over.

Sadly, I am still getting frequent repeats in shuffled 5000+ song playlists!

I think Winamp is a terrific piece of software and I could not live without the Media Player. And to be honest, I'm not the sort who puts the entire 19000+ song collection on random all that frequently. But when I do, I expect tracks not to repeat.

I happen to write code for a living and am sure that Shuffle could be implemented in a better fashion. While I don't know for sure how things are working under the hood, it seems like the software is relying exclusively on a random number generator which can be seeded in different ways according to the "shuffle morph rate" slider in the preferences.

From my perspective, there is no reason to rely solely on a random number generator. Shuffle should be taking additional steps to ensure that tracks do not repeat. Anytime the user presses the shuffle button, winamp should be tracking which songs have been played under the hood. If the random number generator returns a track that has been played in the current shuffle session, it should try again. I imagine songs in the media library already have some integer unique ID, or perhaps one could build a hash table using the track titles. Even just using the number in the playlist and forbidding the repeated playback of the same track index would probably lead to better results! Yes, this would involve some additional memory overhead as the app would have to build some kind of data structure to track the current 'shuffle session' or whatever, but personally, I think it would be worthwhile.

One could imagine a couple of nice checkboxed options for a "smarter" shuffle feature -- it would be nice to forbid the song selection process from choosing the same artist more than once, for example. I have been listening to large portions of my collection on random over the past .. say .. 6 hours at work, and I have heard 4 Damien Jurado songs and 4 Yo La Tengo songs in that period of time. Sure, it's statistically possible that this is what the random number generator has returned, but I want random to mix things up a little more than it currently is.

Anyway, just wanted to mention my beef with shuffle and offer a suggestion to the devs. Winamp is such an excellent application in general that this one shortcoming makes me rather sad

cheers,
dave
tastegood is offline   Reply With Quote
Old 11th August 2005, 18:14   #2
Benski
Ben Allison
Former Winamp Developer
 
Benski's Avatar
 
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
If you have shuffle on and are playing a 5,000 song playlist:

In 10 songs, you have about a 1% chance of having a repeat song.
In 20 songs, you have about a 4% chance of having a repeat song.

Assuming 10 songs per album:

In 10 songs, you have about a 3% chance of having a repeat album.
In 20 songs, you have about a 7.5% chance of having a repeat album.

Scale that over 6 hours, and yeah, you have a a pretty reasonable chance of hearing things twice and hearing a few cuts from the same album.

No amount of programming can remove the law of large numbers and statistics
Benski is offline   Reply With Quote
Old 11th August 2005, 19:03   #3
tastegood
Junior Member
 
Join Date: Apr 2005
Posts: 20
You miss my point entirely.

Shuffle does not have to be strictly dice-rolling. It can be tuned to select songs based on certain parameters, such as, say, whether or not the song has played in the current session.

Here's a pseudo-code example. Instead of:

code:
int random_choice = rand() % playlist.size;


one could do:

code:
int random_choice;
while ( true )
{
random_choice = rand() % playlist.size;
if ( ShuffleShouldAllow( playlist[random_choice] ) )
break;
}
play_track(random_choice);



Define ShuffleShouldAllow and add some logic to prevent runaway loops and such and you'll see what I'm driving at.

I understand the statistics behind random numbers; my argument is that choosing a random song based strictly on a random number is a sub-optimal way to implement a 'shuffle' feature.

People can inherently sense that shuffle does not "feel random enough" because the user expectation is that variety = randomness.
tastegood is offline   Reply With Quote
Old 12th October 2005, 02:42   #4
ftothe3
Junior Member
 
Join Date: May 2005
Posts: 20
I have the same exact problem. Any update on this?
ftothe3 is offline   Reply With Quote
Old 12th October 2005, 10:03   #5
CaptainFuture
Junior Member
 
Join Date: May 2004
Location: Germany, Old Europe
Posts: 23
It's not exactly what you're looking for but at least it solves the repetition of songs in the playlist. Choose "misc" at the bottom of the playlist editor, then "sort" and "randomize list".
CaptainFuture is offline   Reply With Quote
Old 13th October 2005, 06:16   #6
peaceofcake
Senior Member
 
Join Date: Sep 2003
Posts: 333
Interesting to hear a programmers take on this problem. How long do you think it would take to impliment this, an hour or so?
peaceofcake is offline   Reply With Quote
Old 17th April 2006, 19:55   #7
ikon_zero
Junior Member
 
Join Date: Apr 2006
Posts: 1
I agree... it's somewhat absurd that this issue hasn't been resolved since i've been using winamp for, what, 10 years? unfortunately this reminds me a lot of the type of thing that goes on at my own company. ugh

all I want is for winamp to be able to do what my ancient sony discman can. is that so much to ask?
ikon_zero is offline   Reply With Quote
Old 17th April 2006, 20:45   #8
Thunder Pussy
Feed me a stray dog
(Major Dude)
 
Join Date: Oct 2004
Posts: 1,122
Playlist File Remover = no more repeats, thanks DrO.

It's not exactly the same feature but it fixes the problem.
Thunder Pussy is offline   Reply With Quote
Old 18th April 2006, 13:52   #9
zackbuffo
Member
 
zackbuffo's Avatar
 
Join Date: Jan 2002
Location: Germany (Old Europe)
Posts: 97
Good point tastegood, I totaly agree.

I thought about that point since - i don't no - winamp 2.something: Winamp-Team, eliminate the double or triple or even more plays in shuffle mode!!!

I'm not into programming so I had no idea how easy this could be solved. It's seems not to be very hard.

Since I always listen to music in shuffle mode, i use the workaround described above: misc > sort playlist > randomize

Not very satisfying.
zackbuffo is offline   Reply With Quote
Old 25th April 2006, 20:28   #10
swingdjted
DRINK BEER NOW
(Forum King)
 
swingdjted's Avatar
 
Join Date: Feb 2006
Location: Northern West Virginia
Posts: 9,990
Send a message via AIM to swingdjted Send a message via Yahoo to swingdjted
First relax - both of the the above suggestions solve the problem perfectly:

workaround by going to Misc > sort playlist > randomize

or

the playlist file remover.

I depend on and use both quite often and I have had no complaints since discovering these.

Don't forget to live before you die.
swingdjted is offline   Reply With Quote
Old 26th April 2006, 13:46   #11
zackbuffo
Member
 
zackbuffo's Avatar
 
Join Date: Jan 2002
Location: Germany (Old Europe)
Posts: 97
Quote:
both of the the above suggestions solve the problem perfectly
If you solve every malfunction of a piece of software with a workaround, there's no need for a update in the end!? In other words you say "there's no need to improve the software, if you can make it work somehow". I don't think that's a proper way to handle the wishlist.

You have to admit, that a shuffle mode that repeats some songs before playing others just once, doesn't makes much sense or at least doesn't work as smart as a shufle mode could.

If you don't want to change it, you could finally remove shuffle mode in the next WA-release. We do have the workarounds...!!!
zackbuffo is offline   Reply With Quote
Old 28th April 2006, 04:19   #12
peaceofcake
Senior Member
 
Join Date: Sep 2003
Posts: 333
Well couldn't it simply look at the recently played listings in the media library and not play them withing a certain period of time. This needs to be automatic or you exclude almost all users from the desirable shuffle behavior. Most people just say fuck it and use iTunes or something else, they don't know you can modify winamp or want to use a convoluted method where you cannot return to the previously played file.
peaceofcake is offline   Reply With Quote
Old 28th April 2006, 05:17   #13
swingdjted
DRINK BEER NOW
(Forum King)
 
swingdjted's Avatar
 
Join Date: Feb 2006
Location: Northern West Virginia
Posts: 9,990
Send a message via AIM to swingdjted Send a message via Yahoo to swingdjted
If you randomize the list first and start at the top you have fixed 2 above mentioned concerns:

1.) no chance of playing same track twice unless you tell it to do so or if you tell it to repeat,

2.) you can very easily return to the previously played file (or the one before that or the one before that or the one before that or the one before that or the one before that...)

I do agree, the random mode you dislike isn't really worth using, which is why I either use the playlist file remover or the method listen in this post. These are enough to keep most happy. I hope this helps; if not hopefully developers will fix the problem that you have brought to the table.

Don't forget to live before you die.
swingdjted is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Wishlist

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump