<?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>expon</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="expcurve.html" title="expcurve" /> <link rel="next" href="exprand.html" title="exprand" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">expon</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="expcurve.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="exprand.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="expon"> <a id="expon"></a> <div class="titlepage"></div> <a id="IndexExpon" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">expon</span> </h2> <p>expon — Trace an exponential curve between specified points. </p> </div> <div class="refsect1" title="Description"> <a id="idp19483504"></a> <h2>Description</h2> <p> Trace an exponential curve between specified points. </p> </div> <div class="refsect1" title="Syntax"> <a id="idp19491392"></a> <h2>Syntax</h2> <pre class="synopsis">ares <span class="command"><strong>expon</strong></span> ia, idur, ib</pre> <pre class="synopsis">kres <span class="command"><strong>expon</strong></span> ia, idur, ib</pre> </div> <div class="refsect1" title="Initialization"> <a id="idp19493216"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>ia</em></span> -- starting value. Zero is illegal for exponentials. </p> <p> <span class="emphasis"><em>ib</em></span> -- value after <span class="emphasis"><em>idur</em></span> seconds. For exponentials, must be non-zero and must agree in sign with <span class="emphasis"><em>ia</em></span>. </p> <p> <span class="emphasis"><em>idur</em></span> -- duration in seconds of the segment. A zero or negative value will cause all initialization to be skipped. </p> </div> <div class="refsect1" title="Performance"> <a id="idp19495736"></a> <h2>Performance</h2> <p> These units generate control or audio signals whose values can pass through 2 specified points. The <span class="emphasis"><em>idur</em></span> value may or may not equal the instrument's performance time: a shorter performance will truncate the specified pattern, while a longer one will cause the defined segment to continue on in the same direction. </p> </div> <div class="refsect1" title="Examples"> <a id="idp19497104"></a> <h2>Examples</h2> <p> Here is an example of the expon opcode. It uses the file <a class="ulink" href="examples/expon.csd" target="_top"><em class="citetitle">expon.csd</em></a>. </p> <div class="example"> <a id="idp19498080"></a> <p class="title"> <strong>Example 215. Example of the expon 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"><CsoundSynthesizer></span> <span class="csdtag"><CsOptions></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 expon.wav -W ;;; for file output any platform</span> <span class="csdtag"></CsOptions></span> <span class="csdtag"><CsInstruments></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 kpitch <span class="op">=</span> p6 <span class="comment">;choose between expon or line</span> <span class="octrl">if</span> (kpitch <span class="op">==</span> 0) then kpitch <span class="opc">expon</span> p4, p3, p5 <span class="octrl">elseif</span> (kpitch <span class="op">==</span> 1) then kpitch <span class="opc">line</span> p4, p3, p5 <span class="octrl">endif</span> asig <span class="opc">vco2</span> .6, kpitch <span class="opc">outs</span> asig, asig <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="stamnt">i</span> 1 0 2 300 600 0 <span class="comment">;if p6=0 then expon is used</span> <span class="stamnt">i</span> 1 3 2 300 600 1 <span class="comment">;if p6=1 then line is used</span> <span class="stamnt">i</span> 1 6 2 600 1200 0 <span class="stamnt">i</span> 1 9 2 600 1200 1 <span class="stamnt">i</span> 1 12 2 1200 2400 0 <span class="stamnt">i</span> 1 15 2 1200 2400 1 <span class="stamnt">i</span> 1 18 2 2400 30 0 <span class="stamnt">i</span> 1 21 2 2400 30 1 <span class="stamnt">e</span> <span class="csdtag"></CsScore></span> <span class="csdtag"></CsoundSynthesizer></span> </pre> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1" title="See Also"> <a id="idp19580120"></a> <h2>See Also</h2> <p> <a class="link" href="expseg.html" title="expseg"><em class="citetitle">expseg</em></a>, <a class="link" href="expsegr.html" title="expsegr"><em class="citetitle">expsegr</em></a>, <a class="link" href="line.html" title="line"><em class="citetitle">line</em></a>, <a class="link" href="linseg.html" title="linseg"><em class="citetitle">linseg</em></a>, <a class="link" href="linsegr.html" title="linsegr"><em class="citetitle">linsegr</em></a> </p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="expcurve.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="exprand.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">expcurve </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> exprand</td> </tr> </table> </div> </body> </html>