Debian Codegraph @

opcodes/cmp.xml

raw symbols SCIP
1 <!--Change refentry id and indexterm id-->
2 <refentry id="cmp">
3 <indexterm id="IndexCmp"><primary>cmp</primary></indexterm>
4 <!--Make sure the category below is a valid one! See categories.py-->
5 <refentryinfo><title>Signal Modifiers:Comparators and Accumulators</title></refentryinfo>
6 <refmeta>
7 <refentrytitle>cmp</refentrytitle>
8 </refmeta>
9
10 <refnamediv>
11 <refname>cmp</refname>
12 <refpurpose>
13 Compares audio signals or arrays
14 </refpurpose>
15 </refnamediv>
16 <refsect1>
17 <title>Description</title>
18 <para>Plugin opcode in emugens.</para>
19 <para>
20 Compares audio signals or arrays, sample by sample or value by value
21 All comparison operations are possible: `&lt; `&lt;=, >, >=, ==, !=
22 </para>
23 <para>
24 An audio signal can be compared against another audio signal, or
25 against a scalar (i- or k-value).
26
27 <programlisting>
28 aOut cmp aL, ">", aR
29 aOut cmp aIn, ">=", 0.5
30 aOut cmp aIn, "`&lt;=", kthreshold
31 </programlisting>
32 </para>
33 <para>
34 An array can be compared against another array, against a scalar,
35 or checked to be within the range of two scalars. All operations
36 are available for i- and k- arrays
37 <programlisting>
38 kOut[] cmp kIn[], ">=", kx
39 kOut[] cmp kA[], "==", kB[]
40 kOut[] cmp 0.5, "`&lt;", kIn[], "`&lt;=", 1
41 </programlisting>
42 </para>
43 </refsect1>
44
45 <refsect1>
46 <title>Syntax</title>
47 <!-- Please keep this below ~70 characters by using backslashes to avoid overflow in the pdf version-->
48 <synopsis>aout <command>cmp</command> a1, S_operator, a2</synopsis>
49 <synopsis>aout <command>cmp</command> a1, S_operator, kb</synopsis>
50 <synopsis>kOut[] <command>cmp</command> kA[], S_operator, kb</synopsis>
51 <synopsis>kOut[] <command>cmp</command> kA[], S_operator, kB[]</synopsis>
52
53 <synopsis>kOut[] <command>cmp</command> k1, S_operator1, kIn[], S_operator2, k2</synopsis>
54 </refsect1>
55
56 <refsect1>
57 <title>Initialization</title>
58 <para>
59 <emphasis>S_operator</emphasis> Math operator, one of ">", ">=", "`&lt;",
60 "`&lt;=", "=="
61 </para>
62 </refsect1>
63
64 <refsect1>
65 <title>Performance</title>
66 <!-- First list all input and output performance parameters-->
67 <para><emphasis>a1 / a2</emphasis> -- Input signals</para>
68 <para><emphasis>kb / ib</emphasis> -- Scalar term</para>
69 <para><emphasis>kA[] / kB[]</emphasis> -- array inputs</para>
70
71
72 <para>
73 Some example usages:
74 <programlisting>
75 aout cmp aL, ">", aR ; aout = aL > aR for every sample
76 aout cmp aL, ">=", aR
77 aout cmp aL, "`&lt;", aR
78 aout cmp aL, "`&lt;=", aR
79 aout cmp aL, "==", aR
80 kOut[] cmp kA, ">=", kb ; kA is an array
81 </programlisting>
82 </para>
83 </refsect1>
84 <refsect1>
85 <!--To add examples, create the csd file in the examples directory, then run:-->
86 <!--python csd2docbook.py -f newopcodename.csd-->
87 <!--to generate the xml highlighted version used below-->
88 <title>Examples</title>
89 <para>
90 Here is an example of the cmp opcode. It uses the file <ulink url="examples/cmp.csd"><citetitle>cmp.csd</citetitle></ulink>.
91 <example>
92 <title>Example of the cmp opcode.</title>
93 <xi:include href="examples-xml/cmp.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
94 </example>
95 </para>
96 </refsect1>
97
98 <refsect1>
99 <title>See also</title>
100 <para><link linkend="MathArtLogic"><citetitle>Arithmetic and Logic Operations</citetitle></link></para>
101 <para><link linkend="SigmodCompaccum"><citetitle>Comparators and Accumulators</citetitle></link></para>
102 <para><link linkend="arrayOpcodes"><citetitle>Array opcodes</citetitle></link></para>
103 </refsect1>
104
105 <refsect1>
106 <!-- And put your name and other relevant information here-->
107 <title>Credits</title>
108 <para>By: &nameeduardo; 2017</para>
109 </refsect1>
110
111 <!--Now remember to add a link from the appropriate category in the Opcode Overview.-->
112 <!--Add the entity to manual.xml-->
113 <!--Add the entity reference in the appropriate place in opcodes op.xml-->
114 <!--And you're set! Maybe delete the comments as well...-->
115
116 </refentry>