Random Not Random... Continued (Beta27)

Hi Again Devvvvs

Some time ago I posted about random not being random in Beta27.

since then a fix came out and the ChangeLog under fixed nodes said

I am Currently working on a system running Beta27 using VLC Player, I tried using beta27.1 but it seemed to mess up VLC player, so I gave up on that after trying for quite some hours and reverted back to beta27 and VLC 0.3.

I am making a video shuffler randomly shuffling between video clips in a folder so I need to use random to get new clips. To avoid using integer mode that is not evenly distributed, I am using random with integer set to 0 and the through map and frac to make integers to choose between the videofiles.

I have suspected that it is not completely random since it seem to be mainly certain files being selected (in this case mainly file number 0).

but when I click the IOBox that I have made that instantly selects a new file, I get nice and seemingly random numbers, if I instead let the video clips run and let them enable the random node through the same or node I do not get numbers distributed the same way.

a short run reveal these numbers:

0.0000:0.3312:0.0314:0.0000:0.2842:0.5551:0.0000:0.1570:0.0314:0.0000:0.0314:0.0000:0.8379:0.0000:0.0314:0.0000:0.0314:0.0000

Resulting in these files being selected:

0:0:2:0:0:2:4:0:1:0:0:0:0:6:0:0:0:0:0

I know it is not a long run of files, but my experience says it is generally like this. especially I notice the frequency of 0.0000 and 0.0314

So what puzzles me:

1: the numbers are not random, with an overweight of 0.0000 and 0.0314
2: When I force new numbers manually using Next Video then the numbers seem to be quite random.

I have not been able to reproduce this behavior in a simpler patch, so I have attached the player I have made, sorry for the mess, I am trying to debug.

Any ideas of how to fix this, It seems to be playing fine, just does not select files randomly… I am thinking about something using randomspread. for a temporary fix.

-sunep

CrossfadePlayer.v4p (44.0 kB)

I see you send NIL into the “filename in” pin of VLC. That won’t work well, please add an AvoidNIL in between, and I suppose that will make it work in beta27.1.

(And although you wouldn’t expect big differences between 27 and 27.1, VLC for beta27 won’t run under 27.1 and vice versa, so be careful to use the right version).

tested it in 27.1 and it works, the random values look pretty random… only that i always have to press next to get a new video. is it supposed to be like this or should the videos cycle automatically?

@ft I tried again, but the whole swapping the pluging messes it up… I have gotten quite used to everything in the addonpack so swapping the plugin confueses me and it did not really work… but maybe it is me. Will the VLC plugin get to stay in the addonpack now that vlc is lgpl? that would be music in my ears.

@tonfilm the videos do shuffle “randomly” to the next video once the first video has come to the end minus the crossfade time where the next video will begin playing and fade itself in when the running video fades out.