Author 
Random voltages probability distribution patch 
microfauna 
Random voltages probability distribution patch
This is a patch which creates random voltages where the probability distribution can be defined. There are two probability parameters which can be controlled manually or by cv:
Distribution about 0v.
This defines what the probability will be for a voltage as it gets further away (+ve or Ã¢â‚¬â€œve) from 0v. It can go from equal probability to low probability, a bit like the distribution for the Buchla Stored Random Voltages but a lot steeper.
+ve/ve probability
This defines if a voltage is more likely to +ve or Ã¢â‚¬â€œve. It can go from equal probability to 100% +ve or Ã¢â‚¬â€œve.
For the patch you will need (Euro examples):
Voltage controlled slope (Maths Ch1)
Linear VCA (Doepfer A1323)
Sample and hold (Doepfer A148)
VCO with PWM (Analogue Systems RS95e)
VCS looping at low audio rate
VCS out>attenuator (VCA for cv control)>VCS both In (to adjust change from linear to exponential)
VCS out>VCA cv in
VCO pulse out>VCA in
VCA out>to S&H
A slight refinement if the S&H is being triggered by a regular pulse is to feed a little of the S&H output to VCS rise, both or fall ins and VCO 1v/oct or FM in.
Adusting of the VCS slope creates the distribution about 0v. Linear is equal probability.
Adjusting PWM creates the +ve/ve probability. 50/50 duty cycle is 50/50. +ve/ve probability
Demo random voltage to a VCO, going from equal probability,100% ve, 100% +ve, equal probability, lower probability for voltages further from 0v, equal probability.
[s]http://soundcloud.com/microfaunauk/probabilitydistribution[/s]
http://soundcloud.com/microfaunauk/probabilitydistribution 

Opus110 
Man I can't wait to get home tonight! Been working on different applications of random, and this fits wonderfully. Thanks! 

microfauna 
Addenda:
1) VCS out>attenuverter>VCS both in
If you have the attenuverter ve you can have low probability around 0v and high for voltages further away from 0v. Check that the VCS is still looping at audio rate.
2)If you're using Maths set the slope shape to LIN 

Navs 
Respect for pushing the patches, Microfauna
I had to read the description a couple of times to understand the role the shape of the envelope plays. Have I got it right  the contour controls how much sample fodder escapes from the VCA?
If you have another S&H or ASR you could feed some of the (delayed) result back the slope, VCO or VCA. 

square_wave 
Very interesting patch. Thank you for posting!


microfauna 
Navs wrote:  I had to read the description a couple of times to understand the role the shape of the envelope plays. Have I got it right  the contour controls how much sample fodder escapes from the VCA? 
The looping (audio rate) voltage controlled slope is controlling the voltage of what is coming out of the VCA, the input being the pulse wave (ie a fixed level either +ve or ve) which controls the +ve/ve weighting. The shape of the voltage controlled slope is creating the probability distribution. If you have a 05v linear slope (pure saw or tri) the probability of any given voltage will be equal. If it is an exponential slope the slope spends more time around 0v than at 5v, ie the probability of any given voltage decreases as you get nearer to 5v.
The next instalment of this patch is on the way with control for centre, max, min for the probability distribution. 

microfauna 
Here are basic module idea, extended patch and distribution examples.
Module
Spread is master control for distribution which brings Min and Max towards the Centre value as it is turned ccw.
Weighting controls the probability that the random voltage will be less than (<C) or greater than (>C) the Centre value.
If Min is set higher or Max is set lower than Centre, the Centre value will be outputted for <C and >C respectively.
Patch
Voltage control for the parameters can be added with extra VCAs.
Distribution examples
X axis voltage, Y axis probability


Navs 
In the module and distribution examples, is your logarithmic representation the right way round? Shouldn't it be bowed? 

microfauna 
Navs wrote:  In the module and distribution examples, is your logarithmic representation the right way round? Shouldn't it be bowed? 
No, I think it is correct. The logarithmic curve will spend more time around +5 or 5 volts than around 0, therefore the probability of any given voltage decreases as you get nearer to 0. ie this is the opposite of the probability distribution for the exponential curve.
If you picture what unipolar 05v logarithmic curve is it is easier to picture the above idea. The +ve and ve element is not created by the VCS so this might be a distraction. 
