<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="transeg">
  <refmeta>
    <refentrytitle>transeg</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>transeg</refname>
    <refpurpose>
      Constructs a user-definable envelope.
      <indexterm id="IndexTranseg"><primary>transeg</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Constructs a user-definable envelope.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>transeg</command> ia, idur, itype, ib [, idur2] [, itype] [, ic] ...</synopsis>
    <synopsis>kr <command>transeg</command> ia, idur, itype, ib [, idur2] [, itype] [, ic] ...</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ia</emphasis> -- starting value.
    </para>

    <para>
      <emphasis>ib, ic,</emphasis> etc. -- value after <emphasis>idur</emphasis> seconds.
    </para>

    <para>
      <emphasis>idur, idur2,</emphasis> etc. -- duration in seconds of segment
    </para>

    <para>
      <emphasis>itype, itype2,</emphasis> etc. -- if 0, a straight line is produced. If non-zero, then <emphasis>transeg</emphasis> creates the following curve, for <emphasis>n</emphasis> steps:

      <literallayout>
ibeg + (ivalue - ibeg) * (1 - exp( i*itype/(n-1) )) / (1 - exp(itype))
      </literallayout>
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      If <emphasis>itype</emphasis> &gt; 0, there is a slowly rising, fast decaying (convex) curve, while if <emphasis>itype</emphasis> &lt; 0, the curve is fast rising, slowly decaying (concave). See also <link linkend="GEN16"><citetitle>GEN16</citetitle></link>.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namejohn;</member>
        <member>University of Bath, Codemist. Ltd.</member>
        <member>Bath, UK</member>
        <member>October 2000</member>
      </simplelist>
    </para>

    <para>New in Csound version 4.09</para>
    <para>Thanks goes to Matt Gerassimoff for pointing out the correct command syntax.</para>
  </refsect1>
</refentry>
