Author Topic: random play, not very random ??  (Read 10482 times)

ab-user

  • Posts: 15
random play, not very random ??
« on: 31 Mar '12 - 00:50 »
I was wanting to know what sort of randomization subroutines are being used to generate the next track in a playlist. I keep hearing the same songs over again, I've got 800 tracks in a playlist want to hear some of the others...
is there some sort of 'better' random play plugin ?
BTW if I rate a track in my library a 5 star, will it play more ?

saga

  • Posts: 2179
Re: random play, not very random ??
« Reply #1 on: 31 Mar '12 - 12:36 »
I'd guess XMPlay uses a normal pseudo random number generator like every other program does. It does not, however, keep track of which songs have been played already, so it's possible that a song is played twice before all other songs have been played.
If you don't trust XMPlay's random behaviour, you can also randomise the playlist instead and not use random play behaviour anymore.

Dotpitch

  • Posts: 2871
Re: random play, not very random ??
« Reply #2 on: 31 Mar '12 - 13:38 »
It does not, however, keep track of which songs have been played already, ...
It does, actually, in xmplay.pls.

I was wanting to know what sort of randomization subroutines are being used to generate the next track in a playlist. I keep hearing the same songs over again, I've got 800 tracks in a playlist want to hear some of the others...
Is XMPlay playing the same songs during a single session, or does it play the same order when you re-start XMPlay? Could you note down which numbers it is playing? Do you have duplicates in your playlist?
is there some sort of 'better' random play plugin ?
No, XMPlay doesn't support such plugins.
if I rate a track in my library a 5 star, will it play more ?
No, random doesn't look at your ratings.

123nexus

  • Guest
Re: random play, not very random ??
« Reply #3 on: 31 Mar '12 - 18:32 »
same here :/

ab-user

  • Posts: 15
Re: random play, not very random ??
« Reply #4 on: 31 Mar '12 - 21:01 »
It does not, however, keep track of which songs have been played already, ...
It does, actually, in xmplay.pls.

I was wanting to know what sort of randomization subroutines are being used to generate the next track in a playlist. I keep hearing the same songs over again, I've got 800 tracks in a playlist want to hear some of the others...
Is XMPlay playing the same songs during a single session, or does it play the same order when you re-start XMPlay? Could you note down which numbers it is playing? Do you have duplicates in your playlist?
is there some sort of 'better' random play plugin ?
No, XMPlay doesn't support such plugins.
if I rate a track in my library a 5 star, will it play more ?
No, random doesn't look at your ratings.

Hi, thanks for the reply Dotpitch.
I have posted my playlist settings in the attachment - as you can see I have the remove duplicates enabled.
Sometimes, I have noticed when I exit xmplay (unclean close) and then start it up again, the 'random' order will be the same.
Good to know that about the rated library tracks, I was having my suspicions.
It would maybe be interesting if the inputs of the mouse can be used to give the randomizer some true randomness. Much like some password generators.

Dotpitch

  • Posts: 2871
Re: random play, not very random ??
« Reply #5 on: 31 Mar '12 - 21:51 »
Sometimes, I have noticed when I exit xmplay (unclean close) and then start it up again, the 'random' order will be the same.
Is that the only case when XMPlay plays the same tracks, or does it also happen within one session?

Ian, does XMPlay pick a new seed every time it starts, or does it always use the same seed value?

ab-user

  • Posts: 15
Re: random play, not very random ??
« Reply #6 on: 31 Mar '12 - 22:11 »
Sometimes, I have noticed when I exit xmplay (unclean close) and then start it up again, the 'random' order will be the same.
Is that the only case when XMPlay plays the same tracks, or does it also happen within one session?

My unscientific estimation is some of one, some of the other.  :o

Jace

  • Posts: 825
Re: random play, not very random ??
« Reply #7 on: 4 Apr '12 - 09:20 »
I get the same orders tracks repeating VERY often, actually.
But it's basically only limited to when Find tracks is used with skipping all unmatching tracks. Blurb follows:

Okay, set up a wee gif animation of what I'm mostly going through. 11k+ tracks on playlist, using Find tracks option (with skipping non-matching enabled) to limit it to (in this case) one album. Also happens in larger samples, but not when playing all tracks on the playlist.

Starting conditions: No tracks selected, random play order disabled.
Enable random play order, select desired batch of tracks with Find tracks
Keep hitting play button with right mouse key (or 'Change Track - Random' hotkey)

First track is ALWAYS either the first or last song in the selected area. Then it keeps swapping to top and bottom of the selected batch, playing them more or less in order. Following gif animation shows three iterations through the album.



My uneducated guess as to what's happening: When XMPlay picks a random track, it's out of the whole playlist, not just the playable tracks portion. When the randomly selected track is set to be skipped, after a few more tries XMP just starts to go down (or up?) the playlist until it finds one which isn't designated to be skipped. Which is initially either the first or last track on list, then further in as the "border-songs" have been set as 'already played'. Rinse and repeat.

Quite possibly unrelated to what the OP is experiencing, but hey. :P

Ian @ un4seen

  • Administrator
  • Posts: 20389
Re: random play, not very random ??
« Reply #8 on: 4 Apr '12 - 14:27 »
My uneducated guess as to what's happening: When XMPlay picks a random track, it's out of the whole playlist, not just the playable tracks portion. When the randomly selected track is set to be skipped, after a few more tries XMP just starts to go down (or up?) the playlist until it finds one which isn't designated to be skipped. Which is initially either the first or last track on list, then further in as the "border-songs" have been set as 'already played'. Rinse and repeat.

Good guess! XMPlay does do something similar to what you describe. I think it should work reasonably well when the entire list is available for playback, but probably not if only a small block of tracks are available (with the rest set to skip) as in your example. Here's an update to try, which will hopefully work a bit better...

   www.un4seen.com/stuff/xmplay.exe

Jace

  • Posts: 825
Re: random play, not very random ??
« Reply #9 on: 4 Apr '12 - 17:10 »
Much more random now! (At least in my case)

ab-user, did that do anything for your issue?

ab-user

  • Posts: 15
Re: random play, not very random ??
« Reply #10 on: 5 Apr '12 - 22:36 »
Much more random now! (At least in my case)

ab-user, did that do anything for your issue?

I've just discovered this update to my thread and have downloaded the update, and will report back when I have got around to it.

ab-user

  • Posts: 15
Re: random play, not very random ??
« Reply #11 on: 6 Apr '12 - 00:39 »
yep, pretty much random play has been improved greatly. good work, Ian  8)  ;D

Ian @ un4seen

  • Administrator
  • Posts: 20389
Re: random play, not very random ??
« Reply #12 on: 6 Apr '12 - 15:46 »
Jolly good :)

ab-user

  • Posts: 15
Re: random play, not very random ??
« Reply #13 on: 8 Apr '12 - 04:39 »
well so far i've had a rew repeats but it's been a large improvement since last version

ridon

  • Posts: 4
Re: random play, not very random ??
« Reply #14 on: 19 Apr '12 - 08:47 »
 ;)

Joseph Collins

  • Posts: 11
Re: random play, not very random ??
« Reply #15 on: 10 May '12 - 11:05 »
Hello!  Sorry to bump this topic after a month, but this seemed to be the most appropriate place for this suggestion:

Is there currently -- or would it be possible to code in -- a way to make the "Random" function carry over from session to session via your Music Library?  I know not everyone keeps a full list of music files in their Library, but the way I figure it, it'd be nice if the music player would look at the Library, see that a music file has been played within the last X hours or X days, then skip over it until Y hours/days have passed unless there are absolutely no other files to play.  This would be very useful for pretty much everyone, from people with too much music to go through in an entire day, to people who just want a little more control over how soon it is before they hear the same songs over and over again.  I myself have 2,169 module files at 76 hours of play time, but even with the latest version of the music player (linked above), there's a noticeable amount of repeat.

Additionally, you could probably even carry this over to saved playlists if you wanted to.  I read earlier in the thread that XMPlay itself saves the "last play time" in its automatic playlist file.

Thanks for reading!  Cheers!

Ian @ un4seen

  • Administrator
  • Posts: 20389
Re: random play, not very random ??
« Reply #16 on: 10 May '12 - 17:10 »
The "already played" tracking does carry over between sessions, but it applies to playlist entries, not individual tracks. Duplicate playlist entries (for the same track) will each be considered separately, eg. a recently played entry won't affect the chances of duplicate entries being selected. So if you are hearing the same track repeated before the entire list has been played, perhaps there are some duplicate entries? That can be avoided by enabling the "No duplicates" option in the "Playlist" options page (use the "Remove duplicates" option in the right-click menu of the "Remove from list" button to remove existing duplicates). Also make sure you don't toggle the "Random order" option, as doing so will reset the played tracking.

Joseph Collins

  • Posts: 11
Re: random play, not very random ??
« Reply #17 on: 5 Jun '12 - 22:40 »
Originally posted on: 10 May '12 - 18:51
I was positive I didn't have duplicated playlist entries, but I tried your suggestion anyway.  Still 2,169 entries, still around 76 hours.  I haven't disabled Random Play since I reloaded my "modules" playlist and my Library file list hasn't changed since before that.  The longest amount of time it's been since a track has been played has been 44 days (not counting the 71 files that have never been played in the 44 days my Library kept track of these files, which is a mix of files old and new I might add).

I'm willing to admit that I'm wrong about the "xmplay" playlist file not tracking files, as after examining the file itself and doing a bit of testing with 37 files, it didn't start repeating files (as far as I could tell) until it was completely out of files to play.  The only thing I didn't try was rebooting after advancing a few files, as that's the only clear difference between my testing situation and my "everyday use" situation.  So maybe it's all in my head...  I can't say I have gone through all 2,169 files yet, since I just updated recently here.  So maybe those "44 days since last played" and "never played" statuses are just carried-over artifacts from v3.6.0.1...

Of course, it would still be nice if, when loading from the Library, there was a way for the music player to take into consideration the last time some files were played compared to others.  Like for example, auto-tagging files played in the last 7 days as "played", rather than keeping specific dates handy in the Library list or playlist files.  This would probably only be helpful to people to rapidly swap around their playlists a lot (like I occasionally do), though, so I'm probably in the minority here...

Thanks for your response, by the way!  It really got me paying closer attention to the mechanics of the program and its local playlist file, which got me thinking.  I'll get back to you on the randomness thing after I've played through 76 hours-worth of music.  Which will probably take a couple weeks, knowing me.  By the end of that period, I'll hopely not see any number higher than around "14 days" on my Library, though.  But we'll see!

*makes a note to use another media player if he has a sudden urge to listen to an entirely different playlist, for now*
Originally posted on on: 28 May '12 - 09:54
Alright.  That last idea of mine... I'm not sure actually panned out like I thought it would.  The longest "last played" on my Module library was indeed about 20 days or so (I stupidly emptied my library before I checked), but it still seemed like I was getting a number of repeats after playing the entire playlist, despite having only maybe one or two duplicate songs (with different file names)...  So!  I'm doing this instead:

I have a playlist of 1,630 files amounting to 48 hours of music.  I'm going to use this for my revised test, in which I've emptied my Library completely and turned off auto-scan for my MP3 folders, but enabled "Add to Library on play".  This will be a sure-fire way to see just how random this randomizer really is.  :D

Wish me luck.
Welp...  It's been eight days, and my Library reflects that exactly.  1,630/1,630 files have been played and, to the best if my knowledge, I did not detect a single duplicate that wasn't a duplicated file in and of itself.

My apologies, Ian.  Your coding is indeed very, very good and the randomization in the newest BETA version (linked above) is most definitely very random.  Kudos!
« Last Edit: 5 Jun '12 - 22:43 by Joseph Collins »

ab-user

  • Posts: 15
Re: random play, not very random ??
« Reply #18 on: 29 Dec '12 - 06:57 »
SO, i've just noticed there is a new update to xmplay (3.6)
i looked in the changelog from the readme
Quote
* Recently played tracks list with the option of going back
* List of last 5 track titles for internet streams in "Message" info
* Contains/equals/lower/greater tag searching options
* Search history available via search button menu and quick find option
* Automatic playlist replacement with library search matches
* Playlist history and quick loading/saving of entries
* Playlist saving of only the selected tracks
* Playlist entry removal after playback
* Sorting by album also considers track number
* Use of the track title when writing to file
* Internet streams that are paused too long auto-reconnect on resumption
* MP3/AAC internet stream writing without needing to reconnect
* Toggling/stopping of internet stream/file writing
* HTTP/FTP download support for Winamp plugins that don't include their own HTTP/FTP support
* Improved tag reading support for Winamp input plugins
* Support for Unicode-enabled Winamp input plugins, and support for exotic filenames with non-enabled plugins too
* Improved support for non-Unicode encoders
* Removal of empty tags from encoder command-line options
* FLAC encoder added to default encoder options
* Loop limiting to a specified number of times (instead of just once)
* Bookmark resumption at end of queue
* Window position locking
* Skin config customisation
* Visualisation refresh rate control
* Shift+left-clicking alternative to middle-clickng in "Vis" window
* Support for per-user vis config (VIS.INI)
* Amplification level resetting upon new subsongs
* Amplification slider range increased to +/-20dB in DSP options
* Output buffer range extended to 5 seconds
* History clearing by category
* More accurate MP3 seeking
* Ramping-in disabled for all but the XM format (and MODs in FT2 mode) in "normal" ramping mode
* Tracker detection for IT files
* Open folder option added to tray menu
* Support for archive file entries via DDE
* "replace [playlist] from library" and "write to disk" shortcuts
* Restarting/reloading of XMPlay
* Missing fonts warning not shown at startup
* CD plugin: Fix for drives with letter A
* CD plugin: CD-TEXT reading bug fix

but did NOT find 'improved random play'
so i'm worried - do i have to keep this beta version i have, or does the latest version carry on your fix to the random play Ian ?  ???

thanks for all the work ive been using xmplay for years

Dotpitch

  • Posts: 2871
Re: random play, not very random ??
« Reply #19 on: 29 Dec '12 - 09:43 »
do i have to keep this beta version i have, or does the latest version carry on your fix to the random play Ian?
3.7 has all the fixes/tweaks/features of 3.6.0.x, so you can safely upgrade.

Ian @ un4seen

  • Administrator
  • Posts: 20389
Re: random play, not very random ??
« Reply #20 on: 31 Dec '12 - 16:57 »
SO, i've just noticed there is a new update to xmplay (3.6)
i looked in the changelog from the readme
...
but did NOT find 'improved random play'
so i'm worried - do i have to keep this beta version i have, or does the latest version carry on your fix to the random play Ian ?  ???

That stuff is still present in the 3.7 release. The changelog was just getting a bit long, so I left off some of the tweaks :)

A more detailed changelog can be found on the Support Site...

   http://support.xmplay.com/article.php?id=118