Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: noise, dithering, compression and high-end amps (Read 5224 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

noise, dithering, compression and high-end amps

I have some understanding of digital processing, dithering and noise shaping, although not very deep. But there is something that caught me hard and I wanted to ask for clarification.

Once upon a time at Creative site JohnV wrote:
Quote
Lossy audio encoding is based basically on the concept of "adding" distortion/noise. The more noise is added, the higher is the compression ratio. The noise is called quantization noise.
Now, quantization noise, which is the difference between the original and encoded can be divided into audible quantization noise and inaudible quantization noise. Together those form the global quantization noise.
Lossy audio is based on the idea that as much inaudible quantization noise will be introduced as possible, and of as little as possible audible quantizatio noise. The psychoacoustics model is used to analyse the audio and to form a masking threshold which is used in the quantization phase. Very simplified, the masking threshold defines when something is masked (not audible) or non-masked. The idea is to introduce as much quantization noise as allowed by the masking threshold. If this works, and the masking threshold is totally perfect (not in real life) only inaudible quantization noise will be introduced.
Now, of course some psychoacoustic models are better than others, and allow more precise masking threshold which in turn allows more inaudible quantization noise -> more compression/better quality.

It was part of discussions that waveform preservation is completely useless goal and better sound is achieved by more clever distortions.

What I'd like to understand better, is (1) how does adding noise help compression ratio? I thought that increasing entropy makes it harder to compress data. What kind of trick is here? Is it simply implied that bit reduction is equal to adding quantization noise?

(2) What kind of distortions can be considered equivalent to quantization noise? I assume that one of main issues is related with least significant bit, and dithering helps there. What kind of other imprecisions could be attributed as quantization noise? Does DAC clock jitter fall here? Does nonlinear distortions of amps belong here? Seems so, as both can be seen as timing imprecisions.

(3) What I'm wondering is if its possible to overcome lonlinearities of amps by intentionally adding noise with shaping and accounting for psychoacoustic models?
It really really did sound different. Not in a placebo way.

noise, dithering, compression and high-end amps

Reply #1
There are people on this board who are much more qualified to answer your questions than me - so I will only address this one:
Quote
(3) What I'm wondering is if its possible to overcome lonlinearities of amps by intentionally adding noise with shaping and accounting for psychoacoustic models?

Yes, I suppose you could. But there are much better ways of addressing amplifier nonlinearities. The best is to fix the amp so it's linear (not that hard - building an amp with 1dB linearity from 10Hz to 30kHz is fairly simple). Another way to resolve it would be to use a parametric equalizer. Much simpler than noise shaping and can get excellent linearity. Intentionally adding second harmonic distortion might make some crap amps sound a lot better. Maybe one to remember if you ever need to listen on a cheap boombox.

More interesting would be using psychoaccoustics in speaker design. This is because building a speaker which is nicely linear at all ranges and all angles is fairly hard. Once again however, it's probably easier just to build a better speaker than to implement a fix with signal processing.

noise, dithering, compression and high-end amps

Reply #2
I think the point is that you don't compress by adding noise but compress and hence add noise. This is the point with quantization. As long as the added quant noise is below the perception limit everything is fine. The limit is defined by psychoacoustic models, which are not perfect anyway.

noise, dithering, compression and high-end amps

Reply #3
Quote
Yes, I suppose you could. But there are much better ways of addressing amplifier nonlinearities. The best is to fix the amp so it's linear (not that hard - building an amp with 1dB linearity from 10Hz to 30kHz is fairly simple).
Thats not the kind of nonlinearities I implied. Frequency response is nonissue. Its the transient nonlinearities I'm talking about, those which add harmonics. My thought was that if we add noise then we move signal to different points on amps transfer graph (at random), and instead of getting precise harmonic it would get spread out across whole spectrum, thus lowering its amplitude. no?
It really really did sound different. Not in a placebo way.

noise, dithering, compression and high-end amps

Reply #4
Quote
Thats not the kind of nonlinearities I implied. Frequency response is nonissue. Its the transient nonlinearities I'm talking about, those which add harmonics. My thought was that if we add noise then we move signal to different points on amps transfer graph (at random), and instead of getting precise harmonic it would get spread out across whole spectrum, thus lowering its amplitude. no?

Of course you can do that - it's called SACD!

Cheers,
David.

noise, dithering, compression and high-end amps

Reply #5
Quote
Of course you can do that - it's called SACD!
Elaborate?
It really really did sound different. Not in a placebo way.

noise, dithering, compression and high-end amps

Reply #6
In-band masked noise (e.g. mp3 coding noise) will have little effect - it's typically kept 20dB below the signal, and correlated both spectrally and temporally with it - just the wrong thing for linearising anything.

However, out of band noise - bucket loads of it - not correlated with the signal - that's perfect! SACD has that (well, the noise is correlated with the signal, but not enough to matter in this implementation).

btw, it's not a new idea - it's been used for years to linearise DACs and ADCs (not necessarily audio - I think I've seen it in an RF converter). There's a paper somewhere (I don't have the reference at all - I read the poster at an AES conference ages ago - it was from an employee of one of the major converter manufacturers) where someone describes a method to linearise a DAC (I think they discussed an intentionally bad DAC as an example) using noise shaping. You add lots of noise, out of band, and apply noise shaping techniques so that the non-linear distortion resulting form this is also out of band. Very clever.

If you want to experiment, use the noise shaped dither in foobar, switched to very strong. That should get you close, with a good sound card. You'll be wasting your time with an SB live!

Even simpler+better (if you have a 96k capable sound card, and a half-decent audio editor). Resample some CD quality audio to 96kHz. Generate some full bandwidth white noise sampled at 96kHz. High pass filter the white noise at, say, 20kHz. Mix the high-pass filtered noise with the audio. Listen! Beware of damaging your tweeters (or ears?) with excessive high frequency content - if you use full scale noise and turn the volume up, you _will_ blow decent speakers, so keep the noise amplitude low (e.g. -20dB FS) and keep the volume reasonable.

Have fun!

Cheers,
David.
P.S. I've tried it - I always think I can hear a difference - until I try to ABX!

noise, dithering, compression and high-end amps

Reply #7
Quote
(1) how does adding noise help compression ratio? I thought that increasing entropy makes it harder to compress data. What kind of trick is here? Is it simply implied that bit reduction is equal to adding quantization noise?


The expression "adding noise" is confusing here. An equivalent, easier to understand, would be "removing sounds". The compression removes some sounds that are inaudible. Less info are left, thus it can be compressed more.
By definition, the "noise" of a process, like encoding, is the difference between the source and the destination signals. The trivial case of noise is adding some noises to a signal. What has been added is the noise, and in this case, it sounds like noise.
A completely bizzarre case would be to mute a signal, so that nothing remains. Here, the noise is the same as the signal, but with the polarity inverted. The noise about which JohnV spoke being caused by removing sompe parts of the signal, it is closer to the second example.
Thus adding this "noise", the entropy is diminished.

Quote
(2) What kind of distortions can be considered equivalent to quantization noise? I assume that one of main issues is related with least significant bit, and dithering helps there. What kind of other imprecisions could be attributed as quantization noise? Does DAC clock jitter fall here? Does nonlinear distortions of amps belong here? Seems so, as both can be seen as timing imprecisions.


I think that JohnV should have written "encoding noise" instead of "quantization noise", since he was talking about the difference between the original and the encoded signals.
Anyway, with the broad definition of noise that we are using, anything is noise ! A volume change, a balance change, harmonic distortion, reverberation, equalization, loss of dynamics, etc

noise, dithering, compression and high-end amps

Reply #8
Quote
The expression "adding noise" is confusing here. An equivalent, easier to understand, would be "removing sounds". The compression removes some sounds that are inaudible. Less info are left, thus it can be compressed more.


I'd agree it makes no sense to talk about "adding quantization noise" in the context of lossy encoders such as MP3. But this description could apply to other forms of audio compression such as NICAM, mu-law, etc. These do, literally, increase quantization noise in parts of the signal where it is unlikely to be heard. On ther other hand, psychoacoustic models don't really apply to those compression schemes, so JohnV's description seems a bit muddled at best!

Quote
(2) What kind of distortions can be considered equivalent to quantization noise? I assume that one of main issues is related with least significant bit, and dithering helps there. What kind of other imprecisions could be attributed as quantization noise? Does DAC clock jitter fall here? Does nonlinear distortions of amps belong here? Seems so, as both can be seen as timing imprecisions.


IMO, none of those other imprecisions can be considered equivalent to quantization noise. Quantization noise is the error that occurs when you round off some quantity to the nearest allowable value, and it can only apply to systems using discrete levels, i.e. digital systems. It can't apply to amps, since they are analogue and therefore infinitely-variable, and DAC clock jitter is also an analogue effect which has nothing to do with quantization.

Quote
Its the transient nonlinearities I'm talking about, those which add harmonics. My thought was that if we add noise then we move signal to different points on amps transfer graph (at random), and instead of getting precise harmonic it would get spread out across whole spectrum, thus lowering its amplitude. no?


Yes, as 2Bdecided has already pointed out. Another (extreme) example of this is the HF bias used in tape recorders...