Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 6ed14ebfd686aa32f7956e552aa2e21d > files > 2121

csound-manual-5.13.0-5.fc15.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>maxabsaccum</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="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="maxabs.html" title="maxabs" />
    <link rel="next" href="maxaccum.html" title="maxaccum" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">maxabsaccum</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="maxabs.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="maxaccum.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="maxabsaccum">
      <a id="maxabsaccum"></a>
      <div class="titlepage"></div>
      <a id="IndexMaxabsaccum" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">maxabsaccum</span>
        </h2>
        <p>maxabsaccum — 
      Accumulates the maximum of the absolute values of audio signals.
          </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="id3011700"></a>
        <h2>Description</h2>
        <p>
      <span class="emphasis"><em>maxabsaccum</em></span> compares two audio-rate variables and stores the maximum of their absolute values into the first.  
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="id3011715"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>maxabsaccum</strong></span> aAccumulator, aInput</pre>
      </div>
      <div class="refsect1" title="Performance">
        <a id="id3012708"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>aAccumulator</em></span> -- audio variable to store the maximum value
    </p>
        <p>
      <span class="emphasis"><em>aInput</em></span> -- signal that aAccumulator is compared to
    </p>
        <p>
      The <span class="emphasis"><em>maxabsaccum</em></span> opcode is designed to accumulate the maximum value from among many audio signals that may be in different note instances, different channels, or otherwise cannot all be compared at once using the <span class="emphasis"><em>maxabs</em></span> opcode.  <span class="emphasis"><em>maxabsaccum</em></span> is identical to <span class="emphasis"><em>maxaccum</em></span> except that it takes the absolute value of aInput before the comparison.  Its semantics are similar to <span class="emphasis"><em>vincr</em></span> since <span class="emphasis"><em>aAccumulator</em></span> is used as both an input and an output variable, except that <span class="emphasis"><em>maxabsaccum</em></span> keeps the maximum absolute value instead of adding the signals together.  <span class="emphasis"><em>maxabsaccum</em></span> performs the following operation on each pair of samples:
    </p>
        <p>
      </p>
        <div class="literallayout">
          <p><br />
            if  (abs(aInput) &gt; aAccumulator)  aAccumulator = abs(aInput)<br />
      </p>
        </div>
        <p>
    </p>
        <p>
      <span class="emphasis"><em>aAccumulator</em></span> will usually be a global audio variable.  At the end of any given computation cycle (k-period), after its value is read and used in some way, the accumulator variable should usually be reset to zero  (perhaps by using the <span class="emphasis"><em>clear</em></span> opcode).  Clearing to zero is sufficient for <span class="emphasis"><em>maxabsaccum</em></span>, unlike the <span class="emphasis"><em>maxaccum</em></span> opcode.
    </p>
      </div>
      <div class="refsect1" title="See Also">
        <a id="id3012806"></a>
        <h2>See Also</h2>
        <p>
      <a class="link" href="minabsaccum.html" title="minabsaccum"><em class="citetitle">minabsaccum</em></a>, 
      <a class="link" href="maxaccum.html" title="maxaccum"><em class="citetitle">maxaccum</em></a>, 
      <a class="link" href="minaccum.html" title="minaccum"><em class="citetitle">minaccum</em></a>, 
      <a class="link" href="max.html" title="max"><em class="citetitle">max</em></a>, 
      <a class="link" href="min.html" title="min"><em class="citetitle">min</em></a>, 
      <a class="link" href="maxabs.html" title="maxabs"><em class="citetitle">maxabs</em></a>, 
      <a class="link" href="minabs.html" title="minabs"><em class="citetitle">minabs</em></a>, 
      <a class="link" href="vincr.html" title="vincr"><em class="citetitle">vincr</em></a>,
      <a class="link" href="clear.html" title="clear"><em class="citetitle">clear</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="id3012887"></a>
        <h2>Credits</h2>
        <p>
      </p>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Anthony Kozar</td>
          </tr>
          <tr>
            <td>March 2006</td>
          </tr>
        </table>
        <p>
    </p>
        <p>New in Csound version 5.01</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="maxabs.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="maxaccum.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">maxabs </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> maxaccum</td>
        </tr>
      </table>
    </div>
  </body>
</html>