View Single Post
Old 07-07-2019, 08:50 AM   #497
Human being with feelings
sai'ke's Avatar
Join Date: Aug 2009
Location: NL
Posts: 709

Ask him what he means. The sentence is ambiguous and could refer to any number of things.

Originally Posted by danerius View Post
spl0 = min(max(spl0,-1),1);
spl1 = min(max(spl1,-1),1);
Clamps the input between -1 and 1, any higher signal will be clipped to -1 or 1.

Originally Posted by danerius View Post
spl0 = (1+foo)*spl0/(1+foo*abs(spl0));
spl1 = (1+foo)*spl1/(1+foo*abs(spl1));
This interpolates between no distortion to a smooth clipper for positive values of foo. For negative values all hell can break loose.

I don't really see why you would want to clip the signal before the smooth function in this case, since the smooth function already nicely goes into saturation.
[Tracker Plugin: Thread|Github|Reapack] | [Routing Plugin: Thread|Reapack] | [Filther: Thread|Github|Reapack] | [More JSFX: Thread|Reapack]
sai'ke is offline   Reply With Quote