class library: SynthDef - lazy implementation of removeUGen
[supercollider.git] / HelpSource / Classes / UnaryOpUGen.schelp
blob6a61c69a822703598332099a937ac8afc3189d36
1 class:: UnaryOpUGen
2 summary:: Apply a unary operation to the values of an input ugen
3 categories:: UGens>Algebraic
4 related:: Classes/BinaryOpUGen, Classes/UnaryOpFunction, Classes/Punop, Overviews/Operators
6 description::
7 UnaryOpUGens are created as the result of a unary operator applied to a link::Classes/UGen::.
8 code::
9 (SinOsc.ar(200).abs).dump;
10 (LFSaw.ar(200).sin).dump;
12 As in the examples given here, you don't usually need to instantiate UnaryOpUGen yourself.
14 The unary and binary operators are defined in link::Classes/UGen::'s superclass link::Classes/AbstractFunction::, which creates the
15 BinaryOpUGen as a result of the operation.
17 See link::Overviews/Operators:: for an overview of common operators.
19 classmethods::
21 method::new
22 return a new instance that applies the operator code::selector:: to the ugen code::a::
24 argument:: selector
25 The selector symbol for the unary operator
26 argument:: a
27 operand
29 examples::
30 code::
31 a = WhiteNoise.ar; // a WhiteNoise
32 b = a.squared; // a UnaryOpUGen.
33 b.operator; // squared
35 // sound example
37 { var a = LFSaw.ar(300).range(0, 2pi); a.sin * 0.1 }.play;
39 // Plotting the "abs" unary operator (via the server):
41 { SinOsc.ar(300).abs }.plot