Hi Bob,

You could use latch to sample the random number stream.  However, it's more
efficient to do something that can be completed at compile time, e.g.,

rtz = (*(1103515245) + 12345) & mask;
rt(i) = seq(j,i+1,rtz) / RANDMAX;
process = 1 <: par(i,N,*(rt(i)));


On Wed, May 5, 2021 at 5:19 PM Bob Bobsled <thebobbobs...@gmail.com> wrote:

>
> Hi,
> I've pondered this code for a while, and am failing to understand how to
> declare a variable which has a single random value.  Of course this code
> creates random values at the sample rate.  How would you get just one value
> instead of a constant stream of values?
>
> mynoise = random / RANDMAX
> with{
> mask = 4294967295; // 2^32-1
> random = +(12345) ~ *(1103515245) & mask; // "linear congruential"
> RANDMAX = 2147483647.0; // = 2^31-1 = MAX_SIGNED_INT in 32 bits
> };
> process = mynoise;
>
> In other words, one would like to be able to do something such as this:
> process = os.osc(myrandomvalue);
>
> I understand there are various ways to provide frequencies, graphical and
> non-graphical. What I'm fundamentally searching for is how to declare a
> variable with a single random value.  I cannot seem to figure out how to
> slow down or stop things from flowing at the SR other than set SR to 1.
>
> Regards,
> Bob
> _______________________________________________
> Faudiostream-users mailing list
> Faudiostream-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/faudiostream-users
>


-- 
"Anybody who knows all about nothing knows everything" -- Leonard Susskind
_______________________________________________
Faudiostream-users mailing list
Faudiostream-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-users

Reply via email to