<?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>GENexp</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="ScoregensTop.html" title="Score Statements and GEN Routines" /> <link rel="prev" href="GENtanh.html" title="GENtanh" /> <link rel="next" href="GENsone.html" title="GENsone" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">GENexp</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="GENtanh.html">Prev</a> </td> <th width="60%" align="center">Score Statements and GEN Routines</th> <td width="20%" align="right"> <a accesskey="n" href="GENsone.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="GENexp"> <a id="GENexp"></a> <div class="titlepage"></div> <a id="IndexGENexp" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">GENexp</span> </h2> <p>"exp" — Generate a table with values on the exp function. </p> </div> <div class="refsect1" title="Description"> <a id="id3749981"></a> <h2>Description</h2> <p> Creates an ftable with values of the exp function .... </p> </div> <div class="refsect1" title="Syntax"> <a id="id3749992"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>f</strong></span> # time size "exp" start end rescale</pre> </div> <div class="refsect1" title="Initialization"> <a id="id3750018"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>size</em></span> -- number of points in the table. Must be a power of 2 or power-of-2 plus 1 (see <a class="link" href="f.html" title="f Statement (or Function Table Statement)"><em class="citetitle">f statement</em></a>). </p> <p> <span class="emphasis"><em>start, end</em></span> -- first and last value to be stored. The points stored are uniformly spaced between these to the table size </p> <p> <span class="emphasis"><em>rescale</em></span> -- if not zero the table is not rescaled </p> </div> <div class="refsect1" title="Examples"> <a id="id3750954"></a> <h2>Examples</h2> <p> Here is a simple example of the <span class="emphasis"><em>GENexp</em></span> routine. It uses the file <a class="ulink" href="examples/genexp.csd" target="_top"><em class="citetitle">genexp.csd</em></a>. It will generate a simple exp shaped output wave. </p> <div class="example"> <a id="id3750975"></a> <p class="title"> <b>Example 751. A simple example of the GENexp routine.</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 gen01.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 kamp <span class="op">=</span> 30000 ifn <span class="op">=</span> 2 ibas <span class="op">=</span> 1 <span class="comment">; Play the audio sample stored in Table #1.</span> k1 <span class="opc">oscil</span> 1, 10, 1 a1 <span class="opc">oscil</span> kamp<span class="op">*</span>k1, 440, ifn <span class="opc">out</span> a1 <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="comment">; Table #1: read an audio file (using GEN01).</span> <span class="stamnt">f</span> 1 0 131072 "exp" 0 10 0 <span class="stamnt">f</span> 2 0 8192 10 1 <span class="comment">; Play Instrument #1 for 2 seconds.</span> <span class="stamnt">i</span> 1 0 2 <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="id3751013"></a> <h2>See Also</h2> <p> <a class="link" href="GENexp.html" title="GENexp"><em class="citetitle">GENexp</em></a> and <a class="link" href="GENsone.html" title="GENsone"><em class="citetitle">GENsone</em></a>. </p> </div> <div class="refsect1" title="Credits"> <a id="id3751039"></a> <h2>Credits</h2> <p>Written by Victor Lazzarini</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="GENtanh.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="ScoregensTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="GENsone.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">GENtanh </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> GENsone</td> </tr> </table> </div> </body> </html>