Adjusting the knee of a sigmoid limiting function

DSP, Plug-in and Host development discussion.
camsr
KVRAF
6890 posts since 17 Feb, 2005

Post Fri Dec 29, 2017 5:38 pm

I have put together a small graphing of how this can be achieved with some basic scaling functions. What is achieved with this function is the insertion of a linear segment with the sigmoid's transfer applied piecewise on both sides, and matching the position and derivative of the sigmoid to the linear segment for (at least) C0 continuity. It's also a basic example of how to make a clipper with an adjustable knee.

https://www.desmos.com/calculator/ovynsbqgaj

Adjusting the slider named G sets the threshold of the linear segment. If you have any questions feel free to ask.
Image

stratum
KVRAF
2118 posts since 29 May, 2012

Re: Adjusting the knee of a sigmoid limiting function

Post Sat Dec 30, 2017 5:47 pm

My past experiments with these tended to show this kind of 'waveshaper tweaking' doesn't really make much audible difference, at least not when applied to a guitar signal, the reason being the fact the guitarists' conception of 'low distortion' is actually pretty high, and by 'high gain' they mean 'ridiculously so'.
~stratum~

matt42
KVRian
1072 posts since 9 Jan, 2006

Re: Adjusting the knee of a sigmoid limiting function

Post Sat Dec 30, 2017 7:23 pm

Sure, but not every distortion/saturation is designed for guitarists

stratum
KVRAF
2118 posts since 29 May, 2012

Re: Adjusting the knee of a sigmoid limiting function

Post Sat Dec 30, 2017 7:29 pm

Sure, but not every distortion/saturation is designed for guitarists
Actually it wasn't so obvious by the time. DIY guitar amp forums are full of people who think adjusting the bias of this or that tube changes the amps tone significantly.
~stratum~

matt42
KVRian
1072 posts since 9 Jan, 2006

Re: Adjusting the knee of a sigmoid limiting function

Post Sat Dec 30, 2017 7:54 pm

Well, again I've no idea if camsr even had guitarists specifically in mind when posting this clipper. In the general case changing the shape of a transfer function will change the character of the saturation.

Off topic: I've never modded an actual tube amp (something which shouldn't be modeled with simple wave shapers, really), but playing with these values (tube type, bias etc) in the bias amp simulation does make audible diffences as far as I can tell.
Last edited by matt42 on Sat Dec 30, 2017 7:59 pm, edited 1 time in total.

stratum
KVRAF
2118 posts since 29 May, 2012

Re: Adjusting the knee of a sigmoid limiting function

Post Sat Dec 30, 2017 7:58 pm

Off topic: I've never modded an actual tube amp (something which shouldn't be modeled with simple wave shapes, really), but playing with these values (tube type, bias etc) in the bias amp simulation does make audible diffences as far as I can tell.
When you change something in an analog circuit something else that depends on it always changes. The natural conclusion happens to be that clipping function has changed, and that's why it sounds different, and fourier analysis with simple sine waves supports that view, but in reality it's not a controlled experiment.
~stratum~

camsr
KVRAF
6890 posts since 17 Feb, 2005

Re: Adjusting the knee of a sigmoid limiting function

Post Sat Dec 30, 2017 8:17 pm

matt42 wrote:Well, again I've no idea if camsr even had guitarists specifically in mind when posting this clipper. In the general case changing the shape of a transfer function will change the character of the saturation.
The basic effect this example has, is with a harder knee it makes the onset of distortion more sudden, because sigmoids have a way of sounding like they touch every part of the sound. The bonus is the c0 continuity, which limits the generation of harmonics the further they are from the fundamental tone. But a harder knee will make brighter harmonics also.
Image

matt42
KVRian
1072 posts since 9 Jan, 2006

Re: Adjusting the knee of a sigmoid limiting function

Post Sat Dec 30, 2017 8:22 pm

@ stratum. There's a lot to discuss in the points you bring up, but I feel we're straying too far off topic and should let the focus return to camsr's wave shaping function

camsr
KVRAF
6890 posts since 17 Feb, 2005

Re: Adjusting the knee of a sigmoid limiting function

Post Sun Dec 31, 2017 4:04 am

matt42 wrote:@ stratum. There's a lot to discuss in the points you bring up, but I feel we're straying too far off topic and should let the focus return to camsr's wave shaping function
Well I don't actually mind if you keep bumping the thread with off-topic guitar distortion ideas. I wouldn't describe basic clipping as "guitar tone" either. If you do implement this example function, you will notice the dynamic disparity of the normal sigmoid vs. the "hard knee" sigmoid. What that means is the dominant portion of the signal is less influenced versus the diminshed portions. So that's like a kick drum being less influenced by the clipper at a harder knee versus cymbals. It kinds of shifts the spectrum with respect to input levels.
Image

mystran
KVRAF
5035 posts since 12 Feb, 2006 from Helsinki, Finland

Re: Adjusting the knee of a sigmoid limiting function

Post Sun Dec 31, 2017 4:10 am

stratum wrote:
Off topic: I've never modded an actual tube amp (something which shouldn't be modeled with simple wave shapes, really), but playing with these values (tube type, bias etc) in the bias amp simulation does make audible diffences as far as I can tell.
When you change something in an analog circuit something else that depends on it always changes. The natural conclusion happens to be that clipping function has changed, and that's why it sounds different, and fourier analysis with simple sine waves supports that view, but in reality it's not a controlled experiment.
Well, it's also worthwhile to keep in mind that a tube in particular is not even a "static non-linearity" in the first place... which is why I think talking about tubes in a thread about sigmoid functions is a bit silly.

As far as I can see, such a sigmoid (with a linear segment) could be useful for things like adjustable knees for clippers and dynamics processors (compressors, limiters, expanders) where you might want to keep the signal completely dry until it hits some threshold level and where the knee actually does have a fairly big impact on the results.

For straight distortion purposes, it would seem easier to just use some adjustable "one-piece" sigmoid, since having a truly linear segment is not really useful the same way.
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.

stratum
KVRAF
2118 posts since 29 May, 2012

Re: Adjusting the knee of a sigmoid limiting function

Post Sun Dec 31, 2017 4:37 am

mystran wrote: Well, it's also worthwhile to keep in mind that a tube in particular is not even a "static non-linearity" in the first place... which is why I think talking about tubes in a thread about sigmoid functions is a bit silly.
Nowadays it looks a bit silly, but it wasn't always that obvious. I remember an article by J.O.Smith (and a few others) that even argue otherwise with 'objective' measurements. I don't have the link at the moment, but it was about an oversimplified diode clipping circuit, and that wasn't a static non-linearity either due to a capacitor in between a voltage source and the pair of clipping diodes.
~stratum~

camsr
KVRAF
6890 posts since 17 Feb, 2005

Re: Adjusting the knee of a sigmoid limiting function

Post Thu Jan 11, 2018 3:30 pm

While experimenting with different tranfer functions I noticed that quantization error can pose a problem. To use this method effectively requires a transfer that is fairly stable and can support a very large domain of numbers.
Image

resynthesis
KVRist
370 posts since 17 Sep, 2007 from Planet Thanet

Re: Adjusting the knee of a sigmoid limiting function

Post Thu Jan 11, 2018 3:52 pm

This the diode paper?

https://ccrma.stanford.edu/~dtyeh/paper ... lipode.pdf

Last I heard of David Yeh he was working at Lawrence Livermore Lab! Bit of a change from his guitar FX Ph.D. :)

stratum
KVRAF
2118 posts since 29 May, 2012

Re: Adjusting the knee of a sigmoid limiting function

Post Thu Jan 11, 2018 11:15 pm

Yes, that was it.
The paper says static approximation of this particular circuit is 'perceptually adequate'.
~stratum~

resynthesis
KVRist
370 posts since 17 Sep, 2007 from Planet Thanet

Re: Adjusting the knee of a sigmoid limiting function

Post Fri Jan 12, 2018 1:20 am

stratum wrote:Yes, that was it.
The paper says static approximation of this particular circuit is 'perceptually adequate'.
Weasel words if ever I heard them

Return to “DSP and Plug-in Development”