Why quantization always "add" (noise) instead of "remove" content?

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Dealing with digital and learning quantization, I always ask to myself: why quantize a signal always add unwanted elements instead of remove existing elements of the signal?

Let say the precision of a bit of a sample change when I quantize the signal. This happens after a resampling for example, doing linear interpolation that is inherintly noisy, or changing bit-depth from 24 to 16.

This means that some "partials" (due to different position of sample in the y-axis, in less words) will be added to the original signal, adding "noise" to it (even if it's lower, hard to hear in some cases; but that does not matter now).

Right?

Well... I never understand this: why it always "add" new partials instead of remove (for example) existing ones from signal? What's the math correlation that determine this behaviour of only "adding" instead of "remove" content?

Hope my dubt makes sense :)
Thank you for your time!

Post

Quantization is distortion. It adds steep steps (in fact, infinitely steep), which include high-frequency content.
Blog ------------- YouTube channel
Tricky-Loops wrote: (...)someone like Armin van Buuren who claims to make a track in half an hour and all his songs sound somewhat boring(...)

Post

DJ Warmonger wrote:Quantization is distortion. It adds steep steps (in fact, infinitely steep), which include high-frequency content.
Yes, of course! But why it always "add"? Thats my question.

Let say the end/continuous signal (after a Whittaker–Shannon interpolation) from sample A (value X1) to sample B (value X2) contains (describe) 10 partials in that transition (yeah, it does not makes much sense talking between 2 samples, but I guess you understand what I mean). Why if I change (a little bit) the value of X1 and/or X2, it always adds content instead of remove (or reduce) one of the actual 10 partials from the signal?

This is what I don't get...

Post

It's called time-spectrum duality. Infitely fast signal has infinitely wide spectrum.

ALso keep in mind that quantization doesn't remove energy from signal, just transform it.
Blog ------------- YouTube channel
Tricky-Loops wrote: (...)someone like Armin van Buuren who claims to make a track in half an hour and all his songs sound somewhat boring(...)

Post

DJ Warmonger wrote:It's called time-spectrum duality.

Can't find any valid resources/documents about this. Have you some details? Neither in wiki...
DJ Warmonger wrote:Infitely fast signal has infinitely wide spectrum.
What do you mean with "fast" signal? Every kind of signal suffer quantization, even the one with low frequencies...
DJ Warmonger wrote:ALso keep in mind that quantization doesn't remove energy from signal, just transform it.
For energy you mean... timbre? Theoretically it does, since it adds partials. Practically (if the quantization it's not so "drastic") I think its irrelevant in term of "timbre", isn't?

Post

Flip over the question. Look at this quantization graph from wiki:

Image

Here it's clear why it "adds" noise. The red signal in fact is added to compensate difference between quantized signal (yellow) and the original one (green). Of course...

But what if the original signal was the yellow one and the quantized become green? In this case it would "remove" the red from the yellow one (original).

Well: why this can't happens?

Post

Nowhk wrote:But what if the original signal was the yellow one and the quantized become green?
What if??? It is not, so "what if" is completely irrelevant.
But in case the original signal is already quantised, then quantisation does nothing so ofcourse then there's no quantization noise. But that's usually not the case. Natural signals are fluent and continuous, not quantised already.
We are the KVR collective. Resistance is futile. You will be assimilated. Image
My MusicCalc is served over https!!

Post

Perhaps this is a terminology issue with the term "noise". Adding noise doesn't mean the inclusion of any additional content, it means the quantized signal (or in the case of that figure, what looks like a reconstruction of the quantized signal) can't fully replicate the signal. This is because some information about the signal is lost, therefore there is error between the original and reconstructed signal, which we refer to as "noise".

Post

The thing is that remove is just adding the opposite. The fact that any operations changes the input signal, so it adds/removes something (positive or negative).

Post

I think it suffices to say that by your terms "removing" is exactly the same as "adding", just seen differently.
Just like you add negative numbers doing subtraction.

Post

Yes, add negative numbers makes sense. But I'm talking about the partial context/domain.

Let say Ive a sound with 10 fixed partials, each with its own amplitude of course. This define a timbre! If now I quantize the signal, Ill end up with the same 10 partials PLUS some other "noisy" in the background (errors intruduced by quantization). The main timbre stay the same.

Instead, Ill never end up with 9 partials (one less) or some of the 10 partials lowered down by volume (which, in both case, will change the whole timbre). This I mean for "add" instead of "remove".

Does it makes sense? :)

Post

Whether added noise removes "content" depends on what we know about the process that has generated that signal.

Assume that one throws a dice. The probability that the resulting value of each such experiment is 6 is 1/6, assuming that dice is not loaded.

Lets assume that we have added noise to the each measurement, and the signal/noise ratio is higher than 1/6. Can we know the exact value of measurement before the noise was added? No.

But lets assume that we know that the dice is so heavily loaded that it always yields the value 5. Lets also assume that we have added a very strong noise to the measurement results. Do we know the value of each measurement? Yes, with a strong probability, each measurement value was 5. We would know that.

So going back to the original question, whether we can infer anything about the signal when noise is added to it depends on what we know about the signal source. Some signals would be unrepairably altered by quantization noise, some would not be.
~stratum~

Post

It also has a relation to entropy. Any process increases the entropy of the signal, it's not possible to remove something. At least, that's how I understand the issue.

Post

It also has a relation to entropy. Any process increases the entropy of the signal, it's not possible to remove something. At least, that's how I understand the issue.
Entropy is an interesting concept. Going back to how it was named is quite revealing :
entropy.png
That's from the book "Entropy" by Andreas Greven,Gerhard Keller,Gerald Warnecke (google search returns it when you seek).

https://en.wikipedia.org/wiki/Entropy_( ... on_theory) states
Entropy is a measure of unpredictability of information content.
Uncorrelated noise would increase the entropy of any signal, yet it can make it uninterpretable. Assuming also that whether one can interpret a signal or not is the ultimate concern (an uninterpretable signal is a useless thing) then it follows that a process can increase the entropy of signal (the way noise does) and yet it can remove information, by obscuring clues that signal it.

edit: This is akin to saying yes and no at the same time. Noise contains all information, everything that can be said. But saying everything that is possible to say is less useful than saying something definite. Adding "yes" to "no" is information loss, in spite of the fact that something is added, and not removed.
You do not have the required permissions to view the files attached to this post.
~stratum~

Post

Given that you're talking about partials and frequency analysers, I think the confusion might be coming about because you're trying to visualise quantization in a frequency domain way, whereas quantization is actually a strictly time domain process.

When we're in the frequency domain, we can do exactly what you what you want quantization to do. We just select all partials below a certain threshold and delete them, cleanly and without distortion. However, if we were to examine the resulting waveform (i.e. in the time domain) there will still be samples spanning the full bit depth. Doing stuff in the frequency domain has no 'intuitive' bearing on what we see in the time domain and vice versa. They're 2 completely different representations of the same signal. When we delete everything below a certain threshold in the time domain, oh boy that sounds nasty.

Think about what a sine wave looks like in the time domain and what it looks like in the frequency domain. In the time domain it's that 'classic' up and down shape with a rounded top and bottom. In the frequency domain, it's a single infinitely thin point/partial on your frequency analyser. Now, to emulate what happens when we quantize to a lower bit depth, go back to the time domain and imagine yourself drawing a small discontinuity wherever the sine wave crosses 0. It's not going to result in a 'purer' sine - it's going to add distortion/noise that we can see when we examine the result in the frequency domain.

Post Reply

Return to “DSP and Plugin Development”