| 1 | |
| 2 | <refentry id="ptable3"> |
| 3 | <indexterm id="IndexPtable3"><primary>ptable3</primary></indexterm> |
| 4 | <refentryinfo><title>Signal Generators:Table Access</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>ptable3</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>ptable3</refname> |
| 11 | <refpurpose> |
| 12 | Accesses table values by direct indexing with cubic interpolation. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Accesses table values by direct indexing with cubic interpolation. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>ares <command>ptable3</command> andx, ifn [, ixmode] [, ixoff] [, iwrap]</synopsis> |
| 26 | |
| 27 | <synopsis>ires <command>ptable3</command> indx, ifn [, ixmode] [, ixoff] [, iwrap]</synopsis> |
| 28 | |
| 29 | <synopsis>kres <command>ptable3</command> kndx, ifn [, ixmode] [, ixoff] [, iwrap]</synopsis> |
| 30 | </refsect1> |
| 31 | |
| 32 | <refsect1> |
| 33 | <title>Initialization</title> |
| 34 | <para> |
| 35 | <emphasis>ifn</emphasis> -- function table number. |
| 36 | </para> |
| 37 | |
| 38 | <para> |
| 39 | <emphasis>ixmode</emphasis> (optional) -- index data mode. The default value is 0. |
| 40 | <itemizedlist> |
| 41 | <listitem><para>0 = raw index</para></listitem> |
| 42 | <listitem><para>1 = normalized (0 to 1)</para></listitem> |
| 43 | </itemizedlist> |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>ixoff</emphasis> (optional) -- amount by which index is to be offset. For a table with origin at center, use tablesize/2 (raw) or .5 (normalized). The default value is 0. |
| 48 | </para> |
| 49 | |
| 50 | <para> |
| 51 | <emphasis>iwrap</emphasis> (optional) -- wraparound index flag. The default value is 0. |
| 52 | <itemizedlist> |
| 53 | <listitem> |
| 54 | <para>0 = nowrap (index < 0 treated as index=0; index > tablesize sticks at index=size)</para> |
| 55 | </listitem> |
| 56 | |
| 57 | <listitem> |
| 58 | <para>1 = wraparound.</para> |
| 59 | </listitem> |
| 60 | </itemizedlist> |
| 61 | </para> |
| 62 | </refsect1> |
| 63 | |
| 64 | <refsect1> |
| 65 | <title>Performance</title> |
| 66 | <para> |
| 67 | <emphasis>ptable3</emphasis> is identical to <link |
| 68 | linkend="table3"><citetitle>table3</citetitle></link>, except |
| 69 | that it uses does not require the table to have a power of two size. |
| 70 | </para> |
| 71 | </refsect1> |
| 72 | |
| 73 | <refsect1> |
| 74 | <title>See Also</title> |
| 75 | <para> |
| 76 | <link linkend="table"><citetitle>table</citetitle></link>, |
| 77 | <link linkend="tablei"><citetitle>tablei</citetitle></link>, |
| 78 | <link linkend="table3"><citetitle>table3</citetitle></link>, |
| 79 | <link linkend="ptable"><citetitle>ptable</citetitle></link>, |
| 80 | <link linkend="ptablei"><citetitle>ptablei</citetitle></link>, |
| 81 | <link linkend="oscil1"><citetitle>oscil1</citetitle></link>, |
| 82 | <link linkend="oscil1i"><citetitle>oscil1i</citetitle></link>, |
| 83 | <link linkend="osciln"><citetitle>osciln</citetitle></link> |
| 84 | </para> |
| 85 | </refsect1> |
| 86 | <refsect1> |
| 87 | <title>Credits</title> |
| 88 | <para> |
| 89 | <simplelist> |
| 90 | <member>Author: &namejohn;</member> |
| 91 | <member>Jan 2012</member> |
| 92 | </simplelist> |
| 93 | </para> |
| 94 | |
| 95 | <para>New in Csound version 5.16</para> |
| 96 | </refsect1> |
| 97 | </refentry> |