RunningSum

object RunningSum extends ProductReader[RunningSum]

A UGen calculating the sum of an input signal over a sliding window of given number of samples.

''Note'': Unlike RunningMin and RunningMax , this is not a trigger based operation, but at any one time, the sum of the past length values is reported, continuously sliding the analysis window.

===Examples===

// poll waveform's DC offset
play {
 val freq = 441
 val n    = SampleRate.ir / freq
 // mean over period of a pulse with 50% duty is 0.5
 val mean = RunningSum.ar(LFPulse.ar(freq), n) / n
 mean.roundTo(0.01).poll(label = "mean")
 ()
}
See also
Companion
class
trait Product
trait Mirror
trait ProductReader[RunningSum]
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def ar(in: GE, length: GE): RunningSum
Value Params
in

the input signal to sum up

length

the length of the sliding window over the input signal. these are the number of audio sample-frames for audio-rate calculation, or the number of blocks for control-rate calculation summed up. ''Warning'': The UGen crashes when length is zero. ''(init-time only)''

def kr(in: GE, length: GE): RunningSum
Value Params
in

the input signal to sum up

length

the length of the sliding window over the input signal. these are the number of audio sample-frames for audio-rate calculation, or the number of blocks for control-rate calculation summed up. ''Warning'': The UGen crashes when length is zero. ''(init-time only)''

def read(in: RefMapIn, key: String, arity: Int): RunningSum