I’m trying to create a condition that switches randomly between zero and 1 a set amount of times over a duration in seconds.
I have this so far where 8 random nodes generate a value on load, which then gets remapped between zero and the duration. Then I compare this against the current time of the patch and when greater that it adds 1, which goes into a counter clamped between zero and one.
This is far from ideal as i’d really like to be able to set the amount of times it flips the condition without having to create new random nodes, and to be able to bias it towards one state or the other.
i’ve got as far as thinking i should remap the progression of time from zero to 1, and then generate a randomSpread of values between zero and 1, but then not sure how i would go about using these to test against the progression of time, or how i could bias one state over the other.
I’m new here, and not the best at maths, so if someone could help me out if anything comes to mind that would be amazing :)
I’ve been messing around with things, this is needlesly complicated. its basically just a random number every frame which is on if < 0.5 then thats run through a damper to control the amount/pace of the switches.
I know to get bias you need to use power but thats about as far as ive got with it…
I guess i could just take a single random number and then run that number through power and change the exponent to control the bias maybe, but perhaps theres a better way to do all this?
Hi!
First about this Bias, there is Round (Value) node witch does pretty much what you want
Second, why don’t you use single Random node and a Bit (Value)
Third if you want to randomize the delay between bangs you can do an LFO feedback loop, to generate next bang timing for you…
hey thanks this is really useful! I ended up doing this:
I generate a random number from the current position of the master track thats driving the whole patch, use a power node to bias it towards 0 or 1, then a damper to control the amount, and an s+h which gets triggered by other events to further cut it down.
yours is nicer though so i think if i just use the power node out of the second map range i’ll have the most control :)
Hi sunep this looks really great, thanks! In terms of the threshold value, I assume a lower number preferences a state of 1 because its a greater than? or am i wrong