[PD-dev] RNG

Miller Puckette mpuckett at man104-1.ucsd.edu
Tue Aug 27 17:59:59 CEST 2002


Hi Krzysztof,

I've never carefully tested the RNG in Pd, just typed out two huge
numbers with my eyes closed, and never read that part of Knuth...
If there's a good, simple cross-platform random number generator I'd be
happy to use it, but I wouldn't trust anything native to Windows.
Finally I could find no better solution than to write my own, bad
one.  I did listen to noise~ output (sounded OK), looked at its spectrum
(looks mighty flat) and did a histogram on a "random 10" (got 10 roughly
equal numbers).

I think I did the same thing in the original Max but by now it might be
replaced with something better, I dunno...

cheers
Miller


On Tue, Aug 27, 2002 at 04:33:11PM +0200, Krzysztof Czaja wrote:
> hi Miller and others,
> 
> as I have resumed cyclone hacking today (after a long break),
> I would like to finish coding the 'random' family first.
> 
> Not being even close to an expert on random number generators,
> I have borrowed the two used in the 'random' and 'noise~'
> builtins.  Today, just in order to have a quick try, I have used
> them to produce an input for the 'diehard' set of tests.  Now
> I have three questions:
> 
> 1. Before I start learning how to correctly interpret all the
> results -- have been such, or similar, or any kind of tests,
> performed for the Pd rngs?
> 
> 2. Seeing that the one used in noise~ (d_osc.c) has suboptimal
> period length (2^{30}), I wonder if this does matter for the
> `whiteness' of the output, or does not?  (The multiplier
> a = 435898247 fails the property of b = a - 1 being a multiple
> of 4 -- this is in Knuth 3.2.1.2, at least in a Polish
> translation:)
> 
> 3. Waiting for a return of our mac used for checking things in
> max/msp, I am not able yet to check what kind of output max/msp
> rng produces.  Any hint?
> 
> thanks,
> Krzysztof
> 
> 
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.kug.ac.at
> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev




More information about the Pd-dev mailing list