SmoothClipS wave shaping / clipping pseudo ugen using sine segments


Part of: miSCellaneous


Wave shaping with sine segments at borders. The amount of smoothness can be controlled: 0 means a linear transfer function, 1 a full sine segment, values inbetween a transfer function which consists of a line and a sine segment. For amount > 0 the slope of the transfer function equals 0 at the borders.


See also: Smooth Clipping and Folding, SmoothClipQ, SmoothFoldS, SmoothFoldQ, SmoothFoldS2, SmoothFoldQ2 



Class Methods


*ar (in, lo, hi, amount, delta)

*kr (in, lo, hi, amount, delta)

in - input signal.

lo - lower limit, defaults to -1.

hi - upper limit, defaults to 1.

amount - amount of smoothness, must be >= 0 and <= 1, defaults to 0.5.

delta - threshold for avoiding zero divisions (which would happen if lo = hi and the border case of amount = 1).

Normally not to be set by the user, except for very small clipping ranges, defaults to 0.00001.


Examples


(

s = Server.local;

Server.default = s;

s.boot;

)

// control smoothness


x = { SmoothClipS.ar(LFTri.ar(300, 0, 0.25), -0.2, 0.2, MouseX.kr(0, 1)) }.scope  


x.release