On 2016-06-02 09:25, Claude Heiland-Allen wrote:
> On 02/06/16 08:09, IOhannes m zmölnig wrote:
>> On 05/31/2016 05:50 PM, IOhannes m zmoelnig wrote:
>>> i really like the powers of the new [osc*] objects for these kind of
>>> things.
>>
>> here's an updated example, that properly generates numbers in to 0..1
>> range.
>>
>> it has full 24bit of (pseudo) randomness.
> 
> But the distribution is not uniform (lower third is twice as likely as
> the upper two thirds of the range).  See attached for a test.

sigh indeed.
it also misses a few values altogether.

so here's an update which i think has these issues fixed.
at least your probability plot shows no anomalies, and it now uses all
23bit of the mantissa for randomness rather than just 20bit.

fgasdrm
IOhannes

#N canvas 1285 163 778 607 10;
#X obj 170 293 oscparse;
#X obj 170 269 list prepend 47 97 0 0 44 102 0 0;
#X obj 170 315 list split 1;
#X obj 170 139 t b b b b;
#X obj 170 117 inlet;
#X obj 210 387 outlet;
#X obj 170 235 pack 63 0 0 0;
#X obj 199 205 | 128;
#X obj 210 341 - 1;
#X obj 228 187 random 256;
#X obj 259 209 random 256;
#X obj 199 163 random 128;
#X connect 0 0 2 0;
#X connect 1 0 0 0;
#X connect 2 1 8 0;
#X connect 3 0 6 0;
#X connect 3 1 11 0;
#X connect 3 2 9 0;
#X connect 3 3 10 0;
#X connect 4 0 3 0;
#X connect 6 0 1 0;
#X connect 7 0 6 1;
#X connect 8 0 5 0;
#X connect 9 0 6 2;
#X connect 10 0 6 3;
#X connect 11 0 7 0;

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to