<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="tablei">
  <refmeta>
    <refentrytitle>tablei</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>tablei</refname>
    <refpurpose>
      Accesses table values by direct indexing with linear interpolation.
      <indexterm id="IndexTablei"><primary>tablei</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Accesses table values by direct indexing with linear interpolation.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>tablei</command> andx, ifn [, ixmode] [, ixoff] [, iwrap]</synopsis>

    <synopsis>ir <command>tablei</command> indx, ifn [, ixmode] [, ixoff] [, iwrap]</synopsis>

    <synopsis>kr <command>tablei</command> kndx, ifn [, ixmode] [, ixoff] [, iwrap]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ifn</emphasis> -- function table number. <emphasis>tablei</emphasis> requires the extended guard point.
    </para>

    <para>
      <emphasis>ixmode</emphasis> (optional) -- index data mode. The default value is 0.
      <itemizedlist>
        <listitem><para>0 = raw index</para></listitem>
        <listitem><para>1 = normalized (0 to 1)</para></listitem>
      </itemizedlist>
    </para>

    <para>
      <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.
    </para>

    <para>
      <emphasis>iwrap</emphasis> (optional) -- wraparound index flag. The default value is 0.
      <itemizedlist>
        <listitem>
          <para>0 = nowrap (index &lt; 0 treated as index=0; index tablesize sticks at index=size)</para>
        </listitem>

        <listitem>
          <para>1 = wraparound.</para>
        </listitem>
      </itemizedlist>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>tablei</emphasis> is a interpolating unit in which the fractional part of index is used to interpolate between adjacent table entries. The smoothness gained by interpolation is at some small cost in execution time (see also <link linkend="oscili"><citetitle>oscili</citetitle></link>, etc.), but the interpolating and non-interpolating units are otherwise interchangeable. Note that when <emphasis>tablei</emphasis> uses a periodic index whose modulo <emphasis>n</emphasis> is less than the power of 2 table length, the interpolation process requires that there be an (<emphasis>n</emphasis>+ 1)th table value that is a repeat of the 1st (see <link linkend="f"><citetitle>f Statement</citetitle></link> in score).
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="table"><citetitle>table</citetitle></link>,
      <link linkend="table3"><citetitle>table3</citetitle></link>,
      <link linkend="oscil1"><citetitle>oscil1</citetitle></link>,
      <link linkend="oscil1i"><citetitle>oscil1i</citetitle></link>,
      <link linkend="osciln"><citetitle>osciln</citetitle></link>
    </para>
  </refsect1>
</refentry>
