ir wrap isig, ilow, ihigh kr wrap ksig, klow, khigh ar wrap asig, klow, khigh ir mirror isig, ilow, ihigh kr mirror ksig, klow, khigh ar mirror asig, klow, khigh ir limit isig, ilow, ihigh kr limit ksig, klow, khigh ar limit asig, klow, khigh
Wraps the signal in various ways.
isig - input signal
ilow – low threshold
ihigh – high threshold
xsig – input signal
xlow – low threshold
xhigh – high threshold
limit sets lower and upper limits on the xsig value they process. If xhigh is lower than xlow, then the output will be the average of the two - it will not be affected by xsig. mirror reflects the signal that exceeds the low and high thresholds. wrap wraps-around the signal that exceeds the low and high thresholds.
These opcodes are useful in several situations, such as table indexing or for clipping and modeling irate, krate or arate signals. wrap is also useful for wrap-around of table data when the maximum index is not a power of two (see table and tablei). Another use of wrap is in cyclical event repeating, with arbirary cycle length.
Gabriel Maldonado (wrap, mirror)
New in Csound version 3.49
Robin Whittle (limit)
New in Csound version 3.46