summaryrefslogtreecommitdiff
path: root/opcodes/maxabs.xml
blob: 7988414924f002ff7fdd76eed2937ac34cd1fa95 (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
<refentry id="maxabs">
<indexterm id="IndexMaxabs"><primary>maxabs</primary></indexterm>
  <refentryinfo><title>Signal Modifiers:Comparators and Accumulators</title></refentryinfo>
  <refmeta>
    <refentrytitle>maxabs</refentrytitle>
  </refmeta>


 
  <refnamediv>
    <refname>maxabs</refname>

    <refpurpose>
      Produces a signal that is the maximum of the absolute values of any number of input signals.
          </refpurpose>
  </refnamediv>
 
  <refsect1>
    <title>Description</title>
    <para>
      The <emphasis>maxabs</emphasis> opcode takes any number of a-rate or k-rate signals as input (all of the same rate), and outputs a signal at the same rate that is the maximum of all of the inputs.  It is identical to the <emphasis>max</emphasis> opcode except that it takes the absolute value of each input before comparing them.  Therefore, the output is always non-negative.  For a-rate signals, the inputs are compared one sample at a time (i.e. <emphasis>maxabs</emphasis> does not scan an entire ksmps period of a signal for its local maximum as the <emphasis>max_k</emphasis> opcode does).
    </para>
  </refsect1>
 
  <refsect1>
    <title>Syntax</title>
    <synopsis>amax <command>maxabs</command> ain1 [, ain2] [, ain3] [, ain4] [...]</synopsis>
    <synopsis>kmax <command>maxabs</command> kin1 [, kin2] [, kin3] [, kin4] [...]</synopsis>
  </refsect1>
 
  <refsect1>
    <title>Performance</title>
    <para>
      <emphasis>ain1, ain2, ...</emphasis> --  a-rate signals to be compared.
    </para>

    <para>
      <emphasis>kin1, kin2, ...</emphasis> --  k-rate signals to be compared.
    </para>
  </refsect1>
 
  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="minabs"><citetitle>minabs</citetitle></link>, 
      <link linkend="max"><citetitle>max</citetitle></link>, 
      <link linkend="min"><citetitle>min</citetitle></link>, 
      <link linkend="maxaccum"><citetitle>maxaccum</citetitle></link>, 
      <link linkend="minaccum"><citetitle>minaccum</citetitle></link>, 
      <link linkend="maxabsaccum"><citetitle>maxabsaccum</citetitle></link>, 
      <link linkend="minabsaccum"><citetitle>minabsaccum</citetitle></link>, 
      <link linkend="max_k"><citetitle>max_k</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &nameanthony;</member>
        <member>March 2006</member>
      </simplelist>
    </para>

    <para>New in Csound version 5.01</para>
  </refsect1>
</refentry>