<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="specaddm">
  <refmeta>
    <refentrytitle>specaddm</refentrytitle>
  </refmeta>
 
  <refnamediv>
    <refname>specaddm</refname>
    <refpurpose>
      Perform a weighted add of two input spectra.
      <indexterm id="IndexSpecaddm"><primary>specaddm</primary></indexterm>
    </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      Perform a weighted add of two input spectra.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>wsig <command>specaddm</command> wsig1, wsig2 [, imul2]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>imul2</emphasis> (optional, default=0) -- if non-zero, scale the <emphasis>wsig2</emphasis> magnitudes before adding. The default value is 0.
    </para>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>wsig1</emphasis> -- the first input spectra.
    </para>

    <para>
      <emphasis>wsig2</emphasis> -- the second input spectra.
    </para>

    <para>
      Do a weighted add of two input spectra. For each channel of the two input spectra, the two magnitudes are combined and written to the output according to:
      <literallayout>
magout = mag1in + mag2in * imul2
      </literallayout>
    </para>

    <para>
      The operation is performed whenever the input <emphasis>wsig1</emphasis> is sensed to be new. This unit will (at Initialization) verify the consistency of the two spectra (equal size, equal period, equal mag types).
    </para>
  </refsect1>
 
  <refsect1>
    <title>Examples</title>
    <para>
      <informalexample>
        <programlisting>
  wsig2    <emphasis>specdiff</emphasis>         wsig1               ; sense onsets 
  wsig3    <emphasis>specfilt</emphasis>         wsig2, 2            ; absorb slowly 
           <emphasis>specdisp</emphasis>         wsig2, .1           ; &amp; display both spectra 
           <emphasis>specdisp</emphasis>         wsig3, .1
        </programlisting>
      </informalexample>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="specdiff"><citetitle>specdiff</citetitle></link>,
      <link linkend="specfilt"><citetitle>specfilt</citetitle></link>,
      <link linkend="spechist"><citetitle>spechist</citetitle></link>,
      <link linkend="specscal"><citetitle>specscal</citetitle></link>
    </para>
  </refsect1>
</refentry>
