iarg -- i-rate base.
ipow -- i-rate exponent
inorm (optional, default=1) -- 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!
karg -- k-rate base.
kpow -- k-rate exponent
aarg -- a-rate base.
![]() | Use ^ with caution in arithmetical statements, as the precedence may not be correct. New in Csound version 3.493. |
Here is an example of the pow opcode. It uses the files pow.orc and pow.sco.
Example 1. Example of the pow opcode.
/* pow.orc */
/* Written by Kevin Conder */
; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 1
; Instrument #1.
instr 1
; This could also be expressed as: i1 = 2 ^ 12
i1 pow 2, 12
print i1
endin
/* pow.orc */
/* pow.sco */
/* Written by Kevin Conder */
; Play Instrument #1 for one second.
i 1 0 1
e
/* pow.sco */
instr 1: i1 = 4096.000