VarianceUGen:
Filter:
SenseWorld/Classes (extension) | UGens > Analysis > Statistics

VarianceUGen
ExtensionExtension

Calculates the variance of a signal over a specified window.

Description

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.squareddivided by the (length - 1) of the window.

The StdDevUGen takes the square root of the VarianceUGen.

Class Methods

.kr

Calculates the variance on a control rate signal.

Arguments:

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.