[PD] anyone using array quantile?

Miller Puckette msp at ucsd.edu
Fri Nov 22 16:48:05 CET 2013


There could be something wrong.  But array_random_bang() (in x_array.c)
cooks up a pseudorandom number from 0 to 1 (I believe) and then calls
array_quantile_float() with it.  That's exactly what connecting random()
to array_quantile in a patch should be doing.

cheers
Miller

On Fri, Nov 22, 2013 at 09:38:59AM +0000, peiman khosravi wrote:
> Thank you very much. That does the trick.
> 
> Though, [array random] doesn't seem to be working as I expected. Am I right
> to think that it should produce the same result as [array quantile] fed
> with uniformly distributed random values? If so I'm getting very different
> results here.
> 
> Thanks
> Peiman
> 
> 
> 
> 
> *www.peimankhosravi.co.uk <http://www.peimankhosravi.co.uk> || RSS Feed
> <http://peimankhosravi.co.uk/miscposts.rss> || Concert News
> <http://spectralkimia.wordpress.com/>*
> 
> 
> On 22 November 2013 04:16, Miller Puckette <msp at ucsd.edu> wrote:
> 
> > I think the patch is occasionally (once every 512 times on average) sending
> > zero to "array quantile" which then outputs the index of the first nonzero
> > number in the table -- in this case a point with probability about 1e-45.
> >
> > Maybe try random 1e8 (or so) and divide by 1e8 to get a more continuous,
> > less grainy random sample out of the array.
> >
> > cheers
> > Miller
> >
> > On Fri, Nov 22, 2013 at 01:51:19AM +0000, peiman khosravi wrote:
> > > Hello,
> > >
> > > Has anyone got any experience with [array quantile]?
> > >
> > > I'm getting some strange results and I've done everything I can think of.
> > >
> > > I've attached a patch that should clarify the problem. Basically,
> > > sometimes, not always, [array quantile] returns some weird numbers that I
> > > can't explain.
> > >
> > > And a related issue: array random doesn't seem to be doing what it should
> > > be doing. It returns very different values, compared with quantile fed
> > with
> > > random values between 0 and 1. Again, there is an example of what I mean
> > in
> > > the attached patch.
> > >
> > > Thanks
> > > Peiman
> > >
> > >
> > > *www.peimankhosravi.co.uk <http://www.peimankhosravi.co.uk> || RSS Feed
> > > <http://peimankhosravi.co.uk/miscposts.rss> || Concert News
> > > <http://spectralkimia.wordpress.com/>*
> >
> >
> > > _______________________________________________
> > > Pd-list at iem.at mailing list
> > > UNSUBSCRIBE and account-management ->
> > http://lists.puredata.info/listinfo/pd-list
> >
> >

> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list




More information about the Pd-list mailing list