tanh()

tanh(value)

Category

Math / Waveshaping

Description

Returns the hyperbolic tangent of value. Around zero the response is nearly linear; larger positive or negative values are smoothly compressed toward +1 or -1. This makes tanh() useful as a symmetrical soft-saturation waveshaper.

Arguments

Example

0.65*attack(120)*release(12000)*tanh(2.5*saw(X))

Notes

The result is bounded between -1 and +1. Apply output gain after tanh() if the shaped signal needs level compensation.