Debian Codegraph @

opcodes/lessthan.xml

raw symbols SCIP
1
2 <refentry id="lessthan">
3 <indexterm id="IndexLtColon"><primary>:</primary></indexterm>
4
5 <indexterm id="IndexLtQuestion"><primary>?</primary></indexterm>
6
7 <indexterm id="IndexLtExpression"><primary>conditional expressions</primary></indexterm>
8
9 <indexterm id="IndexLt"><primary>&lt;</primary></indexterm>
10 <refentryinfo><title>Instrument Control:Conditional Values</title></refentryinfo>
11 <refmeta>
12 <refentrytitle>&lt;</refentrytitle>
13 </refmeta>
14
15
16
17 <refnamediv>
18 <refname>&lt;</refname>
19
20 <refpurpose>
21 Determines if one value is less than another.
22 </refpurpose>
23 </refnamediv>
24
25 <refsect1>
26 <title>Description</title>
27 <para>
28 Determines if one value is less than another.
29 </para>
30 </refsect1>
31
32 <refsect1>
33 <title>Syntax</title>
34 <synopsis>(a <command>&lt;</command> b <command>?</command> v1 <command>:</command> v2)</synopsis>
35
36 <para>
37 where <emphasis>a</emphasis>, <emphasis>b</emphasis>, <emphasis>v1</emphasis> and <emphasis>v2</emphasis> may be expressions, but <emphasis>a</emphasis>, <emphasis>b</emphasis> not audio-rate.
38 </para>
39 </refsect1>
40
41 <refsect1>
42 <title>Performance</title>
43 <para>
44 In the above conditional, <emphasis>a</emphasis> and <emphasis>b</emphasis> are first compared. If the indicated relation is true (<emphasis>a</emphasis> less than <emphasis>b</emphasis>), then the conditional expression has the value of <emphasis>v1</emphasis>; if the relation is false, the expression has the value of <emphasis>v2</emphasis>.
45 </para>
46
47 <para>
48 NB.: If <emphasis>v1</emphasis> or <emphasis>v2</emphasis> are expressions, these will be evaluated before the conditional is determined.
49 </para>
50
51 <para>
52 In terms of binding strength, all conditional operators (i.e. the relational operators (<emphasis>&lt;</emphasis>, etc.), and <emphasis>?</emphasis>, and <emphasis>:</emphasis> ) are weaker than the arithmetic and logical operators (<emphasis>+</emphasis>, <emphasis>-</emphasis>, <emphasis>*</emphasis>, <emphasis>/</emphasis>, <emphasis>&amp;&amp;</emphasis> and <emphasis>||</emphasis>).
53 </para>
54
55 <para>
56 These are <emphasis>operators</emphasis> not <emphasis>opcodes</emphasis>. Therefore, they can be used within orchestra statements, but do not form complete statements themselves.
57 </para>
58 </refsect1>
59
60 <refsect1>
61 <title>Examples</title>
62 <para>
63 Here is an example of the &lt; operator. It uses the file <ulink url="examples/lessthan.csd"><citetitle>lessthan.csd</citetitle></ulink>.
64
65 <example>
66 <title>Example of the &lt; operator.</title>
67
68
69
70 <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
71 <xi:include href="examples-xml/lessthan.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
72 </example>
73
74 Its output should include lines like this:
75 <screen>
76 ipitch = 261.626
77 ipitch = 800.00</screen>
78 </para>
79 </refsect1>
80
81 <refsect1>
82 <title>See also</title>
83 <para><link linkend="ControlConditional"><citetitle>Conditional Values</citetitle></link></para>
84 </refsect1>
85
86 </refentry>