[PD] Vanilla replacement for tanh~

i go bananas hard.off at gmail.com
Fri Jul 3 06:23:29 CEST 2015


there's a good approximation for tanh that can be made using just a couple
of simple arithmetic objects:

formula is:  tanh(x) ~= x*(27+x*x) / (27+9*x*x)

it's close enough for every application i've ever come across, it's cheap
cos it only uses simple arithmetic, and it doesn't degrade the resolution
of your signal like a table lookup does.



On Fri, Jul 3, 2015 at 12:56 PM, Chris McCormick <chris at mccormick.cx> wrote:

> On 03/07/15 03:06, Pagano, Patrick wrote:
> > Is there a way i can replace something for tanh~
> > and inits in Vanilla 46?
>
> Using a pre-computed table for speed:
>
> https://github.com/chr15m/blockhead/blob/master/e_tanh.pd
> https://github.com/chr15m/blockhead/blob/master/e_tanh-help.pd
>
> Or install "blockhead" using deken. :)
>
> Cheers,
>
> Chris.
>
> --
> http://mccormick.cx/
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150703/60a76f9d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diytanh~.pd
Type: application/octet-stream
Size: 488 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150703/60a76f9d/attachment.obj>


More information about the Pd-list mailing list