sumarray
Returns the sum of all elements in a numeric array.
Syntax
Performance
ksum -- variable for result.
karray -- array for reading.
Replacing sumtab
sumtab is the deprecated k-rate name. Replace ksum = sumtab(kArray) with ksum = sumarray(kArray). Both add all elements, across all dimensions, on each control cycle.
sumarray also accepts i-rate arrays at initialization and audio arrays for sample-by-sample summation. sumtab accepts only k-rate arrays.
Examples
Here is an example of the sumarray opcode. It uses the file sumarray.csd.
See also
Credits
Author: John ffitch
October 2011
New in Csound version 5.14
Revised in Csound version 6.00 to work on multidimensional arrays