ir pow iarg, ipow kr pow karg, kpow[, inorm] ar pow aarg, kpow[, inorm]
Computes xarg to the power of kpow (or ipow) and scales the result by inorm.
inorm - The number to divide the result (default to 1). This is especially useful if you are doing powers of a- or k- signals where samples out of range are extremely common!
iarg - i-rate base.
karg - k-rate base.
aarg - a-rate base.
i2t2 pow 2,2 ; Computes 2^2. kline line 0, 1, 4 kexp pow kline, 2, 4
This feeds a linear function to pow and scales that to the line's peak value. The output will be an exponential curve with the same range as the input line.
iamp pow 0, 2 a1 oscil iamp, 100, 1 a2 pow a1, 2, iamp out a2
This will output a sine with its negative part folded over the amp axis. The peak value will be iamp = 10^2 = 100.
The first line could also be written:
i2t2 = 2^2
Use ^ with caution in arithmetical statements, as the precedence may not be correct. New in Csound version 3.493.
pow was originally three opcodes called ipow, kpow, and apow. As of Csound version 3.48 those names are deprecated, and the three seperate opcodes replaced by pow.
Paris Smaragdis
MIT, Cambridge
1995