For different kinds of soft clipping, also try:
[expr~ 1.5 * $v1 - 0.5 * pow($v1, 3)] [expr~ tanh($v1)] [expr~ $v1 / (abs($v1) + 1)]
I wrote the zhzxh~ external (in CVS), which produces very noisy distortion using a very simple algorithm which isn't waveshaping; I'm not sure how you'd classify it:
while (n--) { f = *(in++); if (lastval < f) *out = lastval + delta; else *out = lastval - delta; lastval = *(out++); }
Changing delta alters the character of the distortion.
Ben
On Tuesday 20 July 2004 05:48 pm, pix wrote:
linear remapping is not so hard if you can define your remapping mathematically. i'm a bit of a fan of this function (which i'll write as an expr for handy use).
[expr~ 2/(1+pow($f2,-$f1))-1]
your input goes in the left, the signal on the right is a control (sensible values >1).