minabsaccum — Accumulates the minimum of the absolute values of audio signals.


minabsaccum compares two audio-rate variables and stores the minimum of their absolute values into the first.


minabsaccum aAccumulator, aInput


aAccumulator -- audio variable to store the minimum value

aInput -- signal that aAccumulator is compared to

The minabsaccum opcode is designed to accumulate the minimum value from among many audio signals that may be in different note instances, different channels, or otherwise cannot all be compared at once using the minabs opcode. minabsaccum is identical to minaccum except that it takes the absolute value of aInput before the comparison. Its semantics are similar to vincr since aAccumulator is used as both an input and an output variable, except that minabsaccum keeps the minimum absolute value instead of adding the signals together. minabsaccum performs the following operation on each pair of samples:

            if  (abs(aInput) < aAccumulator)  aAccumulator = abs(aInput)

aAccumulator will usually be a global audio variable. At the end of any given computation cycle (k-period), after its value is read and used in some way, the accumulator variable should usually be reset to some large enough positive value that will always be greater than the input signals to which it is compared.

See Also

maxabsaccum, maxaccum, minaccum, max, min, maxabs, minabs, vincr


Author: Anthony Kozar
March 2006

New in Csound version 5.01