<?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>ftlptim</title> <link rel="stylesheet" href="csound.css" type="text/css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /> <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="ftloadk.html" title="ftloadk" /> <link rel="next" href="ftmorf.html" title="ftmorf" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">ftlptim</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="ftloadk.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="ftmorf.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="ftlptim"> <a id="ftlptim"></a> <div class="titlepage"></div> <a id="IndexFtlptim" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">ftlptim</span> </h2> <p>ftlptim — Returns the loop segment start-time of a stored function table number. </p> </div> <div class="refsect1" title="Description"> <a id="id2925555"></a> <h2>Description</h2> <p> Returns the loop segment start-time of a stored function table number. </p> </div> <div class="refsect1" title="Syntax"> <a id="id2925575"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>ftlptim</strong></span>(x) (init-rate args only)</pre> </div> <div class="refsect1" title="Performance"> <a id="id2925593"></a> <h2>Performance</h2> <p> Returns the loop segment start-time (in seconds) of stored function table number <span class="emphasis"><em>x</em></span>. This reports the duration of the direct recorded attack and decay parts of a sound sample, prior to its looped segment. Returns zero (and a warning message) if the sample does not contain loop points. </p> </div> <div class="refsect1" title="Examples"> <a id="id2926437"></a> <h2>Examples</h2> <p> Here is an example of the ftlptim opcode. It uses the file <a class="ulink" href="examples/ftlptim.csd" target="_top"><em class="citetitle">ftlptim.csd</em></a>, and <a class="ulink" href="examples/mary.wav" target="_top"><em class="citetitle">mary.wav</em></a>. </p> <div class="example"> <a id="id2926459"></a> <p class="title"> <b>Example 279. Example of the ftlptim opcode.</b> </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"><CsoundSynthesizer></span> <span class="csdtag"><CsOptions></span> <span class="comment">; Select audio/midi flags here according to platform</span> <span class="comment">; Audio out Audio in</span> -odac -iadc <span class="comment">;;;RT audio I/O</span> <span class="comment">; For Non-realtime ouput leave only the line below:</span> <span class="comment">; -o ftlptim.wav -W ;;; for file output any platform</span> <span class="csdtag"></CsOptions></span> <span class="csdtag"><CsInstruments></span> <span class="comment">; Initialize the global variables.</span> <span class="ohdr">sr</span> <span class="op">=</span> 44100 <span class="ohdr">kr</span> <span class="op">=</span> 4410 <span class="ohdr">ksmps</span> <span class="op">=</span> 10 <span class="ohdr">nchnls</span> <span class="op">=</span> 1 <span class="comment">; Instrument #1.</span> <span class="oblock">instr</span> 1 <span class="comment">; Print out the loop-segment start time in Table #1.</span> itim <span class="op">=</span> <span class="opc">ftlptim</span>(1) <span class="opc">print</span> itim <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="comment">; Table #1: Use an audio file, Csound will determine its size.</span> <span class="stamnt">f</span> 1 0 0 1 "mary.wav" 0 0 0 <span class="comment">; Play Instrument #1 for 1 second.</span> <span class="stamnt">i</span> 1 0 1 <span class="stamnt">e</span> <span class="csdtag"></CsScore></span> <span class="csdtag"></CsoundSynthesizer></span> </pre> </div> </div> <p><br class="example-break" /> Since the audio file <span class="quote">“<span class="quote">mary.wav</span>”</span> is non-looping, its output should include lines like this: </p> <pre class="screen"> WARNING: non-looping sample instr 1: itim = 0.000 </pre> <p> </p> </div> <div class="refsect1" title="See Also"> <a id="id2926511"></a> <h2>See Also</h2> <p> <a class="link" href="ftchnls.html" title="ftchnls"><em class="citetitle">ftchnls</em></a>, <a class="link" href="ftlen.html" title="ftlen"><em class="citetitle">ftlen</em></a>, <a class="link" href="ftsr.html" title="ftsr"><em class="citetitle">ftsr</em></a>, <a class="link" href="nsamp.html" title="nsamp"><em class="citetitle">nsamp</em></a> </p> </div> <div class="refsect1" title="Credits"> <a id="id2926554"></a> <h2>Credits</h2> <p> </p> <table border="0" summary="Simple list" class="simplelist"> <tr> <td>Author: Barry L. Vercoe</td> </tr> <tr> <td>MIT</td> </tr> <tr> <td>Cambridge, Massachussetts</td> </tr> <tr> <td>1997</td> </tr> </table> <p> </p> <p>Example written by Kevin Conder.</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="ftloadk.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="ftmorf.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">ftloadk </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> ftmorf</td> </tr> </table> </div> </body> </html>