Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > b707d9a4ee443103660a75ccb6e51334 > files > 2227

csound-doc-5.19.01-10.mga5.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>mp3len</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.76.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="mp3in.html" title="mp3in" />
    <link rel="next" href="mpulse.html" title="mpulse" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">mp3len</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="mp3in.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="mpulse.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="mp3len">
      <a id="mp3len"></a>
      <div class="titlepage"></div>
      <a id="IndexMp3len" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">mp3len</span>
        </h2>
        <p>mp3len — 
      Returns the length of an MP3 sound file.
          </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp32355944"></a>
        <h2>Description</h2>
        <p>
      Returns the length of an MP3 sound file.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp32342760"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ir <span class="command"><strong>mp3len</strong></span> ifilcod</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp32343776"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>ifilcod</em></span> -- sound file to be queried
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp32344624"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>mp3len</em></span> returns the length of the sound file <span class="emphasis"><em>ifilcod</em></span> in seconds.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp32394416"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the mp3len opcode. It uses the file <a class="ulink" href="examples/mp3len.csd" target="_top"><em class="citetitle">mp3len.csd</em></a>.

      </p>
        <div class="example">
          <a id="idp32395368"></a>
          <p class="title">
            <strong>Example 496. Example of the mp3len opcode.</strong>
          </p>
          <div class="example-contents">
            <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
<span class="comment">; Select audio/midi flags here according to platform</span>
-odac    <span class="comment">;;;realtime audio out</span>
<span class="comment">;-iadc    ;;;uncomment -iadc if realtime audio input is needed too</span>
<span class="comment">; For Non-realtime ouput leave only the line below:</span>
<span class="comment">;-o mp3len.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="ohdr">sr</span> <span class="op">=</span> 44100
<span class="ohdr">ksmps</span> <span class="op">=</span> 32
<span class="ohdr">nchnls</span> <span class="op">=</span> 2
<span class="ohdr">0dbfs</span>  <span class="op">=</span> 1

<span class="oblock">instr</span> 1

ilen   <span class="opc">mp3len</span> p4        <span class="comment">;calculate length of mp3 file</span>
<span class="opc">print</span>  ilen

asigL, asigR <span class="opc">mp3in</span> p4
       <span class="opc">outs</span>  asigL, asigR

<span class="oblock">endin</span>
<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>

<span class="stamnt">i</span> 1 0 30 "XORNOT_jul-14-05.mp3"    <span class="comment">; long signal</span>
<span class="stamnt">e</span>
<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1" title="See Also">
        <a id="idp32397640"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="mp3in.html" title="mp3in"><em class="citetitle">mp3in</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp32398656"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: John ffitch</td>
          </tr>
          <tr>
            <td>Feb 2011</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in Csound version 5.14</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="mp3in.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="mpulse.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">mp3in </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> mpulse</td>
        </tr>
      </table>
    </div>
  </body>
</html>