<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>BinaryOpUGen</title>
    <link rel="stylesheet" href="styles/default/main.css" type="text/css"/>
    <meta name="generator" content="DocBook XSL Stylesheets V1.70.1"/>
    <link rel="start" href="index.xml" title="SuperCollider Reference Manual"/>
    <link rel="up" href="UGens.Base.xml" title="Base"/>
    <link rel="prev" href="UGen-doneActions.xml" title="doneActions"/>
    <link rel="next" href="UnaryOpUGen.xml" title="UnaryOpUGen"/>
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">BinaryOpUGen</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="UGen-doneActions.xml">Prev</a> </td>
          <th width="60%" align="center">Base</th>
          <td width="20%" align="right"> <a accesskey="n" href="UnaryOpUGen.xml">Next</a></td>
        </tr>
      </table>
    </div>
    <div class="refentry" lang="en"><a id="BinaryOpUGen"/><div class="titlepage"/>

  <div class="refnamediv"><h2>BinaryOpUGen</h2><p>
    BinaryOpUGen
     — 
      FIXME: BinaryOpUGen purpose.
      <a id="IndexBinaryOpUGen" class="indexterm"/>
    
  </p></div>

  <div class="refsection" lang="en"><a id="id3653230"/>
    <h2>Description</h2>
    <p>
      BinaryOpUGens are created as the result of a binary operator applied to a
      UGen.
      </p><div class="informalexample">
        <pre class="programlisting">(SinOsc.ar(200) * ClipNoise.ar).dump;
(SinOsc.ar(200).thresh(0.5)).dump;</pre>
      </div><p>
      The use of the binary operators * and thresh above each instantiate a
      BinaryOpUGen. Do not confuse the operators themselves (which are methods)
      with the resulting BinaryOpUGen, which is an object. When applied to
      other classes they may not return new objects, and can behave in a more
      straightforward manner. See for example [SimpleNumber].
    </p>
    <p>
      The operators &gt;, &gt;=, &lt;, and &lt;= are particularly useful for
      triggering. They should not be confused with their use in conditionals.
      Compare:
      </p><div class="informalexample">
        <pre class="programlisting">(1 &gt; 0).if({"1 is greater than 0".postln}); // &gt; returns a boolean</pre>
      </div><p>
      with
      </p><div class="informalexample">
        <pre class="programlisting">( // trigger an envelope
{
	var trig;
	trig = SinOsc.ar(1) &gt; 0.1;
	Out.ar(0,
		EnvGen.kr(Env.perc, trig, doneAction: 0)
			* SinOsc.ar(440,0,0.1)
	)
}.play(s);) // &gt; outputs 0 or 1</pre>
      </div><p>
    </p>
  </div>

  <div class="refsection" lang="en"><a id="id3653281"/>
    <h2>Methods</h2>

    <div class="refsection" lang="en"><a id="id3653288"/>
      <h3>*new</h3>

      <code class="methodsynopsis">BinaryOpUGen.new<b>(</b><span class="methodparam">selector</span>, <span class="methodparam">a</span>, <span class="methodparam">b</span><b>)</b>;</code>

      <div class="variablelist"><table border="0"><col align="left" valign="top"/><tbody><tr><td><span class="term"><em class="parameter"><code>selector</code></em></span></td><td>
            
              FIXME: explain parameter selector.
            
          </td></tr><tr><td><span class="term"><em class="parameter"><code>a</code></em></span></td><td>
            
              FIXME: explain parameter a.
            
          </td></tr><tr><td><span class="term"><em class="parameter"><code>b</code></em></span></td><td>
            
              FIXME: explain parameter b.
            
          </td></tr></tbody></table></div>

    </div>
  </div>

  

  <div class="refsection" lang="en"><a id="id3653392"/>
    <h2>See Also</h2>
    <p>
      <a href="UnaryOpUGen.xml" title="UnaryOpUGen">UnaryOpUGen</a>
    </p>
  </div>
</div>
    <div class="navfooter">
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="UGen-doneActions.xml">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="UGens.Base.xml">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="UnaryOpUGen.xml">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">doneActions </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.xml">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> UnaryOpUGen</td>
        </tr>
      </table>
    </div>
  </body>
</html>
