| 1 | |
| 2 | <refentry id="opk"> |
| 3 | <indexterm id="IndexK"><primary>a</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Modifiers:Sample Level Operators</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>k</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>k</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Converts a i-rate parameter to an k-rate value. |
| 16 | Or converts an a-rate value to a k-rate value by down-sampling. |
| 17 | </refpurpose> |
| 18 | </refnamediv> |
| 19 | |
| 20 | <refsect1> |
| 21 | <title>Description</title> |
| 22 | <para> |
| 23 | Converts an i-rate value to control rate, for example to be used |
| 24 | with <link linkend="rnd"><citetitle>rnd()</citetitle></link> and |
| 25 | <link linkend="birnd"><citetitle>birnd()</citetitle></link> to generate random numbers at k-rate. |
| 26 | </para> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Syntax</title> |
| 31 | <synopsis><command>k</command>(x) (i-rate args only)</synopsis> |
| 32 | <synopsis><command>k</command>(x) (a-rate args only)</synopsis> |
| 33 | |
| 34 | <para> |
| 35 | where the argument within the parentheses may be an |
| 36 | expression. Value converters perform arithmetic translation from |
| 37 | units of one kind to units of another. The result can then be a |
| 38 | term in a further expression. |
| 39 | </para> |
| 40 | </refsect1> |
| 41 | |
| 42 | <refsect1> |
| 43 | <title>See also</title> |
| 44 | <para><link linkend="SigmodSample"><citetitle>Sample Level Operators</citetitle></link></para> |
| 45 | <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> |
| 46 | </refsect1> |
| 47 | |
| 48 | <refsect1> |
| 49 | <title>Credits</title> |
| 50 | <para>Author: &nameistvan;</para> |
| 51 | <para>New in version Csound 5.00</para> |
| 52 | <para>Author: &namejohn;</para> |
| 53 | <para>arate to krate new in version Csound 6.00</para> |
| 54 | |
| 55 | </refsect1> |
| 56 | </refentry> |