<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks for looking into it so quickly. </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">
all the best,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Peiman</div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><br></div><div><font face="arial, helvetica, sans-serif"><br>
</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="comic sans ms, sans-serif"><b><a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> || <a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">RSS Feed</a> || <a href="http://spectralkimia.wordpress.com/" target="_blank">Concert News</a></b></font></div>
</div></div>
<br><br><div class="gmail_quote">On 22 November 2013 16:11, Miller Puckette <span dir="ltr"><<a href="mailto:msp@ucsd.edu" target="_blank">msp@ucsd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Aha and bngo! In effect - array random is only looking at the lower 1/2<br>
of the distribution. I made a stupid C data type fumble in the code.<br>
<br>
I recently tripped over a bug, too, in "text set" - will attempt to fix them<br>
both and issue an updated pd-0.45 in the next day or 2.<br>
<br>
Thanks for flagging this!<br>
<span class="HOEnZb"><font color="#888888"><br>
Miller<br>
</font></span><div class="im HOEnZb"><br>
On Fri, Nov 22, 2013 at 03:56:54PM +0000, peiman khosravi wrote:<br>
> Thanks. In this case I think something isn't right with [array random].<br>
> Using the same array, I get very different patterns with the two methods<br>
> (see attached patch). The difference is obvious with a gaussian<br>
> distribution, which looks skewed when generated with [array random].<br>
><br>
> Best,<br>
> Peiman<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
</div><div class="HOEnZb"><div class="h5">> *<a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> <<a href="http://www.peimankhosravi.co.uk" target="_blank">http://www.peimankhosravi.co.uk</a>> || RSS Feed<br>
> <<a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">http://peimankhosravi.co.uk/miscposts.rss</a>> || Concert News<br>
> <<a href="http://spectralkimia.wordpress.com/" target="_blank">http://spectralkimia.wordpress.com/</a>>*<br>
><br>
><br>
> On 22 November 2013 15:48, Miller Puckette <<a href="mailto:msp@ucsd.edu">msp@ucsd.edu</a>> wrote:<br>
><br>
> > There could be something wrong. But array_random_bang() (in x_array.c)<br>
> > cooks up a pseudorandom number from 0 to 1 (I believe) and then calls<br>
> > array_quantile_float() with it. That's exactly what connecting random()<br>
> > to array_quantile in a patch should be doing.<br>
> ><br>
> > cheers<br>
> > Miller<br>
> ><br>
> > On Fri, Nov 22, 2013 at 09:38:59AM +0000, peiman khosravi wrote:<br>
> > > Thank you very much. That does the trick.<br>
> > ><br>
> > > Though, [array random] doesn't seem to be working as I expected. Am I<br>
> > right<br>
> > > to think that it should produce the same result as [array quantile] fed<br>
> > > with uniformly distributed random values? If so I'm getting very<br>
> > different<br>
> > > results here.<br>
> > ><br>
> > > Thanks<br>
> > > Peiman<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > *<a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> <<a href="http://www.peimankhosravi.co.uk" target="_blank">http://www.peimankhosravi.co.uk</a>> || RSS Feed<br>
> > > <<a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">http://peimankhosravi.co.uk/miscposts.rss</a>> || Concert News<br>
> > > <<a href="http://spectralkimia.wordpress.com/" target="_blank">http://spectralkimia.wordpress.com/</a>>*<br>
> > ><br>
> > ><br>
> > > On 22 November 2013 04:16, Miller Puckette <<a href="mailto:msp@ucsd.edu">msp@ucsd.edu</a>> wrote:<br>
> > ><br>
> > > > I think the patch is occasionally (once every 512 times on average)<br>
> > sending<br>
> > > > zero to "array quantile" which then outputs the index of the first<br>
> > nonzero<br>
> > > > number in the table -- in this case a point with probability about<br>
> > 1e-45.<br>
> > > ><br>
> > > > Maybe try random 1e8 (or so) and divide by 1e8 to get a more<br>
> > continuous,<br>
> > > > less grainy random sample out of the array.<br>
> > > ><br>
> > > > cheers<br>
> > > > Miller<br>
> > > ><br>
> > > > On Fri, Nov 22, 2013 at 01:51:19AM +0000, peiman khosravi wrote:<br>
> > > > > Hello,<br>
> > > > ><br>
> > > > > Has anyone got any experience with [array quantile]?<br>
> > > > ><br>
> > > > > I'm getting some strange results and I've done everything I can<br>
> > think of.<br>
> > > > ><br>
> > > > > I've attached a patch that should clarify the problem. Basically,<br>
> > > > > sometimes, not always, [array quantile] returns some weird numbers<br>
> > that I<br>
> > > > > can't explain.<br>
> > > > ><br>
> > > > > And a related issue: array random doesn't seem to be doing what it<br>
> > should<br>
> > > > > be doing. It returns very different values, compared with quantile<br>
> > fed<br>
> > > > with<br>
> > > > > random values between 0 and 1. Again, there is an example of what I<br>
> > mean<br>
> > > > in<br>
> > > > > the attached patch.<br>
> > > > ><br>
> > > > > Thanks<br>
> > > > > Peiman<br>
> > > > ><br>
> > > > ><br>
> > > > > *<a href="http://www.peimankhosravi.co.uk" target="_blank">www.peimankhosravi.co.uk</a> <<a href="http://www.peimankhosravi.co.uk" target="_blank">http://www.peimankhosravi.co.uk</a>> || RSS<br>
> > Feed<br>
> > > > > <<a href="http://peimankhosravi.co.uk/miscposts.rss" target="_blank">http://peimankhosravi.co.uk/miscposts.rss</a>> || Concert News<br>
> > > > > <<a href="http://spectralkimia.wordpress.com/" target="_blank">http://spectralkimia.wordpress.com/</a>>*<br>
> > > ><br>
> > > ><br>
> > > > > _______________________________________________<br>
> > > > > <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
> > > > > UNSUBSCRIBE and account-management -><br>
> > > > <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
> > > ><br>
> > > ><br>
> ><br>
> > > _______________________________________________<br>
> > > <a href="mailto:Pd-list@iem.at">Pd-list@iem.at</a> mailing list<br>
> > > UNSUBSCRIBE and account-management -><br>
> > <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
> ><br>
> ><br>
<br>
<br>
</div></div></blockquote></div><br></div>