| 1 | |
| 2 | <refentry id="sin"> |
| 3 | <indexterm id="IndexSin"><primary>sin</primary></indexterm> |
| 4 | <refentryinfo><title>Mathematical Operations:Trigonometric Functions</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>sin</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>sin</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Performs a sine function. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Returns the sine of <emphasis>x</emphasis> (<emphasis>x</emphasis> in radians). |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis><command>sin</command>(x) (no rate restriction)</synopsis> |
| 29 | <synopsis><command>sin</command>(k/i[]) (k- or i-arrays )</synopsis> |
| 30 | </refsect1> |
| 31 | |
| 32 | <refsect1> |
| 33 | <title>Examples</title> |
| 34 | <para> |
| 35 | Here is an example of the sin opcode. It uses the file <ulink url="examples/sin.csd"><citetitle>sin.csd</citetitle></ulink>. |
| 36 | <example> |
| 37 | <title>Example of the sin opcode.</title> |
| 38 | <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> |
| 39 | <xi:include href="examples-xml/sin.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 40 | </example> |
| 41 | |
| 42 | Its output should include a line like this: |
| 43 | <screen>instr 1: isin1 = 0.000 isin2 = 1.000 isin3 = 0.000 isin4 = -1.000 isin5 = -0.000 isin6 = 0.000</screen> |
| 44 | </para> |
| 45 | </refsect1> |
| 46 | |
| 47 | <refsect1> |
| 48 | <title>See also</title> |
| 49 | <para><link linkend="MathTrig"><citetitle>Trigonometric Functions</citetitle></link></para> |
| 50 | </refsect1> |
| 51 | |
| 52 | </refentry> |