File: phasor.html

package info (click to toggle)
csound-doc 3.47b2-2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 1,492 kB
  • ctags: 272
  • sloc: makefile: 36
file content (57 lines) | stat: -rw-r--r-- 2,487 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<HTML>
<TITLE>PHASOR</TITLE>
<CENTER><A NAME="phasor"></A>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="./SIG_GENS.html#">Top of this section</A></B> - <A HREF="./line.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./table.html">Next</A>&nbsp;
<HR></CENTER>

<H2>
phasor</H2>

<PRE>&nbsp;&nbsp;&nbsp;&nbsp; kr&nbsp;&nbsp; phasor&nbsp;&nbsp;&nbsp; kcps[, iphs]&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; ar&nbsp;&nbsp; phasor&nbsp;&nbsp;&nbsp; xcps[, iphs]</PRE>

<HR>
<H4>
<U>DESCRIPTION</U></H4>
Produce a normalized moving phase value.
<H4>
<U>INITIALIZATION</U></H4>
<I>iphs</I> (optional) - initial phase, expressed as a fraction of a cycle
(0 to 1). A negative value will cause phase initialization to he skipped.
The default value is zero.
<H4>
<U>PERFORMANCE</U></H4>
An internal phase is successively accumulated in accordance with the cps
frequency to produce a moving phase value, normalized to lie in the range
0. &lt;= phs &lt; 1.

<P>When used as the index to a <B><A HREF="./table.html">table</A></B> unit,
this phase (multiplied by the desired function table length) will cause
it to behave like an oscillator.

<P>Note that <B>phasor</B> is a special kind of integrator, accumulating
phase increments that represent frequency settings.
<H4>
<U>EXAMPLE:</U></H4>

<PRE>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>phasor</B>&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; cycle once per second
&nbsp; kpch&nbsp;&nbsp;&nbsp; <B>table</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k1 * 12, 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; through 12-note pch table
&nbsp; a1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <B>oscil</B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p4, cpspch(kpch), 2 ; with continuous sound</PRE>

<CENTER><P>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="./SIG_GENS.html#">Top of this section</A></B> - <A HREF="./line.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./table.html">Next</A>&nbsp;
<HR></CENTER>


<P><CENTER>
<B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>&copy;
Jean Pich&eacute; &amp; Peter J. Nix, 1994-97</FONT></FONT></I></B>&nbsp;
</CENTER>
</HTML>