Sophie

Sophie

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

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>transegb</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="transeg.html" title="transeg" />
    <link rel="next" href="transegr.html" title="transegr" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">transegb</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="transeg.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="transegr.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="transegb">
      <a id="transegb"></a>
      <div class="titlepage"></div>
      <a id="IndexTransegb" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">transegb</span>
        </h2>
        <p>transegb — 
      Constructs a user-definable envelope in absolute time.
    </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp49291744"></a>
        <h2>Description</h2>
        <p>
      Constructs a user-definable envelope in absolute time.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp49336720"></a>
        <h2>Syntax</h2>
        <pre class="synopsis">ares <span class="command"><strong>transegb</strong></span> ia, itim, itype, ib [, itim2] [, itype] [, ic] ...</pre>
        <pre class="synopsis">kres <span class="command"><strong>transegb</strong></span> ia, itim, itype, ib [, itim2] [, itype] [, ic] ...</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp49338512"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>ia</em></span> -- starting value.
    </p>
        <p>
      <span class="emphasis"><em>ib, ic,</em></span> etc. -- value after <span class="emphasis"><em>itim</em></span> seconds.
    </p>
        <p>
      <span class="emphasis"><em>itim</em></span> -- time in seconds of end of first segment.
    </p>
        <p>
      <span class="emphasis"><em>itim2,... itimx</em></span> etc. -- time in seconds at
      the end of the segment.
    </p>
        <p>
      <span class="emphasis"><em>itype, itype2,</em></span> etc. -- if 0, a straight line is produced. If non-zero, then <span class="emphasis"><em>transegb</em></span> creates the following curve, for <span class="emphasis"><em>n</em></span> steps:

      </p>
        <div class="literallayout">
          <p><br />
ibeg + (ivalue - ibeg) * (1 - exp( i*itype/(n-1) )) / (1 - exp(itype))<br />
      </p>
        </div>
        <p>
    </p>
      </div>
      <div class="refsect1" title="Performance">
        <a id="idp49342440"></a>
        <h2>Performance</h2>
        <p>
      If <span class="emphasis"><em>itype</em></span> &gt; 0, there is a slowly rising (concave) or slowly decaying
      (convex) curve, while if <span class="emphasis"><em>itype</em></span> &lt; 0, the curve is fast rising (convex) or
      fast decaying (concave). See also <a class="link" href="GEN16.html" title="GEN16"><em class="citetitle">GEN16</em></a>.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp49344328"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the transegb opcode. It uses the file <a class="ulink" href="examples/transegb.csd" target="_top"><em class="citetitle">transegb.csd</em></a>. The example produces the following output:
      </p>
        <div class="mediaobject">
          <img src="images/transegb.png" alt="Output of the transegb example." />
          <div class="caption">
            <p>Output of the transegb example.</p>
          </div>
        </div>
        <p>
      </p>
        <div class="example">
          <a id="idp49346976"></a>
          <p class="title">
            <strong>Example 893. Example of the transegb 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>
<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 transeg.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> 128
<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
<span class="comment">;p4 and p5 determine the type of curve for each</span>
<span class="comment">;section of the envelope</span>
kenv transegb 0.01, p3<span class="op">*</span>0.25, p4, 1, p3, p5, 0.01
a1 <span class="opc">oscil</span> kenv, 440, 1
<span class="opc">outs</span> a1, a1
<span class="oblock">endin</span>

<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>
<span class="comment">; Table #1, a sine wave.</span>
<span class="stamnt">f</span> 1 0 16384 10 1

<span class="stamnt">i</span> 1 0 2 2 2
<span class="stamnt">i</span> 1 + . 5 5
<span class="stamnt">i</span> 1 + . 1 1
<span class="stamnt">i</span> 1 + . 0 0
<span class="stamnt">i</span> 1 + . -2 -2
<span class="stamnt">i</span> 1 + . -2 2
<span class="stamnt">i</span> 1 + . 2 -2
<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="idp49349256"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="expseg.html" title="expseg"><em class="citetitle">expseg</em></a>,
      <a class="link" href="expsega.html" title="expsega"><em class="citetitle">expsega</em></a>,
      <a class="link" href="expsegb.html" title="expsegb"><em class="citetitle">expsega</em></a>,
      <a class="link" href="expsegr.html" title="expsegr"><em class="citetitle">expsegr</em></a>,
      <a class="link" href="linseg.html" title="linseg"><em class="citetitle">linseg</em></a>,
      <a class="link" href="linsegb.html" title="linsegb"><em class="citetitle">linsegb</em></a>,
      <a class="link" href="linsegr.html" title="linsegr"><em class="citetitle">linsegr</em></a>,
      <a class="link" href="transeg.html" title="transeg"><em class="citetitle">transeg</em></a>
      <a class="link" href="transegr.html" title="transegr"><em class="citetitle">transegr</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp49354096"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: John ffitch</td>
          </tr>
          <tr>
            <td>University of Bath, Codemist. Ltd.</td>
          </tr>
          <tr>
            <td>Bath, UK</td>
          </tr>
          <tr>
            <td>June 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="transeg.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="transegr.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">transeg </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> transegr</td>
        </tr>
      </table>
    </div>
  </body>
</html>