Try tanh function mapped to the range of about -5 +5 and a small signal input. http://mathworld.wolfram.com/HyperbolicTangent.html
Here's a nice approximation with five multiplies http://www.musicdsp.org/archive.php?classid=5#238
what's the best and most cpu efficient way to clip a signal in an analogue fashion, rather than getting nasty digital distortion?
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 08/05/2007, at 13.11, padawan12@obiwannabe.co.uk wrote:
Here's a nice approximation with five multiplies http://www.musicdsp.org/archive.php?classid=5#238
Indeed. I had to see it. For anyone interested: http://puredata.info/ Members/stffn/tanh-aprox.png/
Hallo, padawan12@obiwannabe.co.uk hat gesagt: // padawan12@obiwannabe.co.uk wrote:
Try tanh function mapped to the range of about -5 +5 and a small signal input. http://mathworld.wolfram.com/HyperbolicTangent.html
Here's a nice approximation with five multiplies http://www.musicdsp.org/archive.php?classid=5#238
That's a nice version! Attached is a comparision of both in Pd, looks (and sounds) good.
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
Here's a nice approximation with five multiplies http://www.musicdsp.org/archive.php?classid=5#238
That's a nice version! Attached is a comparision of both in Pd, looks (and sounds) good.
Oh, and even it uses only four multiplies - or rather three and one division. ;)
But then the Pd version also calculates the clipped valuesi outside (-3,3), which are always -1 or 1 anyways, so that eats up the savings again.
Frank Barknecht _ ______footils.org_ __goto10.org__
quick tanh looks good. i put in a dollar and my cpu gave me 96 cents change!
Hallo!
quick tanh looks good. i put in a dollar and my cpu gave me 96 cents change!
I did not follow the whole thread, so maybe this was already said.
But I would also do the tanh interpolation with a wavetable. You can simply once use this function to generate the wavetable and then use it and it will be very fast (and you can use any function you want)
too ...
LG Georg