dot — Calculates the dot product of two arrays.
Takes two numeric arrays (k or i-rate) and calculates the dot product.
kres/ires dot karr1[]/iarr1[], karr2[]/iarr2[] (k- or i-arrays )
Here is an example of the dot opcode. Play dota.csd
Example 245. Example of the dot 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 kArr2[] fillarray 2,3,1,2,5 kd dot kArr1,kArr2 printk2 kd turnoff endin </CsInstruments> <CsScore> i1 0 1 </CsScore> </CsoundSynthesizer>
sumarray product
Author: Victor Lazzarini
New in version 6.09