[PD] random float

Scott R. Looney scottrlooney at gmail.com
Fri Jan 20 20:17:50 CET 2012


i'm new to PD as well but have worked in Max -  if by float you mean a
decimal between 0.0 and 1.0 just use the [*] (multiply object
) after [random] and multiply by a decimal number (like .01). set the
random to pick between 0 and 100 and you should be all set for 100 data
points. as long as you have a clue of the number of data points between A
and B you can set the range with the multiplier. you can also use the
[drunk] object in PD-extended (cyclone) for a custom range but the decimal
multiplier is still needed to convert that to float.

any other faster methods, PD'ers? i'm nowhere near the worlds greatest
programmer, but that's what first comes to mind.

scott

On Fri, Jan 20, 2012 at 10:56 AM, Renato <rennabh at gmail.com> wrote:

> Hello, I'm very very new to pd, and couldn't find an answer to this
> supposedly simple matter. I see that the "random" object generates
> random integers between 0 and its argument.
>
> How do I generate a random float between floats a and b?
>
> cheers,
> renato
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20120120/9f648a90/attachment-0001.htm>


More information about the Pd-list mailing list