Debian Codegraph @

opcodes/phasor.xml

raw symbols SCIP
1
2 <refentry id="phasor">
3 <indexterm id="IndexPhasor"><primary>phasor</primary></indexterm>
4 <refentryinfo><title>Signal Generators:Phasors</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>phasor</refentrytitle>
7 </refmeta>
8
9
10
11 <refnamediv>
12 <refname>phasor</refname>
13 <refpurpose>
14 Produce a normalized moving phase value.
15 </refpurpose>
16 </refnamediv>
17
18 <refsect1>
19 <title>Description</title>
20 <para>
21 Produce a normalized moving phase value.
22 </para>
23 </refsect1>
24
25 <refsect1>
26 <title>Syntax</title>
27 <synopsis>ares <command>phasor</command> xcps [, iphs]</synopsis>
28
29 <synopsis>kres <command>phasor</command> kcps [, iphs]</synopsis>
30 </refsect1>
31
32 <refsect1>
33 <title>Initialization</title>
34 <para>
35 <emphasis>iphs</emphasis> (optional) -- initial phase, expressed as a fraction of a cycle (0 to 1). A negative value will cause phase initialization to be skipped. The default value is zero.
36 </para>
37 </refsect1>
38
39 <refsect1>
40 <title>Performance</title>
41 <para>
42 An internal phase is successively accumulated in accordance with the <emphasis>kcps</emphasis> or <emphasis>xcps</emphasis> frequency to produce a moving phase value, normalized to lie in the range 0 &lt;= phs &lt; 1.
43 </para>
44
45 <para>
46 When used as the index to a <link linkend="table"><citetitle>table</citetitle></link> unit, this phase (multiplied by the desired function table length) will cause it to behave like an oscillator.
47 </para>
48
49 <para>
50 Note that <emphasis>phasor</emphasis> is a special kind of integrator, accumulating phase increments that represent frequency settings.
51 </para>
52 </refsect1>
53
54 <refsect1>
55 <title>Examples</title>
56 <para>
57 Here is an example of the phasor opcode. It uses the file <ulink url="examples/phasor.csd"><citetitle>phasor.csd</citetitle></ulink>.
58
59 <example>
60 <title>Example of the phasor opcode.</title>
61
62
63
64 <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>
65 <xi:include href="examples-xml/phasor.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
66 </example>
67 <para>
68 A musical example featuring the phasor opcode: <ulink url="examples/musical/PhasorTablei_Cucchi.csd"><citetitle>PhasorTablei_Cucchi.csd</citetitle></ulink> by Stefano Cucchi.
69 </para>
70 </para>
71 </refsect1>
72
73 <refsect1>
74 <title>See also</title>
75 <para><link linkend="SiggenPhasors"><citetitle>Phasors</citetitle></link></para>
76 </refsect1>
77
78 </refentry>