2 categories:: UGens>Maths
3 summary:: Multiply and add to a signal
6 Multiplies the signal by mul and adds add. This UGen is very efficient (it performs various optimisation checks, for example). It is used very heavily throughout SuperCollider to perform multiply and add operations on the server; in fact it is what "really" performs the mul and add arguments found in many UGens.
8 See also the discussion of mul and add arguments in the link::Classes/UGen:: help file.
17 multiply with this value
34 // The mul and add arguments of SinOsc themselves use MulAdd!
35 // These two examples will create precisely the same synth graph:
36 x = { SinOsc.ar(440, 0, 0.1, 0.05) }.play(s);
37 x.trace; // You should see a "MulAdd" in the trace
40 x = { MulAdd(SinOsc.ar(440, 0), 0.1, 0.05) }.play(s);
44 // In fact this will produce the same graph too - the separate multiply and add are optimised into one MulAdd
45 x = { SinOsc.ar(440, 0) * 0.1 + 0.05 }.play(s);
49 (Note: the "trace" message is described in the helpfile for link::Classes/Node::.)