At what amplitude is Dithering added, when Noise Shaping is chosen?

Hello.

I’m certainly not a Musical Expert, but do feel I have some aptitide for Mathematical concepts, and one concept which I’ve been reading a lot about in recent days, was Noise Shaped Dithering. There exist other sources that explain it, but, I think that the WiKiPedia’s explanation for how it works, assumes that the Dithering Noise which gets added, before Noise Shaping is applied, consists entirely of bits, that are less-significant than the output format’s LSB.

According to what I read, the possibility exists, when exporting to 16-bit format (which is already different from the example that the WiKi used to make its point), a pure triangular Dithering Pattern can be applied, the LSB of which could be 1 bit less-significant than the output format’s LSB. But, the result that this gives can be improved upon, by choosing to apply Noise Shaping as well.

While I can see from the GUI, that Ardour offers both options, I do not see the detail mentioned anywhere, of whether Ardour devs kept the amplitude of the Dithering pattern the same, when choosing Noise Shaped Dither over Pure Triangular Dither. For all I know, when the user chooses the Noise Shaped option, the amplitude of the Dither which gets added, could be one power of two stronger, but because of the way the Noise Shaping works, the end result could still be, a reduction of per-frequency noise, for frequencies below half the Nyquist Frequency.

And so, for the record, I’d just like to know what the behavior of Ardour really is. Does it keep the Dithering Noise amplitude the same, or does it not?

Dirk

The amplitude differs. With rectangular or triangular a noise value below the lowest bit is added:

e.g when converting a float signal (-1 … +1) to 16bit with rectangular dithering:

out = signal * 32767 - random (0,1)

with random(0,1) generating uniform white noise between 0 <= val < 1.

However when using shaped noise dithering, the added noise has a Gaussian distribution which is not bound to to 1.0. It may exceed the lowest bit.

Ardour’s implementation is based on Lipshitz’s paper, using a 5 coefficient FIR (Fig 6b).

Corresponding source-code:

I find your answer most reassuring, because it differs from what “Audacity” does, according to their following link:

(Audacity Maunual Hyperlink)

Mind you, what each of your answers ‘really means’, is being seen through my somewhat limited knowledge in this field. But the reason I imagine the Audacity developers did what they did would be, their pessimism in whether a listener’s (cheaper) D/A Converter can in fact decode 16 bits per sample accurately. If it cannot, then what Audacity suggests could be a way to try to ‘average that out’ (in addition, if possible, to improving overall accuracy at lower frequencies).

Your approach simply means that sound which was mastered with Ardour, was meant to be played back by people who have ‘real audio equipment’. Ardour has more than just a better-looking GUI. :wink:

It also belongs to my own expectations, that in the simpler cases, the Dithering Noise is allowed to remain less significant than the LSB of the output format, and that this carries over, to what Shaped Noise is not required to accomplish…

Dirk

In case you have not yet seen it: Xiph.Org Video Presentations: Digital Show & Tell has a very good introduction to dithering, but he whole video is worth watching.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.