stone-phaser
stone-phaser copied to clipboard
Nonlinearity behavior of OTA all-pass unit
Stumbled upon this paper, suggesting a digital model for OTA stages.
Huovilainen, Antti. "Enhanced digital models for analog modulation effects." Proc. Int. Conf. Digital Audio Effects (DAFx-05), Madrid, Spain. 2005.
I wrote faust code of the digital model section 3.2 (substitute the tanh later)
ota_allpass(f, x) =
x + w
letrec {
'w = w + (2 * R1 * Vt * g / R2) * ma.tanh(-R2 * (x + x' + w) / (2 * R1 * Vt));
}
with {
g = 1 - exp(f * (-2 * ma.PI / ma.SR));
// components
R1 = 27e3;
R2 = 10e3;
C = 68e-9;
// characteristics
Vt = 25e-3;
};
Effect on phase response depending on signal level. (on the left is original, right is OTA)

This is a tabulated tanh function.
copysign(x, y) = ba.if(y<0, -1, +1) * abs(x);
fastTanh(x) = copysign((tab(i1), tab(i2)) : si.interpolate(mu), x) with {
xmax = 5.0;
size = 128;
tab = rdtable(size, (float(ba.time)/float(size-1)) : *(xmax) : ma.tanh);
pos = (float(size-1)/xmax)*abs(x);
mu = pos-int(pos);
i1 = min(int(pos), size-1);
i2 = min(int(pos)+1, size-1);
};