Debian Codegraph @

opcodes/pol2rect.xml

raw symbols SCIP
1 <refentry id="pol2rect">
2 <indexterm id="IndexPol2rect"><primary>pol2rect</primary></indexterm>
3
4 <refentryinfo><title>Array Operations: complex numbers</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>pol2rect</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>pol2rect</refname>
11 <refpurpose>
12 Polar to rectangular format conversion.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Converts an input array in magnitude-phase format to real-imaginary format.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis>kout[] <command>pol2rect</command> kin[]</synopsis>
26 <synopsis>kout[] <command>pol2rect</command> kmags[], kphs[]</synopsis>
27 </refsect1>
28
29 <refsect1>
30 <title>Performance</title>
31 <para>
32 <emphasis>kout[]</emphasis> -- output array containing the complex-valued real-imaginary output. It will be created if it does not exist.
33 </para>
34 <para>
35 <emphasis>kin[]</emphasis> -- input array containing the complex-valued magnitude-phase input.
36 </para>
37 <para>
38 <emphasis>kmags[]</emphasis> -- input array containing the
39 real-valued magnitude input. This is expected to contain only
40 the non-negative spectrum (0 to Nyquist, inclusive).
41 </para>
42 <para>
43 <emphasis>kphs[]</emphasis> -- input array containing the
44 real-valued phase input. This is expected to contain only the
45 non-negative spectrum (0 to Nyquist, inclusive).
46 </para>
47
48 <para>
49 NB: the second version of the opcode with two inputs is designed
50 to produce a "packed" real FFT spectrum where the two positions in the
51 array contain the real parts of zero Hz and Nyquist
52 frequency. Therefore the output array length will be 2*L -
53 2, where L is the length of the input arrays (which should match).
54 </para>
55
56 </refsect1>
57
58 <refsect1>
59 <title>Examples</title>
60 <para>
61 Here is an example of the pol2rect opcode. It uses the file <ulink
62 url="examples/pol2rect.csd"><citetitle>pol2rect.csd</citetitle></ulink>.</para>
63
64 <example>
65 <title>Example of the pol2rect opcode.</title>
66
67 <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>
68 <xi:include href="examples-xml/pol2rect.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
69 </example>
70 </refsect1>
71 <refsect1>
72 <title>See Also</title>
73 <para>
74 <link linkend="vectorial"><citetitle></citetitle>Vectorial opcodes</link>,
75 <link linkend="arrayOpcodes"><citetitle></citetitle>array opcodes</link>
76 </para>
77 </refsect1>
78
79 <refsect1>
80 <title>Credits</title>
81 <para>
82 <simplelist>
83 <member>Author: &namevictor;</member>
84 <member>NUI Maynooth</member>
85 <member>2014</member>
86 </simplelist>
87 </para>
88 <para>New in version 6.04</para>
89 </refsect1>
90 </refentry>