VarianceUGen is a pseudo UGen that calculates the variance of a signal over a specified time window.
The calculation done is the sum over a time window of (signal - mean).abs.squared
divided by the (length - 1)
of the window.
The StdDevUGen takes the square root of the VarianceUGen.
Calculates the variance on a control rate signal.
input |
The signal to calculate the variance of. |
length |
The length in samples of the window |
mean |
If you already calculate a mean (=RunningSum/length) in another part of your SynthDef you can supply it here, so it is not calculated again, thus safing processing power. |