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
Type members
Value members
Concrete methods
- 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)''
- 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)''