linux: shared memory interface - link with librt
[supercollider.git] / HelpSource / Classes / Pmul.schelp
blob42083987f4314d16a95fc3d41f81f72a0c406e44
1 class:: Pmul
2 summary:: multiply with value of a key in event stream
3 related:: Classes/Padd, Classes/Pmulp
4 categories:: Streams-Patterns-Events>Patterns>Math
6 ClassMethods::
8 method::new
10 argument::value
11 can be a pattern or a stream. The resulting stream ends when that incoming stream ends.
13 Examples::
15 code::
17 var a, b;
18 a = Pmul(\freq, 801, Pbind(\freq, 100));
19 x = a.asStream;
20 9.do({ x.next(Event.new).postln; });
24 code::
26 var a, b;
27 a = Pmul(\freq, Pseq([3, 4, 6], 2), Pbind(\freq, 100));
28 x = a.asStream;
29 9.do({ x.next(Event.new).postln; });
33 code::
34 //sound example
36 SynthDef(\sinegrain,
37         { arg out=0, freq=440, gate=1;
38                 var env;
39                 env = EnvGen.kr(Env.asr(0.001, 1, 0.2), gate, doneAction:2);
40                 Out.ar(out, SinOsc.ar(freq, 0, env * 0.1))
41         }).add;
45 a = Pbind(\dur, 0.5, \instrument, \sinegrain, \freq, 440);
46 b = Pmul(\freq, Pseq([1, 2, 3, 4, 5, 6, 7], inf), a);
47 b.play;