| 1 | |
| 2 | <refentry id="minarray"> |
| 3 | <indexterm id="IndexMinarray"><primary>minarray</primary></indexterm> |
| 4 | <refentryinfo><title>Array Opcodes</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>minarray</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>minarray</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | returns the minimum value in an array. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | The <emphasis>minarray</emphasis> opcode returns the minimum value |
| 23 | in a k-rate array, and optional its index. |
| 24 | </para> |
| 25 | </refsect1> |
| 26 | |
| 27 | <refsect1> |
| 28 | <title>Syntax</title> |
| 29 | <synopsis>kmin [,kindx] <command>minarray</command> karray</synopsis> |
| 30 | </refsect1> |
| 31 | |
| 32 | <refsect1> |
| 33 | <title>Performance</title> |
| 34 | <para> |
| 35 | <emphasis>kmin</emphasis> -- variable for result. |
| 36 | </para> |
| 37 | <para> |
| 38 | <emphasis>kindx</emphasis> -- position (index) of result in array. |
| 39 | </para> |
| 40 | <para> |
| 41 | <emphasis>karray</emphasis> -- array for reading. |
| 42 | </para> |
| 43 | |
| 44 | </refsect1> |
| 45 | |
| 46 | <refsect1> |
| 47 | <title>Examples</title> |
| 48 | <para> |
| 49 | Here is an example of the minarray opcode. It uses the file <ulink url="examples/minarray.csd"><citetitle>minarray.csd</citetitle></ulink>. |
| 50 | <example> |
| 51 | <title>Example of the minarray opcode.</title> |
| 52 | <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> |
| 53 | <xi:include href="examples-xml/minarray.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 54 | </example> |
| 55 | </para> |
| 56 | </refsect1> |
| 57 | |
| 58 | <refsect1> |
| 59 | <title>See also</title> |
| 60 | <para><link linkend="arrayOpcodes"><citetitle>Array opcodes</citetitle></link></para> |
| 61 | </refsect1> |
| 62 | |
| 63 | <refsect1> |
| 64 | <title>Credits</title> |
| 65 | <para> |
| 66 | <simplelist> |
| 67 | <member>Author: &namejohn;</member> |
| 68 | <member>October 2011</member> |
| 69 | </simplelist> |
| 70 | </para> |
| 71 | |
| 72 | <para>New in Csound version 5.14</para> |
| 73 | <para>Revised in Csound version 6.00 to work on multidimensional arrays</para> |
| 74 | </refsect1> |
| 75 | </refentry> |