<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="expsega">
  <refmeta>
    <refentrytitle>expsega</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>expsega</refname>
    <refpurpose>
      An exponential segment generator operating at a-rate.
      <indexterm id="IndexExpsega"><primary>expsega</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      An exponential segment generator operating at a-rate. This unit is almost identical to <emphasis>expseg</emphasis>, but more precise when defining segments with very short durations (i.e., in a percussive attack phase) at audio rate.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>ar <command>expsega</command> ia, idur1, ib [, idur2] [, ic] [...]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ia</emphasis> -- starting value. Zero is illegal.
    </para>

    <para>
      <emphasis>ib</emphasis>, <emphasis>ic</emphasis>, etc. -- value after <emphasis>idur1</emphasis> seconds, etc. must be non-zero and must agree in sign with <emphasis>ia</emphasis>.
    </para>

    <para>
      <emphasis>idur1</emphasis> -- duration in seconds of first segment. A zero or negative value will cause all initialization to be skipped.
    </para>

    <para>
      <emphasis>idur2</emphasis>, <emphasis>idur3</emphasis>, etc. -- duration in seconds of subsequent segments. A zero or negative value will terminate the initialization process with the preceding point, permitting the last defined line or curve to be continued indefinitely in performance. The default is zero.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      These units generate control or audio signals whose values can pass through two or more specified points. The sum of <emphasis>dur</emphasis> values 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 last defined segment to continue on in the same direction.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the expsega opcode. It uses the files <ulink url="examples/expsega.orc"><citetitle>expsega.orc</citetitle></ulink> and <ulink url="examples/expsega.sco"><citetitle>expsega.sco</citetitle></ulink>.

      <example>
        <title>Example of the expsega opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/expsega.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/expsega.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="expseg"><citetitle>expseg</citetitle></link>, 
      <link linkend="expsegr"><citetitle>expsegr</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Author: &namegabriel;</para>
    <para>Example written by &namekevin;.</para>
    <para>New in Csound 3.57</para>
  </refsect1>
</refentry>
