Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to improve the shuffle feature (Read 7954 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to improve the shuffle feature

make a boolean array the size of the playlist, set everything to false, when a track is played, it sets it to true... and if shuffle moves back to that track and it is set to true... it will scip to another file... and when all the files are set to true... reset them all to false and do it all again...

just sumthin i thought would be good so you dont keep getting the same 5 songs played constantly more than the other 500 entrys in the list...

Thanks

Bizzy D

How to improve the shuffle feature

Reply #1
easier said than done...?

How to improve the shuffle feature

Reply #2
no.. shouldnt be to hard.. hell it could even be done in vb never mind c++

How to improve the shuffle feature

Reply #3
Yeah, imo 'shuffle' isn't shuffle if it repeats tracks.  If it repeats tracks, then thats just random play, not shuffle.

How to improve the shuffle feature

Reply #4
Quote
Yeah, imo 'shuffle' isn't shuffle if it repeats tracks.  If it repeats tracks, then thats just random play, not shuffle.

Oh, details again...
When you shuffle cards, you do it randomly, no? Then, what do you do? Line them up so you can see the order you got and use this order or fix it? Or is the shuffling's purpose to make things random, so that you don't know the order of the cards? The second is the right answer.

How to improve the shuffle feature

Reply #5
Anyway, since "random play" indeed will be the most accurate description of this, so that no one will mistake  (ALTHOUGH all other audio players call it shuffle) the name can simply be changed to "random play". Personally, i think shuffle is just right, since the only purpose of "shuffle" in an audio player is to make things random.

How to improve the shuffle feature

Reply #6
The deck of cards analogy isn't really appropriate.  The question is simply what behaviour is best - a "true random", or a "semi-random" that takes into account which tracks have played in the past.

One nice solution I've seen is in the Apollo player, where there is a configuration item something like the following:

"In shuffle mode, ignore the last n tracks played"

If n=0 you get "true random", otherwise you get a random as "semi" as you like.  An obvious default value would be 1.

How to improve the shuffle feature

Reply #7
Quote
Quote
Yeah, imo 'shuffle' isn't shuffle if it repeats tracks.  If it repeats tracks, then thats just random play, not shuffle.

Oh, details again...
When you shuffle cards, you do it randomly, no? Then, what do you do? Line them up so you can see the order you got and use this order or fix it? Or is the shuffling's purpose to make things random, so that you don't know the order of the cards? The second is the right answer.

i don't know what your talking about...  my point is that in the audio world there are two different features, shuffle and random play.  my car stereo for instance only has random play, which repeats songs, whereas my cd changer has shuffle, which  doesn't repeat songs.

How to improve the shuffle feature

Reply #8
For some people that could be a damn big array 
Master of Fate. By Fate Mastered

How to improve the shuffle feature

Reply #9
boolean datasize is 4 bytes (dont know why its 4 bytes when it could be done in 1 bit)... so... if ur playlist is 1024 songs... thats only 4k of memory..

id say 4k per 1024 songs is a worthy sacrifice for a more truly random shuffle

Bizzy

How to improve the shuffle feature

Reply #10
To start with I think you have to give Peter a little more credit that that, I'm pretty sure he could implement a boolean array using 1 bit/track if he wished to.  But if you want to play all you tracks in a random order and not have them repeat why not just randomise your playlist and use the linear play?

How to improve the shuffle feature

Reply #11
i like the idea of a boolean array... altho with ~10000 songs thats like at least 40k of memory (*GASP*)

anyways the reason to not just randomize then have linear is, what if you want to listen to a particular song, then it is all in order (lord knows i spent hours making a sort string) then but if you dont know exactly what you want to listen to, then you can put it on shuffle.

How to improve the shuffle feature

Reply #12
Quote
The deck of cards analogy isn't really appropriate.  The question is simply what behaviour is best - a "true random", or a "semi-random" that takes into account which tracks have played in the past.
    [/li]
I have to say I think the deck of cards analogy is very appropriate. I'm not sure if SK1 was using it correctly though.

When you shuffle a pack of cards your intention is to get a "random" order of cards in it. All random means here is "as different from how it was before you shuffled as possible" (given how much time you are prepared to shuffle it for). ie you don't want to get the same sequences as last time you used it.

That is the same as "randomize playlist" in foobar2000 - you now have a pack of cards (tracks) waiting to be played.

When you then use the pack of cards you remove the each card from the pack. This means that, provided you are only using one pack (i.e. no duplicates in your playlist), you will never get the same card (track) for the duration of that game (that playlist).

This is actually how CD players with shuffle implemented properly will "deal" your tracks to you. That is easily implemented on a small scale (maximum theoretically 99 tracks in the audio CD spec I think) in hardware.

From the reports of people here it would appear that "shuffle play" mode in foobar2000 doesn't do this. It's method is akin to playing a card game where you have a pack (shuffled or not it doesn't matter) and then each turn of your game you take a random card from the pack and then return the card to the pack at the end of the turn. This means that you have a (theoretical) chance of choosing that card again some time in the future during that game.

The odds of picking that track again depend on how randomly you choose from the "pack" each time and the more times you pick from the "pack" the more chance there is that you will pick a repeated track. Someone has mentioned elsewhere in the forum a mathematical method of ensuring that you choose a new track each time without needing to remembering any of the previous tracks. This only works on a single instance of the playlist of course.. as soon as you change it you risk repeated tracks but it is still a strong method and could be great if implemented well.

The other complaint people seem to be making is that they want to be able to move back in the "shuffled" list. This is akin to keeping the dealt cards in a pile (in the order that they were dealt) so when you want to go back to a previous card you can just pick cards back up until you find it.

I believe that this is what was implemented as a "hack" before about .56/7. Peter said that he may reintroduce a history for the random play mode in the future but he obviously has other things he is doing which are more important (to him). I expect, since he described the previous method as a hack, he is looking for a new method which satisfies him as the optimal method (he appears to like optimality - no complaints from me on that!).

So perhaps rather than complaining, people should attempt to think of optimal ways of implementing this feature..

In conclusion:
  • shuffle play mode chooses tracks from the playlist with replacement and no history
  • the random play action chooses a new track on the same criteria as shuffle play
  • randomize playlist shuffles the playlist into a new order
  • the next and previous actions choose the next and previous tracks in the displayed playlist
  • the above are currently all intended behaviour (for now)


How to improve the shuffle feature

Reply #14
shouldn't we have a forum FAQ to avoid at least some of these questions being repeatedly asked and answered? Obviously the answers should be a bit shorted than mine above (I got a little carried away  !)

How to improve the shuffle feature

Reply #15
teetee, well that time you spent was worth it  a much better explaination than mine.
Yes, Peter said he will add "civilized" history features some time. No estimation as to when at all, but it will be added.
To all those "leaving fb2k for xxx player", remember this:
Quote
what's the difference between wa2 and fb2k? there are things wa2 does and fb2k doesn't do yet. and there are many other things fb2k does while wa2 will *never* do them