random within ranges
Hi i'm trying to mimic the deviate function and basically have a bang going to a random 128 to one parameter and I'm trying to have a second iterations of the parameter be a random number within certain ranges of the original random 128 output. thought it might be something like adding adding a +1 or -1 type thing and then control the value of that so it could be +10 or -10 all the way to way 128. this obviously gets tricky since a random output of a 128 and then +128 doesn't make much sense so idk has anyone found a way to successfully mimic deviate without using mc objects? The patch is pretty far along and to make everything mc at this point would be a huge headache but maybe the only way
Does this aproach help?
yes almost! doesn't solve the problem of then getting numbers outside of the 1-128 range. so if the random output is 128 and the deviation is turned up all the way would want the second output to just return anything within the range of 1-128, but if the deviation is turned to 10 would want the second output to return something random within 10 integers of the first output. so then again if the frst random output returns 128 and the deviation is set to 10, the second output could only return numbers within a range of 128 -10. and not plus.
like wise if the deviation is set to 50 and the first random outputs 28 then second output can only return something from 0-78, not between -22 and 78
Just clip the values as they are generated
you can also use % 128 at the end and so use full deviation
in both directions.
Actually you use only 2 random numbers, what is so difficult about it ?
thnx so much pedro