The new version seems very well-behaved. Very nice!
I made a small tweak to allow higher gain levels. It doesn't seem to affect the anti-aliasing ability. Tested up to 90 dB on a 100 Hz sine wave.
Instead of:
Code:
slider3 ? (
spl0 = ch0.antialiased_tanh_rect(spl0);
spl1 = ch1.antialiased_tanh_rect(spl1);
) : (
spl0 = tanh(spl0);
spl1 = tanh(spl1);
);
I have:
Code:
slider3 ? (
354 < abs(spl0) ? (
spl0 = sign(spl0);
):(
spl0 = ch0.antialiased_tanh_rect(spl0);
);
354 < abs(spl1) ? (
spl1 = sign(spl1);
):(
spl1 = ch1.antialiased_tanh_rect(spl1);
);
) : (
spl0 = tanh(spl0);
spl1 = tanh(spl1);
);