average~

Multi-mode signal average

Description

average~ can perform a bipolar, absolute, or rms averaging function on any input signal as described in the "Messages" section.

Arguments

Name Type Opt Description
maximum-averaging-interval (samples) int opt Sets the maximum averaging interval in samples. The default value is 100.
averaging-mode symbol opt Sets the averaging mode, as defined in the "Messages" section. The default is bipolar.

Messages

int averaging-sample-interval [int]
Sets the interval in samples used for each of the three modes of signal averaging. The default value is 100.
bipolar Sets bipolar averaging mode (default). In bipolar mode, the sample values are averaged.
absolute Sets absolute averaging mode. This mode averages the absolute value of the incoming samples.
rms Sets root mean square (RMS) averaging mode. This mode computes the square root of the average of the sample values squared.

The RMS mode of the average~ object is more CPU-intensive than the bipolar and absolute modes.While RMS values are often used to measure signal levels, the absolute mode often works as well as the RMS mode in many level-detection tasks.
signal The signal to be averaged.

Information for box attributes common to all objects

Output

signal: The running average value of the input signal averaged over the specified number of samples.

Examples

Running average of a signal across n samples

See Also

Name Description
avg~ Signal average
meter~ Visual peak level indicator
MSP Compression Introduction: What is Compression? MSP Compression Introduction: What is Compression?