product

product — Calculates the product of an array.

Description

Takes a numeric array (k or i-rate) and calculates its product.

Syntax

kres/iresproduct karr[]/iarr[]  (k- or i-arrays )

Examples

Here is an example of the product opcode. It uses the file producta.csd.

Example 740. Example of the product opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
-n
</CsOptions>
<CsInstruments>

instr 1
 kArr1[] fillarray 1,3,2,7,4
 k1 product kArr1
 printk2 k1
 turnoff
endin


</CsInstruments>
<CsScore>
i1 0 1
</CsScore>
</CsoundSynthesizer>


See Also

dot sumarray

Credits

Author: Victor Lazzarini

New in version 6.09