Amp Natural Clipping vs WaveShaper?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Hi,

I'm curious about the real differences between having a VCA (or amp stage) which will clip (as in the analog world) instead of a Wave Shaper with a "soft" clipping curve in higher value.

Questions here after looking this video: https://youtu.be/1L9djVLaUSU

Basically, what make plugin amp analog clipping driving the input different than processing the iit through some digital ws shaper? Isn't in any case a sort of out = f1(input) (where f1 is something like tanh())?

Any practical example?

Post

If you observe a sine wave going through a distortion stage, an amp distortion or other kind of distortion processor may do something different than a wave shaper. Using a wave shaper, the positive half of the sine wave will distort identically on the way up and the way down. In other words, the 0 to 90 degree portion will be a mirror image of the 90 to 180 degree portion. This will also be true of the negative half of the sine wave if using a wave shaper.

A distortion plug-in (amp sim or other kind) won't necessarily play by those rules. Just hook up an oscilloscope plug-in and, using a sine wave input, observe the output. With some distortion plug-ins, you'll see the symmetry mentioned above. With others you won't.

Post

dmbaer wrote: Tue Oct 04, 2022 8:54 pm Using a wave shaper, the positive half of the sine wave will distort identically on the way up and the way down
It depends, if using a bipolar Wave Shaper and different curves on top/bottom. I don't think its the huge differences (if any) between the two approches.

I would says somethings related of "non-linearity" in some circuit/components, but at which level?
And how? Freq/phase involved? Uhm....

Post

A pure waveshaper is just a memoryless nonlinearity, while most practical analog circuits exhibit some kind of frequency-dependent behavior. For example, in an amp stage with negative feedback, the open-loop gain usually decreases towards higher frequencies. As a result, higher frequencies may be clipped "softer" than lower frequencies*. Of course it depends on the circuit what the behavior is like, and how audibly relevant these factors are. But think of it as a waveshaper with frequency-dependent characteristics. The 1 kHz sine will come out differently than the 100 Hz one.

* FWIW, I wrote a blog post a few years ago that neatly illustrates how negative feedback works, and how the open-loop gain affects linearity and the "softness" of clipping: https://science-of-sound.net/2016/08/un ... -feedback/

Post

I'm definitely not an expert in this but I'll give it a try.

The lingual differences between a waveshaper and a distortion is historically blurred. The two terms have been used interchangeably as well as differentiably. One could argue that all distortions are waveshapers, but not vice versa. But I'm still not sure this is accurate.

Therefore I'd rather answer the question, "What is the difference between a digital waveshaper and an analog waveshaper "

And the answer will become much easier at that point. Basically two rather obvious things:

1. You can really do whatever you want with digital while in real analog you are a bit restricted having to use electrical components as lego building blocks.

2. The pitfall of digital is "aliasing". Analog waveshaping produces no aliasing at all. While in digital you'd have to fight it with oversampling and such methods with diminishing returns as you try harder. (Except ofcourse for the case where aliasing is considered a plus)
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

Not all distortions are waveshapers. Waveshapers (out = f(in)) are stateless nonlinearities, while most practical circuits have state (e.g. across capacitors). A more general treatment would be:

Code: Select all

[out, new_state] = f([in, out, state])
Note that out also appears within the function at the right hand side, so you cannot find an analytical expression for out. For more information, see this talk by Andrew Simper, this paper by Martin Holters and this blog post by Urs Heckmann.

Post

There are a number of differences between real-world distortion (such as vacuum-tube distortion) and waveshaping which cannot be easily summarized without gross oversimplifications which lead to very unsatisfactory explanations and comparisons.

To see a thorough discussion of real-world examples of vacuum-tube distortion, I recommend:

https://willpirkle.com/special/Addendum ... e_v1.0.pdf

One can then contrast this discussion with that of the video for which the OP posted the link, then draw one's own conclusions, preferably after making numerous such comparisons.

Post

The notion that a waveshaper is strictly memoryless exist only in the software developer circle. Once you look outside of that, you'd quickly realize that it is not a widely established definition, or even assumption. For example, in https://en.wikipedia.org/wiki/Waveshaper

It is mentioned:

"In digital modeling of analog audio equipment such as tube amplifiers, waveshaping is used to introduce a static, or memoryless, nonlinearity to approximate the transfer characteristic of a vacuum tube or diode limiter."


Notice how wiki is specific about it being "In digital modeling".

In Analog, here are a couple of examples of waveshaping circuits that use capacitors and/or inductors (i.e. not memoryless):

https://rmd.ac.in/dept/ece/Supporting_O ... /unit4.pdf
https://www.industrial-electronics.com/swm-1_4.html
https://f01.justanswer.com/BKWYSKeu/waves-shaping.pdf
https://irejournals.com/formatedpaper/1701494.pdf
https://img.scoop.it/6cYLRbQcvc2ZrsUn57 ... tABnaLJIm9
https://electronics.stackexchange.com/q ... alog-synth
https://www.circuitlab.com/circuit/mgbm ... ates-then/
https://www.tutorialspoint.com/electron ... apping.htm
https://patentimages.storage.googleapis ... 3814A1.pdf
https://www.circuitlab.com/circuit/mgbm ... ates-then/
https://www.matrixtsl.com/courses/ecc/i ... ngCircuits
https://www.youtube.com/watch?v=6KStCKwpxTA

Now if you go to the muscians or sound engineer side, you may or may not find a completely different definition of wavehsaping:

https://www.perfectcircuit.com/signal/l ... aveshapers

Here is also a different definition in schneidersladen.de

https://schneidersladen.de/en/eurorack- ... haper/?p=1

Or look no further than doepfer him self with the A-136. https://doepfer.de/a136.htm

In that module description, the two terms, "waveshaper" and "distortion" seam to be used to refer to almost the same thing. Notice that there are NO two modes in the module. So we can't even say that the module does this AND that separately. Well thats as far as I can understand.

Again, as I implied above. There is no one widely agreed upon definition of what the term "waveshaper" is. Every cluster of a community has a different idea.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

Define "distorted" ;-)
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

S0lo wrote: Fri Oct 07, 2022 7:00 pm The notion that a waveshaper is strictly memoryless exist only in the software developer circle. Once you look outside of that, you'd quickly realize that it is not a widely established definition, or even assumption. For example, in https://en.wikipedia.org/wiki/Waveshaper

It is mentioned:

"In digital modeling of analog audio equipment such as tube amplifiers, waveshaping is used to introduce a static, or memoryless, nonlinearity to approximate the transfer characteristic of a vacuum tube or diode limiter."


Notice how wiki is specific about it being "In digital modeling".
You're actually reading the page wrong. The same Wikipedia article gives mathematical definition f(a(t)x(t)) which implies a memoryless non-linearity with (potentially) time-varying input gain a. This is the definition generally used in the field of electronic music and the "in digital modeling" part is simply describing what waveshaping (= memoryless non-linearity) is used for, not what it means.

Now, I'm aware that in (general) electronics the term is sometimes used in a more general sense and this leads to some ambiguity when discussing analog synths since we could be using either the musical or the more general electronic sense of the word. This is similar to the question of "distortion" where in control theory or transmission line analysis you might see discussion about "linear distortion" that often refers to phase-shift distorting the time-domain waveform, yet in musical contexts "distortion" almost always refers to non-linear phenomena only. There are plenty of other examples where the same term is understood slightly differently by different fields.

The moral of this story is that language in general doesn't always mean the exact same thing in different contexts and this even applies to pure math. As an example, there are two mathematically incompatible (yet functionally equivalent) definitions for quaternions and every time you read any paper involving quaternions you need to figure out whether it's using (arguably much more common) "Hamiltonian" quaternions or the alternative "Shuster's" quaternions that one might find in aerospace and robotics I think... and some control systems stuff uses z for unit delay while the rest of us use z^-1 .. so like.. context is important!

Post

mystran wrote: Fri Oct 07, 2022 9:33 pm
S0lo wrote: Fri Oct 07, 2022 7:00 pm The notion that a waveshaper is strictly memoryless exist only in the software developer circle. Once you look outside of that, you'd quickly realize that it is not a widely established definition, or even assumption. For example, in https://en.wikipedia.org/wiki/Waveshaper

It is mentioned:

"In digital modeling of analog audio equipment such as tube amplifiers, waveshaping is used to introduce a static, or memoryless, nonlinearity to approximate the transfer characteristic of a vacuum tube or diode limiter."


Notice how wiki is specific about it being "In digital modeling".
You're actually reading the page wrong. The same Wikipedia article gives mathematical definition f(a(t)x(t)) which implies a memoryless non-linearity with (potentially) time-varying input gain a. This is the definition generally used in the field of electronic music and the "in digital modeling" part is simply describing what waveshaping (= memoryless non-linearity) is used for, not what it means.
So, what waveshaping "is used for" is different than "what it means" ?

Sounds more like a word twist to me in this context. You just said "The same Wikipedia article gives mathematical definition....."

The definition is "what it means".

Edit: I never said that the "in digital modeling" part describes the meaning of waveshaping. What I meant is that this meaning is specific to digital modeling and DSP in general.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

S0lo wrote: Fri Oct 07, 2022 10:35 pm So, what waveshaping "is used for" is different than "what it means" ?
Yes. Definition describes what the word means and the chapter starting "in digital modeling" is giving one example of possible usage.
You just said "The same Wikipedia article gives mathematical definition....."

The definition is "what it means".
Yes. The Wikipedia article appears to be mostly written in the context of waveshaping in the sense that we usually understand it here... though I feel like it's not exactly the highest quality Wikipedia article out there overall.

You seem to have missed my main point though: words don't always have a single definition and they can mean different things depending on context. I can identify some neurodivergent traits in myself and I would personally love a language where every word had a very precise universal single definition and I would love a world where everyone was always using every word correctly, but sadly we can't quite have this, because that's not how most people's brains appear to work. That said, as far as I can tell and in the context of audio signal processing (including most academic publications in the field) "waveshaping" is almost always used to mean "memoryless non-linearity."

Post

mystran wrote: Fri Oct 07, 2022 11:13 pm That said, as far as I can tell and in the context of audio signal processing (including most academic publications in the field) "waveshaping" is almost always used to mean "memoryless non-linearity."
You mean “digital” audio signal processing? Or signal processing in general?

The first links I’ve posted above clearly show that waveshaper circuits may or may not be memoryless. As they can contain capacitors and inductors.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.

Post

mystran wrote: Fri Oct 07, 2022 11:13 pm You seem to have missed my main point though: words don't always have a single definition and they can mean different things depending on context.
I agree and understand. It is my whole point that waveshaping means different things under different contexts.

Post

Comment relocated.
Last edited by Borbolactic on Sun Oct 09, 2022 10:30 am, edited 1 time in total.
"The most dangerous man, to any government, is the man who is able to think things out for himself... Almost inevitably he comes to the conclusion that the government he lives under is dishonest, insane and intolerable..." ~ H.L. Mencken

Post Reply

Return to “DSP and Plugin Development”