<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="filelen">
  <refmeta>
    <refentrytitle>filelen</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>filelen</refname>
    <refpurpose>
      Returns the length of a sound file.
      <indexterm id="IndexFilelen"><primary>filelen</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Returns the length of a sound file.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ir <command>filelen</command> ifilcod</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ifilcod</emphasis> -- sound file to be queried
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>filelen</emphasis> returns the length of the sound file <emphasis>ifilcod</emphasis> in seconds.
    </para>
  </refsect1>

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

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

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

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

      The audio file <quote>mary.wav</quote> is 3.5 seconds long. So <emphasis>filelen</emphasis>'s output should include a line like this:
      <screen>
instr 1:  ilen = 3.501
      </screen>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="filenchnls"><citetitle>filenchnls</citetitle></link>,
      <link linkend="filepeak"><citetitle>filepeak</citetitle></link>,
      <link linkend="filesr"><citetitle>filesr</citetitle></link>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namematt;</member>
        <member>July 1999</member>
      </simplelist>
    </para>
    <para>Example written by &namekevin;.</para>

    <para>New in Csound version 3.57</para>
  </refsect1>
</refentry>
