You can do 2. just with PV_MagMul.
S.
(
//use as table
var size = 700, bufsize = 2048, sum, factor, step, env;
factor = bufsize / size;
step = factor.reciprocal;
t = Array.fill(size - 1, {|i| (i + 1).explin(1, size, 1, bufsize) - 1});
sum = t.sum;
t = t * (1 / sum);
e = Buffer.alloc(s, bufsize, 1);
d = Buffer.alloc(s, bufsize, 1);
f = Buffer.read(s,"sounds/a11wlk01.wav");
a = SCWindow("test", Rect(200 , 450, size + 40, 150));
a.view.decorator = FlowLayout(a.view.bounds);
b = SCMultiSliderView(a, Rect(0, 0, size, 100));
c = Array.new;
size.do({arg i;
c = c.add(0.0);
});
c = c.reverse;
b.value_(c);
b.isFilled_(true);
// width in pixels of each stick
b.indexThumbSize_(1);
// spacing on the value axis
b.gap_(0);
a.front;
env = Env(c, t);
d.loadCollection(env.asSignal(bufsize));
b.action = {arg ms;
var ind, firstChd, lastChd, setSize, muls;
ind = ms.index;
c[ind] = ms.value[ind];
};
b.mouseUpAction = {
d.loadCollection(Env(c, t).asSignal(bufsize); );
};
)
(
SynthDef("help-magMul", { arg out=0, bufnumA=0, bufnumB=1;
var inA, chainA, inB, chainB, chain;
inA = WhiteNoise.ar(0.2);
chainA = FFT(bufnumA, inA);
chain = PV_MagMul(chainA, bufnumB);
Out.ar(out, 0.5 * IFFT(chain).dup);
}).play(s,[\out, 0, \bufnumA, e.bufnum, \bufnumB, d.bufnum ]);
)