minaccum

minaccum — Accumulates the minimum value of audio signals.

Description

minaccum compares two audio-rate variables and stores the minimum value between them into the first.

Syntax

minaccum aAccumulator, aInput

Performance

aAccumulator -- audio variable to store the minimum value

aInput -- signal that aAccumulator is compared to

The minaccum 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 min opcode. Its semantics are similar to vincr since aAccumulator is used as both an input and an output variable, except that minaccum keeps the minimum value instead of adding the signals together. minaccum performs the following operation on each pair of samples:


            if  (aInput < aAccumulator)  aAccumulator = 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

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

Credits

Author: Anthony Kozar
March 2006

New in Csound version 5.01