| 1 | |
| 2 | <refentry id="min"> |
| 3 | <indexterm id="IndexMin"><primary>min</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Comparators and Accumulators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>min</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>min</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Produces a signal that is the minimum of any number of input signals. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | The <emphasis>min</emphasis> opcode takes any number of a-rate, |
| 23 | k-rate or i-rate signals as input (all of the same rate), and outputs a signal at the same rate that is the minimum of all of the inputs. For a-rate signals, the inputs are compared one sample at a time (i.e. <emphasis>min</emphasis> does not scan an entire ksmps period of a signal for its local minimum as the <emphasis>max_k</emphasis> opcode does). |
| 24 | </para> |
| 25 | </refsect1> |
| 26 | |
| 27 | <refsect1> |
| 28 | <title>Syntax</title> |
| 29 | <synopsis>amin <command>min</command> ain1, ain2 [, ain3] [, ain4] [...]</synopsis> |
| 30 | <synopsis>kmin <command>min</command> kin1, kin2 [, kin3] [, kin4] [...]</synopsis> |
| 31 | <synopsis>imin <command>min</command> iin1, iin2 [, iin3] [, iin4] [...]</synopsis> |
| 32 | </refsect1> |
| 33 | |
| 34 | <refsect1> |
| 35 | <title>Performance</title> |
| 36 | <para> |
| 37 | <emphasis>ain1, ain2, ...</emphasis> -- a-rate signals to be compared. |
| 38 | </para> |
| 39 | |
| 40 | <para> |
| 41 | <emphasis>kin1, kin2, ...</emphasis> -- k-rate signals to be compared. |
| 42 | </para> |
| 43 | |
| 44 | <para> |
| 45 | <emphasis>iin1, iin2, ...</emphasis> -- i-rate signals to be compared. |
| 46 | </para> |
| 47 | </refsect1> |
| 48 | |
| 49 | <refsect1> |
| 50 | <title>Examples</title> |
| 51 | <para> |
| 52 | Here is an example of the min opcode. It uses the file <ulink url="examples/min.csd"><citetitle>min.csd</citetitle></ulink>. |
| 53 | <example> |
| 54 | <title>Example of the min 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/min.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="SigmodCompaccum"><citetitle>Comparators and Accumulators</citetitle></link></para> |
| 64 | </refsect1> |
| 65 | |
| 66 | <refsect1> |
| 67 | <title>Credits</title> |
| 68 | <para> |
| 69 | <simplelist> |
| 70 | <member>Author: &nameanthony;</member> |
| 71 | <member>March 2006</member> |
| 72 | </simplelist> |
| 73 | </para> |
| 74 | |
| 75 | <para>New in Csound version 5.01; i-rate version new in 6.04</para> |
| 76 | </refsect1> |
| 77 | </refentry> |