<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="ftsr">
  <refmeta>
    <refentrytitle>ftsr</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>ftsr</refname>
    <refpurpose>
      Returns the sampling-rate of a stored function table.
      <indexterm id="IndexFtsr"><primary>ftsr</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns the sampling-rate of a stored function table.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis><command>ftsr</command>(x) (init-rate args only)</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      Returns the sampling-rate of a <link linkend="GEN01"><citetitle>GEN01</citetitle></link> generated table. The sampling-rate is determined from the header of the original file. If the original file has no header or the table was not created by these GEN01, <emphasis>ftsr</emphasis> returns 0. New in Csound version 3.49.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the ftsr opcode. It uses the files <ulink url="examples/ftsr.orc"><citetitle>ftsr.orc</citetitle></ulink>, <ulink url="examples/ftsr.sco"><citetitle>ftsr.sco</citetitle></ulink>, and <ulink url="examples/mary.wav"><citetitle>mary.wav</citetitle></ulink>.

      <example>
        <title>Example of the ftsr opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/ftsr.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/ftsr.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>

      Since the audio file <quote>mary.wav</quote> uses a 44.1 Khz sampling rate, its output should a line like this:
      <screen>
instr 1:  isr = 44100.000
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="ftchnls"><citetitle>ftchnls</citetitle></link>,
      <link linkend="ftlen"><citetitle>ftlen</citetitle></link>,
      <link linkend="ftlptim"><citetitle>ftlptim</citetitle></link>,
      <link linkend="nsamp"><citetitle>nsamp</citetitle></link>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namegabriel;</member>
        <member>Italy</member>
        <member>October 1998</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>
  </refsect1>
</refentry>
