| 1 | |
| 2 | <refentry id="maparray"> |
| 3 | <indexterm id="IndexMaparray"><primary>maparray</primary></indexterm> |
| 4 | |
| 5 | <refentryinfo><title>Table Control:Table Queries</title></refentryinfo> |
| 6 | <refmeta> |
| 7 | <refentrytitle>maparray</refentrytitle> |
| 8 | </refmeta> |
| 9 | |
| 10 | <refnamediv> |
| 11 | <refname>maparray</refname> |
| 12 | <refpurpose> |
| 13 | Apply a function to every element of a vector. |
| 14 | </refpurpose> |
| 15 | </refnamediv> |
| 16 | |
| 17 | <refsect1> |
| 18 | <title>Description</title> |
| 19 | <para> |
| 20 | Apply a function of one argument to every element of a vector (one-dimensional k-rate array). |
| 21 | </para> |
| 22 | </refsect1> |
| 23 | |
| 24 | <refsect1> |
| 25 | <title>Syntax</title> |
| 26 | <synopsis>karray <command>maparray</command> kinarray, String</synopsis> |
| 27 | <synopsis>karray <command>maparray_i</command> kinarray, String</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>String</emphasis> -- a string that names an opcode |
| 34 | function, at i-rate for maparray_i or k-rate for maparray. |
| 35 | </para> |
| 36 | </refsect1> |
| 37 | |
| 38 | <refsect1> |
| 39 | <title>Performance</title> |
| 40 | <para> |
| 41 | <emphasis>karray</emphasis> -- array for answers. |
| 42 | </para> |
| 43 | <para> |
| 44 | <emphasis>kinarray</emphasis> -- array for arguments to the function. |
| 45 | </para> |
| 46 | |
| 47 | </refsect1> |
| 48 | |
| 49 | <refsect1> |
| 50 | <title>Examples</title> |
| 51 | <para> |
| 52 | Here is an example of the maparray opcode. It uses the file <ulink url="examples/maparray.csd"><citetitle>maparray.csd</citetitle></ulink>. |
| 53 | <example> |
| 54 | <title>Example of the maparray opcode.</title> |
| 55 | <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> |
| 56 | <xi:include href="examples-xml/maparray.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 57 | </example> |
| 58 | </para> |
| 59 | </refsect1> |
| 60 | |
| 61 | <refsect1> |
| 62 | <title>See Also</title> |
| 63 | <para><link linkend="arrayOpcodes"><citetitle>Array opcodes</citetitle></link></para> |
| 64 | </refsect1> |
| 65 | |
| 66 | <refsect1> |
| 67 | <title>Credits</title> |
| 68 | <para> |
| 69 | <simplelist> |
| 70 | <member>Author: &namejohn;</member> |
| 71 | <member>Codemist Ltd</member> |
| 72 | <member>2013</member> |
| 73 | </simplelist> |
| 74 | </para> |
| 75 | <para>New in version 6.00</para> |
| 76 | </refsect1> |
| 77 | </refentry> |