limit

limit — Sets the lower and upper limits of the value it processes.

Description

Sets the lower and upper limits of the value it processes.

Syntax

ares limit asig, klow, khigh
ires limit isig, ilow, ihigh
kres limit ksig, klow, khigh

Initialization

isig -- input signal

ilow -- low threshold

ihigh -- high threshold

Performance

xsig -- input signal

klow -- low threshold

khigh -- high threshold

limit sets the lower and upper limits on the xsig value it processes. If xhigh is lower than xlow, then the output will be the average of the two - it will not be affected by xsig.

This opcode is useful in several situations, such as table indexing or for clipping and modeling a-rate, i-rate or k-rate signals.

See Also

mirror, wrap

Credits

Author: Robin Whittle
Australia

New in Csound version 3.46