| 1 | |
| 2 | <refentry id="opi"> |
| 3 | <indexterm id="IndexI"><primary>i</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Sample Level Operators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>i</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>i</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Returns an init-type equivalent of a k-rate argument, or directly returns an i-rate argument. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Returns an init-type equivalent of a k-rate argument or array |
| 23 | element or directly returns an i-rate argument. |
| 24 | </para> |
| 25 | </refsect1> |
| 26 | |
| 27 | <refsect1> |
| 28 | <title>Syntax</title> |
| 29 | <synopsis><command>i</command>(x) (control-rate or init-rate arg)</synopsis> |
| 30 | <synopsis><command>i</command>(karray,index1, ...) (k-array with indices)</synopsis> |
| 31 | |
| 32 | <para> |
| 33 | Value converters perform arithmetic translation from units of one kind to units of another. The result can then be a term in a further expression. |
| 34 | <note> |
| 35 | <title>Note</title> |
| 36 | <para>Using i() with a k-rate expression argument is not |
| 37 | recommended, and can produce unexpected results.</para> |
| 38 | <para>To get the value from an array element reliably the |
| 39 | second form should be used.</para> |
| 40 | </note> |
| 41 | </para> |
| 42 | </refsect1> |
| 43 | |
| 44 | <refsect1> |
| 45 | <title>See also</title> |
| 46 | <para><link linkend="SigmodSample"><citetitle>Sample Level Operators</citetitle></link></para> |
| 47 | <para> More information on this opcode can be found in the <ulink url="http://www.csounds.com/journal/issue10/CsoundRates.html"><citetitle>Csound Journal, issue 10</citetitle></ulink>, written by Andrés Cabrera. </para> |
| 48 | </refsect1> |
| 49 | |
| 50 | <refsect1> |
| 51 | <title>Credits</title> |
| 52 | <para>i-rate arg version of function new since 5.14</para> |
| 53 | <para>Array format new in version 6.08</para> |
| 54 | </refsect1> |
| 55 | |
| 56 | </refentry> |