Hey,
the problem here is this: you’re taking over coef
directly in the Fb1 function, hence it’s only kr, due to the way the Fb1 func is used. If you want it at ar you’d have to pass it with the in
arg. That’s an important piece of information that maybe goes under a bit in the lengthy help file (although it’s mentioned and used in several examples).
I did not analyze your modulator but the result now looks smooth:
(
s.options.blockSize = 8;
s.quit.reboot;
)
(
{
var d = 2;
var width = 0.20;
var freq = 400;
var coef, allp;
var sig = SinOsc.ar(freq);
var phasor = LFSaw.ar(freq/2, 1).linlin(-1,1, width.neg, 1-width);
phasor = phasor.bilin(0, width.neg, 1-width, 0, -0.5, 1);
coef = (Select.ar(phasor>0, [0.5+phasor, phasor])*2pi).sin.fold(0,1);
allp = Fb1(
{ |in, out|
// define these variables for better readability !
// first index is lookback,
// second the index of the array passed as 'in' arg
var coef = in[0][1];
var in_0 = in[0][0];
var in_d = in[d][0];
(coef.neg * in_0) + in_d + (coef * out[d])
},
[sig, coef],
inDepth: d + 1, outDepth: d + 1,
blockSize: s.options.blockSize
);
[phasor, coef, allp]
}.plot
)
Note that sig and coef could also be multichannel signals. In this case it’s even more relevant to define extra variables within Fb1 in order to avoid confusion (as you could have tripled array indices).