2 summary:: multiplies with value of a key in event stream, before it is passed up
3 related:: Classes/Pmul, Classes/Pmulp
4 categories:: Streams-Patterns-Events>Patterns>Math
8 Multiplies with a value in an event, strong::before it is passed up:: the stream. To multiply with the value after it has been passed down, use link::Classes/Pmul::.
13 a = Pmulpre(\note, 2, Pbind(\note, Pseq([1, 2, 3])));
15 9.do({ x.next(Event.default).postln; });
19 Pmulpre does not override incoming values:
23 a = Pmulpre(\freq, 801, Pset(\freq, 500, Pbind(\dur, 0.2)));
25 9.do({ x.next(Event.default).postln; });
34 can be a pattern or a stream. The resulting stream ends when that incoming stream ends.
41 a = Pmulpre(\freq, Pseq([401, 801], 2), Pbind(\dur, 0.5));
43 9.do({ x.next(Event.new).postln; });
51 { arg out=0, freq=440, sustain=0.02;
53 env = EnvGen.kr(Env.perc(0.001, sustain), 1, doneAction:2);
54 Out.ar(out, SinOsc.ar(freq, 0, env * 0.1))
59 a = Pbind(\dur, 0.5, \instrument, \sinegrain);
60 b = Pmulpre(\freq, Pseq([1, 2, 3], inf), a);