random number generator

HI,

what are methods for generating a single random number ? I want to generate a number between 1 and 10 and have it available for recall and be able to regenerate on demand.

I was looking at taking a noise chop and reducing the windowing parameters somehow so that the sample is just a single value.

Or maybe there is a better way via a c++ CHOP ?

You can use the rand() expression. It takes one number on inout and outputs a random number. The same inout will generate the same output.

thanks for the quick reply Malcom,

just wrapping my head around it. What if my input is binary ? how can I generate a random number on every β€˜1’ input ? I see currently that a β€˜1 in’ generates a single random number repetitively.

You can keep a count of each time you see a 1 and give that to the rand() function: rand(0), rand(1), rand(2) etc.