A UGen to measure a signal's maximum value between triggers.
The UGen keeps an internal state that reflects the maximum input value
observed. When a trigger occurs at the reset input, it first copies the current
maximum value to its output and then (quasi-simultaneously) resets its internal
state to the current input value.
Examples
// illustrate timing
play {
val n = BrownNoise.ar
val t = Impulse.ar(4)
val r = RunningMax.ar(n, t)
// value at the moment the reset// is triggered
n.poll(t, "cur")
// this is the maximum of the// recent two input samples// (the one during reset and// the current one), therefore// equal or slightly greater than// the 'cur' value
r.poll(Delay1.ar(t), "max")
()
}
A UGen to measure a signal's maximum value between triggers.
The UGen keeps an internal state that reflects the maximum input value observed. When a trigger occurs at the reset input, it first copies the current maximum value to its output and then (quasi-simultaneously) resets its internal state to the current input value.
Examples
RunningSum
Peak
RunningMin