IPB

Welcome Guest ( Log In | Register )

5 Pages V   1 2 3 > »   
Reply to this topicStart new topic
filtering, dither, and noiseshaping
hellokeith
post Feb 28 2008, 21:01
Post #1





Group: Members
Posts: 288
Joined: 14-August 06
Member No.: 34027



Would someone be kind enough to summarize how filtering, dither, and noiseshaping are used in SRC and mastering applications? Are they ever used simultaneously?
Go to the top of the page
+Quote Post
AndyH-ha
post Feb 28 2008, 21:25
Post #2





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



Filtering is an awfully big topic. Filters are used for a great many things. If you mean something along the lines of the brick wall filters for playback, that is part of the hardware, not the data. Many kind of filters are used in mastering, mainly to emphasize or reduce particular frequencies or frequency ranges.

Dithering and noise shaping are use together. Dither is noise shaped for best results, mainly so you donít hear the dithering noise. Dither can be applied at recording time, in the analogue domain prior to the ADC, but is only relevant for 16 bit recording, and probably just about non-existent in professional work these days. Also in amateur and home work I suspect, as I donít know of any soundcard with the ability to do it.

The only other time dither is used is when reducing the bit depth. Going from 32 or 24 bit to 16 bit results in quantization distortion. Dither eliminates that. The trade off is a higher background noise, which sound a lot better than the distortion. Good noise shaping puts most of the dither in the very high frequency range where few people have any chance of hearing it.
Go to the top of the page
+Quote Post
AndyH-ha
post Feb 28 2008, 23:44
Post #3





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



When changing the sample rate, filters are quite important, at least when going from a higher to a lower sample rate. The filters donít seem to really make much of a difference when upsampling, but their use is a pretty normal part of the process. Without high frequency cut off before downsampling, there would be a lot of aliasing distortion -- if there were any higher frequencies in the original (beyond the Nyquist limit of the result sample rate) .
Go to the top of the page
+Quote Post
Woodinville
post Feb 29 2008, 00:51
Post #4





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



For filtering: http://www.aes.org/sections/pnw/ppt/filters/filtutv1.ppt

For quantization, noise shaping, and dithering: http://www.aes.org/sections/pnw/ppt/adc.ppt

More there than can be discussed in one article here.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
knutinh
post Feb 29 2008, 12:31
Post #5





Group: Members
Posts: 569
Joined: 1-November 06
Member No.: 37047



QUOTE (AndyH-ha @ Feb 28 2008, 23:44) *
The filters donít seem to really make much of a difference when upsampling, but their use is a pretty normal part of the process.

Try generating a regular 8kHz sampled signal (with 4kHz bandwidth), then upsampling to 96kHz with close to "no filtering": producing pulses 1 sample wide (1/96000 seconds) spaced by 1/8000 seconds...

-k
Go to the top of the page
+Quote Post
SebastianG
post Feb 29 2008, 15:14
Post #6





Group: Developer
Posts: 1318
Joined: 20-March 04
From: GŲttingen (DE)
Member No.: 12875



QUOTE (AndyH-ha @ Feb 28 2008, 23:44) *
The filters donít seem to really make much of a difference when upsampling, but their use is a pretty normal part of the process.

How do you resample to a higher sampling rate without filters? smile.gif
Of course there are also filters involved -- even if you do linear interpolation. Linear interpolation corresponds to a filter with a triangular impulse response. These filters arn't used to fight aliasing but imaging.

QUOTE (knutinh @ Feb 29 2008, 12:31) *
... 1 sample wide ...

A sample has no width.

Cheers,
SG
Go to the top of the page
+Quote Post
AndyH-ha
post Feb 29 2008, 22:54
Post #7





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



I canít speak to what in the resampling process may mathematically be called a filter, so I will be more specific. CoolEdit/Audition, which we know does very good resampling, provides pre and post filters as an option. If you select some music, such as a CD track, and upsample from 44.1kHz to 96kHz, it can be shown that there is some difference, depending on whether or not one selects the filters option.

Someone may be able to provide a sample where the difference is readily audible, but in my more general tests with music, the differences were not audible. It was easier to find audible differences when downsampling.
Go to the top of the page
+Quote Post
Woodinville
post Mar 1 2008, 00:01
Post #8





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (AndyH-ha @ Feb 29 2008, 13:54) *
I canít speak to what in the resampling process may mathematically be called a filter, so I will be more specific. CoolEdit/Audition, which we know does very good resampling, provides pre and post filters as an option. If you select some music, such as a CD track, and upsample from 44.1kHz to 96kHz, it can be shown that there is some difference, depending on whether or not one selects the filters option.

Someone may be able to provide a sample where the difference is readily audible, but in my more general tests with music, the differences were not audible. It was easier to find audible differences when downsampling.


Resampling by its nature must absolutely include filtering, so if CooEdit is doing "very good resampling" then it is unquestionably filtering.

If it is not, there will be a great problem.

Try this.

Take a 3.5 kHz sine wave sampled at 8kHz.

resample it.

if you wind up with a nasty 4.5 kHz image, it doesn't do "very good resampling". If you do not, it filters.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
cabbagerat
post Mar 2 2008, 09:26
Post #9





Group: Members
Posts: 1018
Joined: 27-September 03
From: Cape Town
Member No.: 9042



QUOTE (AndyH-ha @ Feb 29 2008, 13:54) *
I canít speak to what in the resampling process may mathematically be called a filter, so I will be more specific. CoolEdit/Audition, which we know does very good resampling, provides pre and post filters as an option. If you select some music, such as a CD track, and upsample from 44.1kHz to 96kHz, it can be shown that there is some difference, depending on whether or not one selects the filters option.
I have never used Audition, but the fact is that unless you apply an antialiasing filter (for rate reduction) or an anti-imaging filter (for rate increase), then the process shouldn't be called resampling at all. Without these filters, the "resampling" operation violates the Nyquist theorem. Basically, you end up with samples of something - but not samples of the original signal.


--------------------
Simulate your radar: http://www.brooker.co.za/fers/
Go to the top of the page
+Quote Post
eevan
post Mar 2 2008, 12:49
Post #10





Group: Members
Posts: 537
Joined: 9-April 07
From: Belgrade, Serbia
Member No.: 42357



QUOTE (AndyH-ha @ Feb 29 2008, 13:54) *
CoolEdit/Audition, which we know does very good resampling, provides pre and post filters as an option.
That's right, but I'm not sure why they left it as an option? Perhaps to provide us the ability to create false frequencies as an unusual effect. smile.gif

QUOTE (Manual)
3. Drag the Low/High Quality slider to adjust the quality of the sampling conversion.
Higher values retain more high frequencies (they prevent aliasing of higher frequencies to lower ones), but the conversion takes longer. Lower values requires less processing time but result in certain high frequencies being "rolled off," leading to muffled-sounding audio. Usually, values between 100 and 400 are fine for most conversion needs.

Use higher values whenever you downsample a high rate to a low rate. When upsampling, results from lower values sound almost identical to those from higher values.

4. Select Pre/Post Filter to prevent false frequencies from being generated at the low end of the audio spectrum. Select this option for the best results.


--------------------
If age or weaknes doe prohibyte bloudletting you must use boxing
Go to the top of the page
+Quote Post
tgoose
post Mar 2 2008, 13:53
Post #11





Group: Members
Posts: 407
Joined: 12-April 05
Member No.: 21399



QUOTE (AndyH-ha @ Feb 28 2008, 20:25) *
Dithering and noise shaping are use together. Dither is noise shaped for best results, mainly so you donít hear the dithering noise. Dither can be applied at recording time, in the analogue domain prior to the ADC, but is only relevant for 16 bit recording, and probably just about non-existent in professional work these days. Also in amateur and home work I suspect, as I donít know of any soundcard with the ability to do it.

Sonic Studio, Pyramix, Waves hardware, and the tc6000 will all dither to 24 bits, as well as probably plenty of other pro equipment. In my book there's never a reason not to dither before ADC or before sample rate conversion or lowering bit depth.
Go to the top of the page
+Quote Post
AndyH-ha
post Mar 2 2008, 20:47
Post #12





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



The reason to use or not use dither is Ďdoes it make a difference?í Well, it always makes a difference in the amount of noise in the mix; it is added noise, but does it improve anything? If processing at 24 bit, for anything except resampling to a lower bit depth, the only audible difference it can make is -- more noise. The quantization errors are so small that they canít be heard, so dither helps nothing.

There are a lot of superstitions in audio, but maybe 24 bit integer does need some help. Floating point is definitely superior to integer math for audio processing. Iíve never used any of those dinosaur programs that still process with integer math, so I canít say from experience. I have heard rumors that mixing and mastering in 24 bit integer clearly sounds worse, so maybe dithering transforms would buy something there. The proof of the pudding is always successful ABX tests; I predict no one will accomplish that with 32 bit floating point transforms, probably not even with test tones. If someone can do it with integer math processing, that just shows they should not be using it.
Go to the top of the page
+Quote Post
Vitecs
post Mar 3 2008, 13:18
Post #13





Group: Members
Posts: 40
Joined: 6-November 07
Member No.: 48526



QUOTE (AndyH-ha @ Feb 28 2008, 14:25) *
The only other time dither is used is when reducing the bit depth.

Is there any sense to dither+NSH while saving material with the same bit-depth? I have weird example: 16 -> reduce volume on 6.02 dB (shift one bit) -> save 16. We probably end-up with dithering "dithered" material in this case?

This post has been edited by Vitecs: Mar 3 2008, 13:19
Go to the top of the page
+Quote Post
knutinh
post Mar 3 2008, 15:18
Post #14





Group: Members
Posts: 569
Joined: 1-November 06
Member No.: 37047



QUOTE (AndyH-ha @ Mar 2 2008, 20:47) *
The reason to use or not use dither is Ďdoes it make a difference?í Well, it always makes a difference in the amount of noise in the mix; it is added noise, but does it improve anything? If processing at 24 bit, for anything except resampling to a lower bit depth, the only audible difference it can make is -- more noise. The quantization errors are so small that they canít be heard, so dither helps nothing.

On the other hand, usually whenever one introduces quantization, you get the choice between correlated distortion, or non-correlated dithering. I think that in cases when quantizing distortion cannot be heard, then typically dithering cannot be heard.

Substituting something that sounds bad with something that sounds less bad seems like a good thing, even if both are at levels where they cannot be heard?

-k
Go to the top of the page
+Quote Post
pdq
post Mar 3 2008, 16:18
Post #15





Group: Members
Posts: 3407
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



QUOTE (Vitecs @ Mar 3 2008, 08:18) *
QUOTE (AndyH-ha @ Feb 28 2008, 14:25) *

The only other time dither is used is when reducing the bit depth.

Is there any sense to dither+NSH while saving material with the same bit-depth? I have weird example: 16 -> reduce volume on 6.02 dB (shift one bit) -> save 16. We probably end-up with dithering "dithered" material in this case?

This is in essence a bit depth reduction. Dividing the values by 2 results in a 17 bit value which must be reduced to 16 bits, therefore dithering is called for.
Go to the top of the page
+Quote Post
AndyH-ha
post Mar 3 2008, 21:15
Post #16





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



I seem to have mis-spoke on that. I donít often think about processing at 16 bits, but it is essentially the same as recording at 16 bit. The quantization errors with 16 bit transforms (such as amplification) are much larger than when using 24 or 32 bit. It is common to dither the transforms to prevention distortion and increase the dynamic range.

If you take most modern pop music and do some such manipulation, the dynamic range is already so low that dither vs non-dither is unlikely to make an audible difference in that respect. Being that the low dynamic range is achieved at very high levels, the quantization errors at high bit depth are unlikely to be audible even without dithering. However, the general rule is to dither.

If one does a few such transforms in sequence, there will soon be enough dither in the mix to self dither any further calculations. Adding more dither then does not reduce distortion, it just adds more noise. Again, good noise shaping can probably ameliorate that. Some programs do not provide for dither options such as depth, type, and shape when preforming transforms. With these, at least, it is easy to verify that the dither quickly becomes audible (i.e. after a few applications) if one uses music with some fairly quiet passages.
Go to the top of the page
+Quote Post
pdq
post Mar 3 2008, 22:48
Post #17





Group: Members
Posts: 3407
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



If one takes a file with noise shaped dither and then low-pass filters it to filter out most of the noise introduced by dithering, has one then potentially increased the bit depth of the resulting file?
Go to the top of the page
+Quote Post
Woodinville
post Mar 3 2008, 23:34
Post #18





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (pdq @ Mar 3 2008, 13:48) *
If one takes a file with noise shaped dither and then low-pass filters it to filter out most of the noise introduced by dithering, has one then potentially increased the bit depth of the resulting file?


Take a look at the "adc" powerpoint deck mentioned above. This is the essence of oversampling using noise shaping.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
pdq
post Mar 4 2008, 05:29
Post #19





Group: Members
Posts: 3407
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



QUOTE (Woodinville @ Mar 3 2008, 18:34) *
QUOTE (pdq @ Mar 3 2008, 13:48) *

If one takes a file with noise shaped dither and then low-pass filters it to filter out most of the noise introduced by dithering, has one then potentially increased the bit depth of the resulting file?


Take a look at the "adc" powerpoint deck mentioned above. This is the essence of oversampling using noise shaping.

I was actually hoping for a yes/no answer so I wouldn't have to install powerpoint.
Go to the top of the page
+Quote Post
AndyH-ha
post Mar 4 2008, 08:14
Post #20





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



The bit depth is a matter of format. A 16 bit file is a 16 bit file, dithered or not.

In general, one can remove only some dither by low pass filtering; all the dither is not at high frequencies. Also, in general, one is likely to also remove some of the music.

There is a technique, or a set of techniques, of adding dither prior to the ADC that can be digitally subtracted from the data after the ADC. This result in a SNR more or less equal to the original analogue signal instead of the decreased SNR otherwise obtained by dithering. Whether this is actually in use with any of todayís superior 24 bit ADCs, I have no idea. Certainly it isnít available in any soundcard I ever read about.
Go to the top of the page
+Quote Post
knutinh
post Mar 4 2008, 08:27
Post #21





Group: Members
Posts: 569
Joined: 1-November 06
Member No.: 37047



I am guessing that as long as current ADCs are 24 bit or more, while their "precision" is typically limited to 19-20 bits at best, the noise present at the input is sufficient to avoid quantising distortion?

pdq:
Adding noise prior to quantisation, then lowpass-filtering is essentially "encoding" more amplitude information into the high-frequency parts of the signal. A single ("DC") 32-bit number can easily be represented by a 1-bit stream if sufficient amount of noise is added prior to quantisation and the signal is then lowpassfiltered.

I think that your question cannot be answered by a simple yes/no. When one deals with oversampling, noise-shaping systems, it is probably better to view the overall information (i.e. bitrate) of a system as a property that can be spent for bandwidth or amplitude-precision in different ways, but always limited by the bitrate.

-k

This post has been edited by knutinh: Mar 4 2008, 08:28
Go to the top of the page
+Quote Post
Kees de Visser
post Mar 4 2008, 10:46
Post #22





Group: Members
Posts: 677
Joined: 22-May 05
From: France
Member No.: 22220



QUOTE (pdq @ Mar 3 2008, 22:48) *
If one takes a file with noise shaped dither and then low-pass filters it to filter out most of the noise introduced by dithering, has one then potentially increased the bit depth of the resulting file?
A low-pass filter will reduce the bandwidth of the signal, and thereby increase the total SNR.
The use of a low-pass filter requires modification (DSP) of the original signal data so you will either end up with an increased wordlength (e.g. 24 or 32 bit) or have to re-dither, but that's probably not what you want because the purpose was to get rid of the dither noise.
There's no such thing as a free lunch I'm afraid.
Go to the top of the page
+Quote Post
Woodinville
post Mar 4 2008, 19:57
Post #23





Group: Members
Posts: 1402
Joined: 9-January 05
From: JJ's office.
Member No.: 18957



QUOTE (pdq @ Mar 3 2008, 20:29) *
QUOTE (Woodinville @ Mar 3 2008, 18:34) *

QUOTE (pdq @ Mar 3 2008, 13:48) *

If one takes a file with noise shaped dither and then low-pass filters it to filter out most of the noise introduced by dithering, has one then potentially increased the bit depth of the resulting file?


Take a look at the "adc" powerpoint deck mentioned above. This is the essence of oversampling using noise shaping.

I was actually hoping for a yes/no answer so I wouldn't have to install powerpoint.


Well, the answer isn't that simple. You're better off doing a bit of study.


--------------------
-----
J. D. (jj) Johnston
Go to the top of the page
+Quote Post
AndyH-ha
post Mar 4 2008, 20:10
Post #24





Group: Members
Posts: 2207
Joined: 31-August 05
Member No.: 24222



I donít know if a "precision" of less than 24 bits is the proper expression. There are lower limits on circuit noise (without cryogenic cooling), so the electronic noise masks any lower level signals. I think it is more correct to say that the ADC itself is really 24 bits, but the lowest level bits just are not useful in the real world; they are produced and recorded but they can contain only noise.

Whether or not self dithering is responsible for the lack of (audible) quantization distortion when recording with a decent 24 bit soundcard is an interesting question. It is always the case that such errors are essentially irrelevant at higher bit depths. While I can observe the results on screen at higher signal levels when working with 16 bit data, the highest level at which I can hear the distortion is somewhere around -75dB. That is, it is only audible for the least most significant 3 or 4 bits. Operating at 24 bits, the lower 3 or 4 bits are unavailable. Does the ďaudibleĒ distortion region move down 8 bit under 24 bit operation, or is it just too small to matter, period?

I have no good software that works on 24 bit data (except to open or save as), so I canít say if it is different. Experimenting on computer generated floating point audio (thus no masking electronic noise included), I find that quantization distortion is irrelevant, even after many transforms. I canít hear it and I can neither see it nor measure it with any tools I have available.
Go to the top of the page
+Quote Post
pdq
post Mar 4 2008, 20:30
Post #25





Group: Members
Posts: 3407
Joined: 1-September 05
From: SE Pennsylvania
Member No.: 24233



QUOTE (Woodinville @ Mar 4 2008, 14:57) *
QUOTE (pdq @ Mar 3 2008, 20:29) *

QUOTE (Woodinville @ Mar 3 2008, 18:34) *

QUOTE (pdq @ Mar 3 2008, 13:48) *

If one takes a file with noise shaped dither and then low-pass filters it to filter out most of the noise introduced by dithering, has one then potentially increased the bit depth of the resulting file?

Take a look at the "adc" powerpoint deck mentioned above. This is the essence of oversampling using noise shaping.

I was actually hoping for a yes/no answer so I wouldn't have to install powerpoint.

Well, the answer isn't that simple. You're better off doing a bit of study.

Okay then let me rephrase the question. Isn't this exactly what the human auditory system does with dithered signals? When you sum a low-level signal in the audible range with a dither signal that is mostly supersonic, doesn't your ear/brain combine the two in such a way as to regenerate the part of the low-level signal that would have been lost to quantization? And isn't this essentially low-pass filtering?
Go to the top of the page
+Quote Post

5 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th September 2014 - 04:17