SuperCollider CLASSES


Apply a binary operation to the values of an input UGen


BinaryOpUGens are created as the result of a binary operator applied to a UGen.

( *;

The use of the binary operators * and thresh above each instantiate a BinaryOpUGen. The operators themselves (which are methods) are not to be confused with the resulting BinaryOpUGen (which is an object). The unary and binary operators are defined in UGen's superclass AbstractFunction, which creates the BinaryOpUGen as a result of the operation.

When operating on UGens instead of numbers, what results is not a result of the calculation, but a structure that represents that calculation. For the immediate operations on numbers, see for example SimpleNumber.

See Operators for an overview of common operators.

Class Methods

*new (selector, a, b)

return a new instance that applies the operator selector to the UGens a and b normally, this is implicitly called when applying an operator to a UGen.



The selector symbol for the binary operator


left operand


right operand


A new instance of BinaryOpUGen

Inherited class methods

Instance Methods

Inherited instance methods

Undocumented instance methods

-determineRate (a, b)








a =; // a WhiteNoise
b = a + 2; // a BinaryOpUGen.
b.operator; // +

// sound example
    var a =;
    var b =;
    a % b * 0.1

The comparison operators

The operators >, >=, <, <= are particularly useful for triggering. They should not be confused with their use in conditionals. Compare:

if(1 > 0) { "1 is greater than 0".postln }; // > returns a boolean


// trigger an envelope
    var trig;
    trig = > 0.1;, trig, doneAction: 0) *,0,0.1)
) // > outputs 0 or 1

See Operators or the implementation of these in AbstractFunction for more detail.

Since the equality operator ( == ) is used to distinguish objects including UGens, it cannot be used to create a BinaryOpUGen by application. Instead, to get a trigger value each time two signals are the same (instead of just finding out whether two UGens are the same), one can instantiate a BinaryOpUGen directly:

    var a =;
    var b =;
    BinaryOpUGen('==', a, b) * 0.1