| 1 | <refentry id="rfft"> |
| 2 | <indexterm id="IndexRfft"><primary>rfft</primary></indexterm> |
| 3 | <refentryinfo><title>Array Operations: Fast Fourier Transform</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>rfft</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>rfft</refname> |
| 10 | <refpurpose> |
| 11 | Fast Fourier Transform of a real-value array. |
| 12 | </refpurpose> |
| 13 | </refnamediv> |
| 14 | |
| 15 | <refsect1> |
| 16 | <title>Description</title> |
| 17 | <para> |
| 18 | Applies a forward Fast Fourier Transform to a real-value input 1-dimensional array. The output is another array |
| 19 | containing the transform, non-redundant, non-negative spectrum only. If the input array is power-of-two, the output |
| 20 | array size will match the input size, with the first two points containing 0Hz and Nyquist frequency coefficients. Otherwise, |
| 21 | the output will have two extra values (input size + 2), and the the Nyquist coefficient will be placed at kin[input_size] |
| 22 | position (kin[1] and kin[input_size+1] will be 0]. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis>kout[] <command>rfft</command> kin[]</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Performance</title> |
| 33 | <para> |
| 34 | <emphasis>kout[]</emphasis> -- output array containing the transform. It will be created if it does not exist. |
| 35 | </para> |
| 36 | <para> |
| 37 | <emphasis>kin[]</emphasis> -- input array containing the real-valued input. |
| 38 | </para> |
| 39 | </refsect1> |
| 40 | |
| 41 | <refsect1> |
| 42 | <title>Examples</title> |
| 43 | <para> |
| 44 | Here is an example of the rfft opcode. It uses the file <ulink |
| 45 | url="examples/rfft.csd"><citetitle>rfft.csd</citetitle></ulink>.</para> |
| 46 | |
| 47 | <example> |
| 48 | <title>Example of the rfft opcode.</title> |
| 49 | |
| 50 | <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> |
| 51 | <xi:include href="examples-xml/rfft.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 52 | </example> |
| 53 | </refsect1> |
| 54 | |
| 55 | <refsect1> |
| 56 | <title>See Also</title> |
| 57 | <para><link linkend="vectorial"><citetitle></citetitle>Vectorial opcodes</link></para> |
| 58 | <para><link linkend="arrayOpcodes"><citetitle></citetitle>array opcodes</link></para> |
| 59 | <para><link linkend="arraysfft"><citetitle></citetitle>Array-based spectral opcodes</link></para> |
| 60 | </refsect1> |
| 61 | |
| 62 | <refsect1> |
| 63 | <title>Credits</title> |
| 64 | <para> |
| 65 | <simplelist> |
| 66 | <member>Author: &namevictor;</member> |
| 67 | <member>NUI Maynooth</member> |
| 68 | <member>2014</member> |
| 69 | </simplelist> |
| 70 | </para> |
| 71 | <para>New in version 6.04</para> |
| 72 | </refsect1> |
| 73 | </refentry> |