MovingAverage:
Filter:
Classes (extension) | UGens > Analysis | UGens > Maths

MovingAverage : UGen : AbstractFunction : Object
ExtensionExtension

The average of samples over a variable number of frames.
Source: MovingSum.sc

Description

A running average, power or RMS over a variable number of samples. For a running sum (not averaged) see MovingSum.

Class Methods

MovingAverage.ar(in, numsamp: 40, maxsamp: 400)

MovingAverage.kr(in, numsamp: 40, maxsamp: 400)

Output the average of numsamp audio or control rate samples.

Arguments:

in

An input signal.

numsamp

Size of the time window, in samples. Modulatable between 1 and maxsamp. Default: 40.

maxsamp

Maximum size of the time window. Pre-allocates memory up to this size and your numsamp will be clipped at this value. maxsamp cannot be modulated.

MovingAverage.power(in, numsamp: 40, maxsamp: 400)

Output the time averaged power of the the signal. Implemented as the input squared, summed over the time window, averaged by the window size. The output rate is determined by the rate of the in signal.

MovingAverage.rms(in, numsamp: 40, maxsamp: 400)

Output the root mean square (RMS) of the the signal. Implemented as the input squared, summed over the time window, averaged by the window size, and square rooted. The output rate is determined by the rate of the in signal.

Inherited class methods

Instance Methods

Inherited instance methods

Examples