max_kSignal Modifiers:Comparators and Accumulatorsmax_kmax_k
Local maximum (or minimum) value of an incoming asig signal
Descriptionmax_k outputs the local maximum (or minimum) value of the incoming asig signal, checked in the time interval between ktrig has become true twice.
Syntaxknumkout max_k asig, ktrig, itypeInitializationitype - itype determinates the behaviour of max_k (see below)
Performanceasig - incoming (input) signal
ktrig - trigger signal
max_k outputs the local maximum (or minimum) value of the incoming asig signal, checked in the time interval between ktrig has become true twice. itype determinates the behaviour of max_k:
1 - absolute maximum (sign of negative values is changed to positive before evaluation).
2 - actual maximum.
3 - actual minimum.
4 - calculate average value of asig in the
time interval since the last trigger.
This opcode can be useful in several situations, for example to implement a vu-meter.
Examples
Here is an example of the max_k opcode. It uses the file max_k.csd.
Example of the max_k opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoComparators and AccumulatorsCreditsWritten by &namegabriel;.New in Csound 5 (Previously available only on
CsoundAV)Fixed to agree with documentation in 5.15