Jump to content
IGNORED

UDS Removes CD Dither


Recommended Posts

It always bothered me that, whereas analog recordings strive to minimize added noise, digital recordings purposely add noise. It’s called dither. They say it is necessary and can’t be removed. It is used to mask quantization noise. Quantization noise is strongly correlated with the signal which makes it plainly audible in certain circumstances, such as listening to computer generated test tones. However, with recorded acoustic instruments and voices, the ambient noise in the venue and the self-noise of the microphones and electronics leading up to the ADC is usually sufficient to decorrelate the quantization noise.

 

Up-Down Sampling (UDS) removes dither, which manifests as a gritty sound from the tweeter. I initially implemented UDS using Foobar and two instances of a resampler plugin. The first instance resampled to a high multiple of the CD rate, e.g. 2.8224M; the second instance resampled the output of the first instance to a rate my DAC accepted, e.g. 176.4K. The process worked better than expected. I now use a custom plugin that can be configured on the fly to use different resampling rates and methods.

 

How it works:

Up-sampling interpolates new samples that are inserted between the existing samples. In the process, dither loses its identity as random noise because the unique dither from each existing sample is now interpolated into each added sample.

 

Down-sampling uses a low-pass filter to remove the audio spectra above the Nyquist frequency before decimating. That spectrum includes the dither. Thus, dither is removed and the music is resampled to a higher-than-CD rate, which reduces settling time and quantization noise while moving the images further away from the signal, which relaxes the demands on the reconstruction filter.

 

Link to comment

Hi Tam Lin-san,

 

It is interesting. I don't understand how the noise is eliminated by the method you described.

 

There are many variations of dither exists,  what kind of dither you'd like to eliminate?

  • triangular probability density function noise dither (windows audio engine mixer uses it, 2LSB amplitude of 16bit PCM)
  • rectangular probability density function noise dither
  • Gaussian dither
  • UV22 HR dither
  • POW-R dither

 

It is better to have some experiment result

  • non-dithered original PCM : data A
  • some kind of dither added to A : data B
  • the dither removed from B using your program : data C

 

and the data C should be very similar to data A


 

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment

@yamamoto2002

1. Dither is pseudo-random noise that is added to the signal. The probability distribution doesn't matter. Noise is noise.

2. I've done the experiment and I attribute the differences I hear to jitter.

 

Link to comment
13 hours ago, Tam Lin said:

dither. They say it is necessary

Well, it is!

 

13 hours ago, Tam Lin said:

However, with recorded acoustic instruments and voices, the ambient noise in the venue and the self-noise of the microphones and electronics leading up to the ADC is usually sufficient to decorrelate the quantization noise.

so called "Self-Dither" is not sufficient! (for instance beaucse it's correlated to recorded source signal)

 

13 hours ago, Tam Lin said:

Up-Down Sampling (UDS) removes dither,

How so? The noise is in the audio band. All you do is to correlate the existing - once decorrelated - dither noise with the signal.

You turn dither-noise (which is below the dynamic range of your music) into noise so to say.

 

13 hours ago, Tam Lin said:

dither, which manifests as a gritty sound from the tweeter.

No! Dither adds to (perceived) dynamic range and fidelity!

A gritty sound from the tweeter can have many reasons. One of it being quantization noise.

 

13 hours ago, Tam Lin said:

How it works

So you correlate the once decorrelated dither noise with the audio signal and afterwards truncate the final audio.

What you get is the exact same level of noise within the audio band (now correlated to the signal) and in addition quantization noise (distortion). And you've squeezed the transients of your music twice (depending on the steepness / properties of your pass filters).

Wow!

 

_

Link to comment
On 5/4/2024 at 6:52 AM, Tam Lin said:

How it works:

Up-sampling interpolates new samples that are inserted between the existing samples. In the process, dither loses its identity as random noise because the unique dither from each existing sample is now interpolated into each added sample.

 

There are two popular 64x upsampling methods to upsample 44100Hz 16bit PCM to create 2822400Hz PCM,  both methods retain the dither signal unchanged.

  • impulse train upsampling: most popular method, its implementation can be the most efficient. Read one sample from original PCM and write it, then write 63 zero valued PCM samples . Repeat it for sample count to obtain 64x upsampled PCM. With this method, frequency response is retained, gain is reduced by 1/64, all the dither is retained as-is. gain should be restored somewhere later in the conversion process, but it is simple, just left shift every PCM value by 6 bit
  • zero-order hold upsampling: less popular method, read one sample from original PCM and write it 64 times. Repeat it for sample count. With this method, all the dither is retained as-is. DC gain is retained but frequency response is warped: high frequency is somewhat attenuated, so compensation filter is needed to be cascaded to get flat frequency response and this needs some FIR filtering process

I think it is possible to alleviate the noise caused by noise-shaped dither, such as UV22 or foobar2000 dither, by using, say, 15kHz cutoff lowpass filter, because the dither noise is shaped and concentrated to the highest frequency region. upsampling is not necessary.

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment
Quote

There are two popular 64x upsampling methods

 

The methods you describe are both wrong. Conceptually your first method can be seen as the first step in (correct) upsampling, but it is never executed that way.

 

Up/oversampling for audio playback (or SRC to a higher rate) consists of expanding the sample space combined with anti-aliasing filtering at half the original sample rate.

 

 

And to the OP: dither noise is good, not bad.

Link to comment
1 hour ago, Fokus said:

 

The methods you describe are both wrong. Conceptually your first method can be seen as the first step in (correct) upsampling, but it is never executed that way.

 

Up/oversampling for audio playback (or SRC to a higher rate) consists of expanding the sample space combined with anti-aliasing filtering at half the original sample rate.

 

 

And to the OP: dither noise is good, not bad.

it seems as you agreed to this, It is conceptually correct, and therefore not wrong, I implemented both methods to the working program as exactly above mentioned, and both works correctly. Upsampling process mentioned above generates aliasing noise beyond original Nyquist frequency, therefore anti aliasing filter should be performed later stage before downsampling.

 

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment
7 hours ago, Fokus said:

And to the OP: dither noise is good, not bad.

Because digital audio has a fixed dynamic range that is established by the sample width, every sample bit occupied by dither is one less bit that can carry the data.

Link to comment

Some comparision about audio dithering methods (TPDF means triangular probability density function dither)

Alexey Lukin, "Sonically Optimized Noise Shaping Techniques" 2nd. ed.  http://audio.rightmark.org/lukin/dither/dither.pdf

 

This is dither noise spectrum graph of POW-r variants from the sales brochure http://weiss.ch/pow-r/documents/pow-r_brochure.pdf

powr.thumb.png.a3d6953b3bb024072940c634ae4b7dfa.png

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment

I performed the experiment to eliminate dither noise with limited success.

If dither noise spectrum is concentrated to high frequency region such as WaveLab noise shaped dither type3, it is possible to reduce the dither noise with bit depth expand and applying low-pass filter.

But this method does not reduce uniform dither noise such as ③.

 

↓ original 1kHz -80dBFS sine wave signal 44.1kHz 24bit

audition1.thumb.png.2b45dd3c55d23e29aaa4b28058be3501.png

 

↓ bitdepth reduced to 16bit with simple truncation without dithering ③

audition2.thumb.png.677dcd91bae32c9abbd8b821d1e50fed.png

 

↓ Windows11 audio engine uniform frequency spectrum dither to reduce bitdepth to 16bit ③

audition_tpdf.thumb.png.4957bea564b77a60cba92b0a94e83401.png

 

it is NoiseShaping1 dither to reduce bitdepth to 16bit ④

audition_11.thumb.png.dede5f71252568e31414971f79ebe30c.png

 

↓ NoiseShaping2 dither to reduce bitdepth to 16bit ⑤

audition5.thumb.png.2190473f54ec45cdee982eb35d657b50.png

 

↓ NoiseShaping3 dither to reduce bitdepth to 16bit ⑥

audition6.thumb.png.13637826c5a07adc9bb8865fdbe7d36a.png

 

↓ reducing dither noise ⑥ with lowpass filter

audition7.thumb.png.3632d7223b18b8c53e30e205036c09fe.png

 

 

 

 

 

-------------------------------

↓ sorry this image caption is not correct

 

audition4.png

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment

Here are resulted files, amplified +50dB to be listened to by ears

 

①Original signal 1kHz Sine -80dB

Sine1kHz_M80dB_4424_P50dB.flac

 

②Truncated to 16bit without dithering

Sine1kHz_M80dB_NoDither_truncateTo16bit_P50dB.flac

 

③Uniform dither to 16bit

Windows11.flac

 

⑥WaveLab NoiseShaping3 dither to 16bit

Sine1kHz_M80dB_Noise1_NS3_4416_P50dB.flac

 

⑦lowpass filter applied to ⑥

Sine1kHz_M80dB_Noise1_NS3_Lowpass15K_4424_P50dB.flac

 

 

 

 

 

 

 

 

 

 

 

 

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment

Alpha processing is described as something like this on an older issue of MJ無線と実験 magazine.

I don't have access the book now, so it is from my memory, maybe some details are wrong.

processing_flow_a.thumb.png.a5d33f2f9f295bafc2e88d6edfadcc12.png

Sunday programmer since 1985

Developer of PlayPcmWin

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...