Hi,
is there a vanilla way to implement tanh~ distortion without using expr~?
Thanks! P
hello,
For a distortion, you can use f(x) = x*(27 + x²) / (27 + 9*x²) as a good enough tanh approximation. (x need to be clipped between -3 and 3) https://www.desmos.com/calculator/dxg70xbtne?lang=fr
Cheers C
Le 11/12/2025 à 12:01, Peter P. a écrit :
Hi,
is there a vanilla way to implement tanh~ distortion without using expr~?
Thanks! P
pd-list@lists.iem.at - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/WDXKOYLK6L...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/
Wow, quick and neat -merci bien Cyrille! P
hello,
For a distortion, you can use f(x) = x*(27 + x²) / (27 + 9*x²) as a good enough tanh approximation. (x need to be clipped between -3 and 3) https://www.desmos.com/calculator/dxg70xbtne?lang=fr
Cheers C
Le 11/12/2025 à 12:01, Peter P. a écrit :
Hi,
is there a vanilla way to implement tanh~ distortion without using expr~?
Thanks! P
pd-list@lists.iem.at - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/WDXKOYLK6L...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/
pd-list@lists.iem.at - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/X3SMOHZDQU...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/
Yep, this works great!! Here is the implementation and another one, that is also quite nice…
(It is a patch to be compiled with heavy, but you get the idea)
Am 11.12.2025 um 12:35 schrieb Peter P. peterparker@fastmail.com:
Wow, quick and neat -merci bien Cyrille! P
- cyrille henry ch@chnry.net [2025-12-11 12:11]:
hello,
For a distortion, you can use f(x) = x*(27 + x²) / (27 + 9*x²) as a good enough tanh approximation. (x need to be clipped between -3 and 3) https://www.desmos.com/calculator/dxg70xbtne?lang=fr
Cheers C
Le 11/12/2025 à 12:01, Peter P. a écrit :
Hi,
is there a vanilla way to implement tanh~ distortion without using expr~?
Thanks! P
pd-list@lists.iem.at - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/WDXKOYLK6L...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/
pd-list@lists.iem.at - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/X3SMOHZDQU...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/
pd-list@lists.iem.at - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/pd-list@lists.iem.at/message/QWFI7EJH5B...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/
and if you really want a deep dive, here's a quarter-long course (with crude videos, plus downloadable patches)...
https://msp.ucsd.edu/syllabi/206.15w/index.htm
cheers Miller
On 12/11/25 11:30 AM, Simon Iten wrote:
Yep, this works great!! Here is the implementation and another one, that is also quite nice…
(It is a patch to be compiled with heavy, but you get the idea)
Am 11.12.2025 um 12:35 schrieb Peter P. peterparker@fastmail.com:
Wow, quick and neat -merci bien Cyrille! P
- cyrille henry ch@chnry.net [2025-12-11 12:11]:
hello,
For a distortion, you can use f(x) = x*(27 + x²) / (27 + 9*x²) as a good enough tanh approximation. (x need to be clipped between -3 and 3) https://urldefense.com/v3/__https://www.desmos.com/calculator/dxg70xbtne?lan...
Cheers C
Le 11/12/2025 à 12:01, Peter P. a écrit :
Hi,
is there a vanilla way to implement tanh~ distortion without using expr~?
Thanks! P
pd-list@lists.iem.at - the Pure Data mailinglist https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/pd-list@lis...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://urldefense.com/v3/__https://lists.iem.at/__;!!Mih3wA!Gwvs5Ara2rK8oYy...
pd-list@lists.iem.at - the Pure Data mailinglist https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/pd-list@lis...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://urldefense.com/v3/__https://lists.iem.at/__;!!Mih3wA!Gwvs5Ara2rK8oYy...
pd-list@lists.iem.at - the Pure Data mailinglist https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/pd-list@lis...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://urldefense.com/v3/__https://lists.iem.at/__;!!Mih3wA!Gwvs5Ara2rK8oYy...
pd-list@lists.iem.at - the Pure Data mailinglist https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/pd-list@lis...
To unsubscribe send an email to pd-list-leave@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://urldefense.com/v3/__https://lists.iem.at/__;!!Mih3wA!Gwvs5Ara2rK8oYy...
and if you really want a deep dive, here's a quarter-long course (with crude videos, plus downloadable patches)...
Thanks Miller, I event looked at this one before posting to this list, but couldn't find that one specific implementation quickly enough. This course has one of my favourite titles for an academic offering.
best, P