| 1 | |
| 2 | <refentry id="sum"> |
| 3 | <indexterm id="IndexSum"><primary>sum</primary></indexterm> |
| 4 | <refentryinfo><title>Mathematical Operations:Opcode Equivalents of Functions</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>sum</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>sum</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Sums any number of a-rate signals, or array elements. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Sums any number of a-rate signals, or array elements. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis>ares <command>sum</command> asig1 [, asig2] [, asig3] [...]</synopsis> |
| 29 | <synopsis>kres <command>sum</command> karr</synopsis> |
| 30 | <synopsis>ires <command>sum</command> iarr</synopsis> |
| 31 | </refsect1> |
| 32 | |
| 33 | <refsect1> |
| 34 | <title>Performance</title> |
| 35 | <para> |
| 36 | <emphasis>asig1, asig2, ...</emphasis> -- a-rate signals to be summed (mixed or added). |
| 37 | </para> |
| 38 | <para> |
| 39 | <emphasis>karr, iarr</emphasis> -- Csound 1-dimensional arrays |
| 40 | </para> |
| 41 | </refsect1> |
| 42 | |
| 43 | <refsect1> |
| 44 | <title>Examples</title> |
| 45 | <para> |
| 46 | Here is an example of the sum opcode. It uses the file <ulink url="examples/sum.csd"><citetitle>sum.csd</citetitle></ulink>. |
| 47 | <example> |
| 48 | <title>Example of the sum opcode.</title> |
| 49 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 50 | <xi:include href="examples-xml/sum.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 51 | </example> |
| 52 | </para> |
| 53 | </refsect1> |
| 54 | |
| 55 | <refsect1> |
| 56 | <title>See also</title> |
| 57 | <para><link linkend="MathOpeqfunc"><citetitle>Opcode Equivalents of Functions</citetitle></link></para> |
| 58 | </refsect1> |
| 59 | |
| 60 | <refsect1> |
| 61 | <title>Credits</title> |
| 62 | <para> |
| 63 | <simplelist> |
| 64 | <member>Author: &namegabriel;</member> |
| 65 | <member>Italy</member> |
| 66 | <member>April 1999</member> |
| 67 | </simplelist> |
| 68 | </para> |
| 69 | |
| 70 | <para>New in Csound version 3.54</para> |
| 71 | <para>Array versions new in version 6.09</para> |
| 72 | </refsect1> |
| 73 | </refentry> |