summaryrefslogtreecommitdiff
path: root/opcodes/specaddm.xml
blob: bc60a4a3fca732c1c3403fcf66d2de00bac92faa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<refentry id="specaddm">
<indexterm id="IndexSpecaddm"><primary>specaddm</primary></indexterm>
  <refentryinfo><title>Spectral Processing:Non-Standard</title></refentryinfo>
  <refmeta>
    <refentrytitle>specaddm</refentrytitle>
  </refmeta>


 
  <refnamediv>
    <refname>specaddm</refname>
    <refpurpose>
      Perform a weighted add of two input spectra.
          </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>