Page 3 of 5

Re: Does normalizing require upconverting to preserve qualit

Posted: Mon Apr 22, 2013 11:57 pm
by KlarkKentThe3rd
steve wrote: "Warnings" are useful when they enable people to avoid dangers (Warning: Mind your head. Warning: slippery road ahead. Warning: Vehicle reversing.)
There is no real point in warning someone of something that is inevitable and unavoidable (Warning: making an omelet will cause eggs to be broken).
Most people are audio editing n00bs.

Okay, I have three questions left:

1) When I apply a fade out, only a small part of the track is processed. When down-converting back to 16 bit, wouldn't dithering the entire track be pointless?

2) The preference settings. When do they take effect? After I select them, or after I restart the program?

3) Please explain the differences between the three dithers. Reading the wiki(pedia) article did not explain anything to me.

P.S. 37800 hz is the PlayStation audio standard.

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 3:03 am
by steve
KlarkKentThe3rd wrote:1) When I apply a fade out, only a small part of the track is processed. When down-converting back to 16 bit, wouldn't dithering the entire track be pointless?
It depends on how intelligently the dither is applied. One of the things that you would want to avoid is for the dither to noticeably cut in and out as that would draw attention and be more distracting than applying dither to the entire track. While there is a reasonable signal level, dither is totally inaudible, so it is unlikely to do harm to apply it "once" where not strictly necessary. On the other hand, not applying dither when it is required will produce inferior results.

(If you are seeking "perfection", then there is little choice but to study sound engineering in sufficient depth to be able to make the right decisions, then to apply the appropriate dither in the appropriate places manually, but unless you intend to become a professional "mastering engineer" that is probably going way beyond what you need.)
KlarkKentThe3rd wrote:2) The preference settings. When do they take effect? After I select them, or after I restart the program?
Most preferences settings, including the dither settings, take effect straight away,
KlarkKentThe3rd wrote:3) Please explain the differences between the three dithers.
In terms of the "sound" of the dither:
Rectangle dither adds "white" noise. This has the lowest absolute level (amplitude) of noise, but is not the "quietest" because it includes more medium and low frequency components that the ear is more sensitive to than other forms of dither. It does have the advantage that absolute silence remains completely silent.

Triangle dither has slightly more high frequencies than rectangle dither, but less medium and low frequencies. The ear tends to be less sensitive to high frequencies at low level than to medium frequencies at low level, so it should be subjectively quieter than rectangle dither,

"Shaped" dither is specially filtered to lower the noise level where the ear is most sensitive, so although this has the highest absolute level of the three types, it should be the least noticeable.

All three types have similar ability in preventing harmonic distortion due to quantize errors.

KlarkKentThe3rd wrote:P.S. 37800 hz is the PlayStation audio standard.
That's weird :D

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 3:26 am
by KlarkKentThe3rd
So, shaped is best, I see.

Also, PlayStation One.

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 5:06 am
by Robert J. H.
One of the most entertaining and informative articles I've read so far about dithering is the
Ozone Dithering Guide from Isotope inc.
Introduction
For a lot of people, dither is like transmission fluid: you've been told you need it, you've accepted that, and that's really as much as you want to know. For those that care to know more though, we've put together this document1.
The only thing less exciting than learning about dithering is probably a documentary on the history of long division. Therefore, in what could be a futile attempt to make this more entertaining, we've titled each section using a lyric from a song. You probably never knew there were so many songs about dithering, noise shaping, and bits.
http://www.izotope.com/products/audio/o ... gGuide.pdf

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 5:26 am
by Gale Andrews
steve wrote:
Gale Andrews wrote:You mean, a checkbox that when enabled, over-rides the High-Quality dither Preference being "on"?
No, I mean (as discussed on -devel) that processed audio is always returned to tracks in 32 bit float format (so as to avoid needless and possibly damaging format conversions), and that dither options are provided in the Export Dialogue rather than in Preferences (as they then only apply to export).
Probably better to give a link to -devel in that case, given most users here would not read -devel list.

I did not make the connection even though I responded to that -devel topic. ;)


Gale

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 5:30 am
by KlarkKentThe3rd
Robert J. H. wrote:One of the most entertaining and informative articles I've read so far about dithering is the
Ozone Dithering Guide from Isotope inc.
Introduction
For a lot of people, dither is like transmission fluid: you've been told you need it, you've accepted that, and that's really as much as you want to know. For those that care to know more though, we've put together this document1.
The only thing less exciting than learning about dithering is probably a documentary on the history of long division. Therefore, in what could be a futile attempt to make this more entertaining, we've titled each section using a lyric from a song. You probably never knew there were so many songs about dithering, noise shaping, and bits.
http://www.izotope.com/products/audio/o ... gGuide.pdf
That is some of the most informative articles ever made. Thanks a bunch.

Leaves me with one question though: if a 16 bit track is up-converted, no quality is added; those new extra bits are, in a way, empty. So, when you down-convert after an complex edit (like amplifying), what quality is lost, exactly? The track was 16 bits to begin with.

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 10:20 am
by Robert J. H.
I've had to Experiment a Little to Show the results in a numerical Fashion.
Instead of bits, we use decimal places. The "low bit" Format has only one and the higher two.

Code: Select all

Original signal:
0.1	0.2	0.3	0.4	0.5	0.6
Signal-to-noise ratio is 6:1
We multiply by 1.6:
0.16	0.32	0.48	0.64	0.8	0.96
S/N ratio is 6:1
We convert back to 1 decimal place only
0.2	0.3	0.5	0.6	0.8	1
S/N is new 5:1
Note that the re-converted Signal already has a value of one (the first one that Clips) whereas the 2-places Signal has still some headroom.
However, this is one case among many and we've used rounding instead of truncating (which Shows the same behaviour but with another Multiplier).
If the multiplication factor would have been 2, both signals would be equal (since no extra decimal place is needed).
Thus, the Quality loss depends on the amount of (formerly empty) bits that are needed to amplify the Signal while keeping the S/N ratio.

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 12:08 pm
by Robert J. H.
A Little Demonstration, how the Signal is changed due to bit-conversion.
I've produced a square-wave of 40 Hz (tone>square, no aliasing) in 32-bit
A duplicate of the track was then converted to 16 bit (no dithering) and back.
With a snippet in the Nyquist prompt, I've taken the FFT for both tracks (4410 bins) and the outcoming Magnitude was then applied to a simple sine wave to make it audible.
On the left side is the original spectrum and on the right the difference between original and the 16 bit Version.
The more the Play time elapses, the higher the frequency and its Peak.
Aliased-square.wav
(861.37 KiB) Downloaded 82 times
This doesn't serve to illustrate the question from above where the square wave should initially be made in 16-bit Format, then converted, amplified and exported, again in 16-bit.

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 12:22 pm
by steve
KlarkKentThe3rd wrote: Leaves me with one question though: if a 16 bit track is up-converted, no quality is added; those new extra bits are, in a way, empty. So, when you down-convert after an complex edit (like amplifying), what quality is lost, exactly? The track was 16 bits to begin with.
Basically the same answer as Robert, but expressed slightly differently (hopefully one will make sense ;))

When a 16 bit track is "up-converted" to a higher bit format, the "numbers" (sample values) are "padded with zeros".

16 bit and 24 bit are "integer formats". That is, they count in whole numbers. In the case of 16 bit, the available numbers are −32,768 to +32,767. These numbers are used to represent sample values between absolute silence and 0 dB (the height of a track in Audacity).

"32 bit float" is able to represent fractional values (that's what the "float" part of the name means). I'll not go into detail about how it does it as that is complicated, but sufficient to say that it can represent every 16 bit integer value exactly, and can also represent fractional values between each of those whole numbers.

So let's take a sequence of whole numbers as an example of 16 bit audio:

Code: Select all

0  1  2  3  4  5  6
Now we convert them to 32 bit float. This can represent fractional values, so we "pad" each number with zeros:

Code: Select all

0.0000  1.0000   2.0000  3.0000  4.0000  5.0000  6.0000
When we "process" the numbers, the fractional part can be used. For example, if we "amplify" (the same as "multiply") by 1.6

Code: Select all

0.0000  1.6000  3.2000  4.8000  6.4000  8.000  9.6000
Then we convert back to 16 bit (whole numbers).
We need to "round" the values in some way.

We could round to the nearest whole number:

Code: Select all

0  2  3  5  6  8  10  
See that this gives us uneven steps, which will create unwanted harmonics.

We could round down, which would give us:

Code: Select all

0  1  3  4  6  8  9
Which again is uneven.

We could round up:

Code: Select all

0 2 4 5 7 8 10
Whichever method of rounding we use, the output will always create uneven steps, whereas out original sequence had exactly the same step between each sample.
The idea of dither is to randomize these errors so that "on average" the steps follow the same shape as the original, thus minimizing the distortion.

As an example that you can hear; this is a very quiet sine wave (pure tone) in 32 bit float format, followed by the same tone after converting to 16 bit with dither, followed by the same tone that has been converted without dither. The three tones have then been amplified by 50 dB so that both the tones and the dither noise are clearly audible.
pure_tone_-_with_dither_-_without_dither.wav
(599.71 KiB) Downloaded 78 times
The second tone (with dither) has noticeable noise, it still sounds much like the original tone.
The third tone (without dither) does not have the noise, but the tone sounds completely different due to the harmonic distortion caused by quantize errors.

Re: Does normalizing require upconverting to preserve qualit

Posted: Tue Apr 23, 2013 6:02 pm
by KlarkKentThe3rd
steve wrote: As an example that you can hear; this is a very quiet sine wave (pure tone) in 32 bit float format, followed by the same tone after converting to 16 bit with dither, followed by the same tone that has been converted without dither. The three tones have then been amplified by 50 dB so that both the tones and the dither noise are clearly audible.
pure_tone_-_with_dither_-_without_dither.wav
The second tone (with dither) has noticeable noise, it still sounds much like the original tone.
The third tone (without dither) does not have the noise, but the tone sounds completely different due to the harmonic distortion caused by quantize errors.
Okay, I can finally understand. But what if I edit in 24 bit? 16 bit? If the "multiplication" was done in 16 bit in the first place, there would be no problem to begin with.

And what type of dither was used? Triangle? Rectangle? Shaped?