| 1 | |
| 2 | <refentry id="phasorbnk"> |
| 3 | <indexterm id="IndexPhasorbnk"><primary>phasorbnk</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Phasors</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>phasorbnk</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>phasorbnk</refname> |
| 11 | <refpurpose> |
| 12 | Produce an arbitrary number of normalized moving phase values. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Produce an arbitrary number of normalized moving phase values, accessable by an index. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>ares <command>phasorbnk</command> xcps, kndx, icnt [, iphs]</synopsis> |
| 26 | |
| 27 | <synopsis>kres <command>phasorbnk</command> kcps, kndx, icnt [, iphs]</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>icnt</emphasis> -- maximum number of phasors to be used. |
| 34 | </para> |
| 35 | |
| 36 | <para> |
| 37 | <emphasis>iphs</emphasis> -- initial phase, expressed as a fraction of a cycle (0 to 1). If -1 initialization is skipped. If <emphasis>iphas</emphasis>>1 each phasor will be initialized with a random value. |
| 38 | </para> |
| 39 | </refsect1> |
| 40 | |
| 41 | <refsect1> |
| 42 | <title>Performance</title> |
| 43 | <para> |
| 44 | <emphasis>kndx</emphasis> -- index value to access individual phasors |
| 45 | </para> |
| 46 | |
| 47 | <para> |
| 48 | For each independent phasor, 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 <= phs < 1. Each individual phasor is accessed by index <emphasis>kndx</emphasis>. |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | This phasor bank can be used inside a k-rate loop to generate multiple independent voices, or together with the <link linkend="adsynt"><citetitle>adsynt</citetitle></link> opcode to change parameters in the tables used by <emphasis>adsynt</emphasis>. |
| 53 | </para> |
| 54 | </refsect1> |
| 55 | |
| 56 | <refsect1> |
| 57 | <title>Examples</title> |
| 58 | <para> |
| 59 | Here is an example of the phasorbnk opcode. It uses the file <ulink url="examples/phasorbnk.csd"><citetitle>phasorbnk.csd</citetitle></ulink>. |
| 60 | |
| 61 | <example> |
| 62 | <title>Example of the phasorbnk opcode.</title> |
| 63 | |
| 64 | |
| 65 | |
| 66 | <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> |
| 67 | <xi:include href="examples-xml/phasorbnk.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 68 | </example> |
| 69 | |
| 70 | Generate multiple voices with independent partials. This example is better with <emphasis>adsynt</emphasis>. See also the example under <link linkend="adsynt"><citetitle>adsynt</citetitle></link>, for k-rate use of <emphasis>phasorbnk</emphasis>. |
| 71 | </para> |
| 72 | </refsect1> |
| 73 | |
| 74 | <refsect1> |
| 75 | <title>See also</title> |
| 76 | <para><link linkend="SiggenPhasors"><citetitle>Phasors</citetitle></link></para> |
| 77 | </refsect1> |
| 78 | |
| 79 | <refsect1> |
| 80 | <title>Credits</title> |
| 81 | <para> |
| 82 | <simplelist> |
| 83 | <member>Author: Peter Neubäcker</member> |
| 84 | <member>Munich, Germany</member> |
| 85 | <member>August 1999</member> |
| 86 | </simplelist> |
| 87 | </para> |
| 88 | |
| 89 | <para>New in Csound version 3.58</para> |
| 90 | </refsect1> |
| 91 | </refentry> |