IPB

Welcome Guest ( Log In | Register )

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
 
Start new topic
Replies
2Bdecided
post Mar 19 2008, 15:21
Post #2


ReplayGain developer


Group: Developer
Posts: 5134
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



EDIT: this is in reply to MLXXX, post 50.

Why did you use noise shaped dither?

If you push all the noise above ~16kHz, then it'll probably hide a 20kHz signal!

I've attached the frequency plots for 20kHz, -100dB (generated the same way as you), converted to 16-bit without dither, and with 1LSB triangular dither (no noise shaping).

The 20kHz tone survives, distortion-free, as expected.

Cheers,
David.

This post has been edited by 2Bdecided: Mar 19 2008, 15:23
Attached thumbnail(s)
Attached Image
 
Go to the top of the page
+Quote Post
Kees de Visser
post Mar 19 2008, 16:15
Post #3





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



2Bdecided, are you sure the signal was at -100 dBFS ?
I wouldn't expect it to show up at all after truncation to 16 bits (without dithering).
Go to the top of the page
+Quote Post
2Bdecided
post Mar 20 2008, 12:31
Post #4


ReplayGain developer


Group: Developer
Posts: 5134
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (Kees de Visser @ Mar 19 2008, 15:15) *
2Bdecided, are you sure the signal was at -100 dBFS ?
I wouldn't expect it to show up at all after truncation to 16 bits (without dithering).
It was +/- 0.33 LSB peak amplitude.

Whether this toggles the LSB in the output or not (without dither) depends entirely on the rounding used in the software. In Cool Edit, it does.


QUOTE (MLXXX @ Mar 19 2008, 15:03) *
Did you notice that your graphs are showing -60dB rather than -100dB?

I think you did not reduce the signal amplitude sufficiently.
I did the test correctly. The frequency analysis dB scale is uncalibrated. You can reproduce the exact same graph using the FFT length, range and offset values shown in my image.


QUOTE (MLXXX @ Mar 20 2008, 11:18) *
2. The higher the frequency of the tone, the more difficult it was to hear it above the dither noise. In particular, the 20KHz tone tended to blend in with the dither, despite the whole file being played back at less than 1/5th speed, bringing the 20KHz tone into a more readily audible range. [It became a 3628Hz tone as a result of the slow playback.]

I was surpised that the 20KHz tone showed up at a similar intensity level in the frequency analysis graph to lower frequency tones I tried. On the other hand, I could not fail to notice how much more difficult it was to hear the 20Khz tone above the dither noise compared with lower frequency tones

For example, the 20KHz tone did not benefit from the dither as much as a 2KHz tone.

I did not experiment with other varieties of dither. I suspect all forms of dither would struggle to make a low amplitude 20KHz waveform audible above dither/quantisation noise, where the format is 44.1/16 PCM.
This is entirely false.

The high frequency fall off you are hearing is due to your sound card, windows internal wave handling, and maybe your ears. The former two will fall off around the Nyquist frequency, whatever sample rate you choose for playback.

The frequency graphs show you what is actually there - 2kHz, 20kHz and even 200Hz - all are equally helped by dither. There is no frequency dependent effect.


If you look at the FAQ, you can find other threads where people join HA to explain why universally held theories are wrong, and proceed to prove this by incorrect use of hardware or software.

It's quite amusing, but we already have enough of these threads!

Please trust the frequency analysis: it is, in this case, correct.

Cheers,
David.

P.S. I'm not trying to be rude or harsh, but when you realise what you're claiming, you'll be surprised at the arrogance of it! wink.gif

This post has been edited by 2Bdecided: Mar 20 2008, 12:32
Go to the top of the page
+Quote Post
MLXXX
post Mar 20 2008, 13:42
Post #5





Group: Members
Posts: 172
Joined: 25-February 08
From: Australia
Member No.: 51585



QUOTE (2Bdecided @ Mar 20 2008, 21:31) *
The high frequency fall off you are hearing is due to your sound card, windows internal wave handling, and maybe your ears. The former two will fall off around the Nyquist frequency, whatever sample rate you choose for playback.

I was reluctant to perform the exercise that you suggested I could do in under a minute. I downloaded Cool Edit Pro only a week ago and have barely used it. I anticipated there would be variables I would be unfamiliar with. And you have listed a few potential variables I did actually consider and I'm sure there are more.

I see now that you in fact changed the scale on your frequency analysis plot by 40dB by changing the reference level. When I change the various settings to match yours, I do not get the clear graphs you get, but ones showing the noise at a much closer level to the signal. Anyway that is a detail I will not worry about.

I will concede that the 20KHz response is definitely there, and this differs from my intuitive hypothesis that it might hardly be present at all.

I also acknowledge that the intensity level shows up as at least approximately the same as for lower frequencies. Whether under ideal conditions it is as easy to hear above the dither noise (something about which I still entertain doubts), becomes less important with 44.1KHz as we are moving away from that to 48KHz as a minimum sampling rate.

Although my hearing extends to about 21KHz, the response is much less than at lower frequencies. This is a further reason for the topic to be moot, as most of us will not be able to hear higher frequency content that is commensurate with quantisation error.

On the whole I've found material I've read in HA quite stimulating, and I anticipate I will stick around a bit longer.

Regarding an attitude of arrogance I suppose it may have been presumptuous of me to query your graphs [though they do look so different to mine] but I have to say that as a newcomer I have received almost a barrage of negative remarks in this particular thread. My initial purpose was to clarify that you can usefully reduce higher frequencies in the dither/quantisation noise in instances where the target signal is at lower frequencies; something that is at once almost self-evident but on the other hand probably difficult to explain mathematically.

And it is something pdq had requested an answer to.

His question has been answered in the affirmative, subject to the proviso that you cannot do the filtering in the digital domain (traditional 16 bit PCM) without retaining the result of the filtering at a greater precision. This proviso to some people (even pdq himself) was sufficiently obvious not to need mentioning.

This post has been edited by MLXXX: Mar 20 2008, 14:23
Go to the top of the page
+Quote Post
2Bdecided
post Mar 20 2008, 15:43
Post #6


ReplayGain developer


Group: Developer
Posts: 5134
Joined: 5-November 01
From: Yorkshire, UK
Member No.: 409



QUOTE (MLXXX @ Mar 20 2008, 12:42) *
I see now that you in fact changed the scale on your frequency analysis plot by 40dB by changing the reference level. When I change the various settings to match yours, I do not get the clear graphs you get, but ones showing the noise at a much closer level to the signal. Anyway that is a detail I will not worry about.
I generated a 1 second long tone, I selected the entire waveform, and clicked "scan" in the frequency analysis window. This averages the results of the analysis windows across the selection, rather than just showing you the result from one analysis window (the middle one).

Even with the reference changed from -40dB to 0dB, you shouldn't trust the graph 100%. It's nearly correctly for some settings, but not "calibrated". It'll jump around by a few dB if you change the window function, for example.


QUOTE
Regarding an attitude of arrogance I suppose it may have been presumptuous of me to query your graphs
No, it wasn't that - I don't mind people disagreeing with me! What you're doing by questioning whether dither "works" is questioning decades of work by people far more qualified than you or I. It's fair enough to question, and lots of "qualified" people have been wrong before, but the evidence in this case is overwhelming.

Cheers,
David.
Go to the top of the page
+Quote Post
MLXXX
post Mar 22 2008, 15:26
Post #7





Group: Members
Posts: 172
Joined: 25-February 08
From: Australia
Member No.: 51585



QUOTE (2Bdecided @ Mar 21 2008, 00:43) *
I generated a 1 second long tone, I selected the entire waveform, and clicked "scan" in the frequency analysis window. This averages the results of the analysis windows across the selection, rather than just showing you the result from one analysis window (the middle one).

Even with the reference changed from -40dB to 0dB, you shouldn't trust the graph 100%. It's nearly correctly for some settings, but not "calibrated". It'll jump around by a few dB if you change the window function, for example.

Thanks for that. I have now been able to replicate your graphs.

But I have come up with an anomaly. When I use my version of cool edit pro (2.00 build 2095) to generate a stereo sine wave it seems to generate the right channel differently. This is apparent when looking at the frequency distribution of the 32 or 24 bit wave immediately after it is generated: the right-hand channel has a 'fatter' distribution.

And after dithering to 16-bits, odd order harmonics are visible, but only in the right channel. I do not know whether others have encountered this. Here is what the frequency distribution looks like for a 5 second clip recorded at -50dB using a triangular pdf dither (set to 2 bits). This was all done in Cool Edit and the result was the same on an old pc running XP and a newer pc running Vista:-



The difference is real. After separating the channels, I was able to successfully ABX them. [Interestingly, the channel with the harmonics actually sounded 'purer' to my ears than the one without.]

I have to assume that I have used an incorrect setting, or the version of cool edit had a minor bug.

Although I know that some forms of stereo encoding use L+R in one channel and a difference signal in the other channel (e.g. FM radio), I do not think that is the method for standard 16 or 24 bit stereo PCM at 44.1KHz. When I used other software (Audacity) to generate a 4KHz stereo sinewave, both channels were the same.

QUOTE (SebastianG @ Mar 22 2008, 00:46) *
Can anyone confirm this or point out any mistakes I possibly made?
I think I'm going to run some simulations...

Hi Sebastian. I have read the paper, but its mathematics are well beyond my current comprehension. I can only offer an intuitive comment, and it is that the lower frequency components of dither are probably redundant. This may be why it can be slightly more efficient to start with coloured noise.

This post has been edited by MLXXX: Mar 22 2008, 15:38
Go to the top of the page
+Quote Post

Posts in this topic
- hellokeith   filtering, dither, and noiseshaping   Feb 28 2008, 21:01
- - AndyH-ha   Filtering is an awfully big topic. Filters are use...   Feb 28 2008, 21:25
|- - tgoose   QUOTE (AndyH-ha @ Feb 28 2008, 20:25...   Mar 2 2008, 13:53
|- - Vitecs   QUOTE (AndyH-ha @ Feb 28 2008, 14:25...   Mar 3 2008, 13:18
|- - pdq   QUOTE (Vitecs @ Mar 3 2008, 08:18) QUOTE ...   Mar 3 2008, 16:18
|- - Vitecs   QUOTE (pdq @ Mar 3 2008, 09:18) QUOTE (Vi...   Mar 5 2008, 09:38
- - AndyH-ha   When changing the sample rate, filters are quite i...   Feb 28 2008, 23:44
|- - knutinh   QUOTE (AndyH-ha @ Feb 28 2008, 23:44...   Feb 29 2008, 12:31
- - Woodinville   For filtering: http://www.aes.org/sections/pnw/ppt...   Feb 29 2008, 00:51
- - SebastianG   QUOTE (AndyH-ha @ Feb 28 2008, 23:44...   Feb 29 2008, 15:14
- - AndyH-ha   I canít speak to what in the resampling process ma...   Feb 29 2008, 22:54
|- - Woodinville   QUOTE (AndyH-ha @ Feb 29 2008, 13:54...   Mar 1 2008, 00:01
- - cabbagerat   QUOTE (AndyH-ha @ Feb 29 2008, 13:54...   Mar 2 2008, 09:26
|- - eevan   QUOTE (AndyH-ha @ Feb 29 2008, 13:54...   Mar 2 2008, 12:49
- - AndyH-ha   The reason to use or not use dither is Ďdoes it ma...   Mar 2 2008, 20:47
|- - knutinh   QUOTE (AndyH-ha @ Mar 2 2008, 20:47)...   Mar 3 2008, 15:18
- - AndyH-ha   I seem to have mis-spoke on that. I donít often th...   Mar 3 2008, 21:15
- - pdq   If one takes a file with noise shaped dither and t...   Mar 3 2008, 22:48
|- - Woodinville   QUOTE (pdq @ Mar 3 2008, 13:48) If one ta...   Mar 3 2008, 23:34
||- - pdq   QUOTE (Woodinville @ Mar 3 2008, 18:34) Q...   Mar 4 2008, 05:29
||- - Woodinville   QUOTE (pdq @ Mar 3 2008, 20:29) QUOTE (Wo...   Mar 4 2008, 19:57
||- - pdq   QUOTE (Woodinville @ Mar 4 2008, 14:57) Q...   Mar 4 2008, 20:30
||- - Woodinville   QUOTE (pdq @ Mar 4 2008, 11:30) QUOTE (Wo...   Mar 4 2008, 20:49
|- - Kees de Visser   QUOTE (pdq @ Mar 3 2008, 22:48) If one ta...   Mar 4 2008, 10:46
|- - MLXXX   QUOTE (pdq @ Mar 4 2008, 07:48) If one ta...   Mar 17 2008, 16:24
|- - SebastianG   QUOTE (MLXXX @ Mar 17 2008, 16:24) But no...   Mar 17 2008, 18:09
|- - MLXXX   @ SebastianG, 1. I was referring to traditional ...   Mar 17 2008, 23:43
- - AndyH-ha   The bit depth is a matter of format. A 16 bit file...   Mar 4 2008, 08:14
- - knutinh   I am guessing that as long as current ADCs are 24 ...   Mar 4 2008, 08:27
- - AndyH-ha   I donít know if a "precision" of less th...   Mar 4 2008, 20:10
|- - knutinh   QUOTE (AndyH-ha @ Mar 4 2008, 20:10)...   Mar 5 2008, 10:10
- - AndyH-ha   QUOTE OK, but "old" (or previous) dither...   Mar 5 2008, 21:17
- - Woodinville   Noise-shaping and dither are two different, indepe...   Mar 17 2008, 20:03
- - AndyH-ha   Unless I am forgetting something, the primary attr...   Mar 18 2008, 00:03
|- - MLXXX   QUOTE (SebastianG @ Mar 18 2008, 09:45) ....   Mar 18 2008, 07:40
|- - pdq   QUOTE (MLXXX @ Mar 18 2008, 02:40) Yes if...   Mar 18 2008, 14:17
|- - MLXXX   QUOTE (pdq @ Mar 18 2008, 23:17) I actual...   Mar 18 2008, 15:06
|- - SebastianG   QUOTE (MLXXX @ Mar 18 2008, 15:06) And if...   Mar 18 2008, 17:03
||- - MLXXX   QUOTE (SebastianG @ Mar 19 2008, 02:03) Q...   Mar 19 2008, 00:02
||- - 2Bdecided   QUOTE (MLXXX @ Mar 18 2008, 23:02) I pres...   Mar 19 2008, 12:04
||- - pdq   QUOTE (2Bdecided @ Mar 19 2008, 07:04) QU...   Mar 19 2008, 13:03
||- - MLXXX   QUOTE (2Bdecided @ Mar 19 2008, 21:04) QU...   Mar 19 2008, 13:58
||- - SebastianG   Common terminology consistent with the works of Li...   Mar 19 2008, 15:11
|- - pdq   QUOTE (MLXXX @ Mar 18 2008, 10:06) The bi...   Mar 18 2008, 17:50
|- - 2Bdecided   QUOTE (pdq @ Mar 18 2008, 16:50) QUOTE (M...   Mar 18 2008, 19:05
|- - Woodinville   QUOTE (pdq @ Mar 18 2008, 09:50) QUOTE (M...   Mar 18 2008, 19:14
- - SebastianG   QUOTE (Woodinville @ Mar 17 2008, 20:03) ...   Mar 18 2008, 00:45
|- - Woodinville   QUOTE (SebastianG @ Mar 17 2008, 16:45) Q...   Mar 18 2008, 05:14
- - pdq   How about my other question. If 16-bit dithered au...   Mar 18 2008, 19:54
|- - Woodinville   QUOTE (pdq @ Mar 18 2008, 11:54) How abou...   Mar 18 2008, 20:40
- - cabbagerat   QUOTE (pdq @ Mar 18 2008, 10:54) How abou...   Mar 18 2008, 20:44
- - 2Bdecided   EDIT: this is in reply to MLXXX, post 50. Why did...   Mar 19 2008, 15:21
|- - MLXXX   QUOTE (2Bdecided @ Mar 20 2008, 00:21) Wh...   Mar 19 2008, 16:03
|- - Kees de Visser   2Bdecided, are you sure the signal was at -100 dBF...   Mar 19 2008, 16:15
|- - 2Bdecided   QUOTE (Kees de Visser @ Mar 19 2008, 15:1...   Mar 20 2008, 12:31
|- - MLXXX   QUOTE (2Bdecided @ Mar 20 2008, 21:31) Th...   Mar 20 2008, 13:42
|- - 2Bdecided   QUOTE (MLXXX @ Mar 20 2008, 12:42) I see ...   Mar 20 2008, 15:43
|- - MLXXX   QUOTE (2Bdecided @ Mar 21 2008, 00:43) Wh...   Mar 20 2008, 16:18
||- - SebastianG   QUOTE (MLXXX @ Mar 20 2008, 16:18) What I...   Mar 20 2008, 16:41
||- - MLXXX   QUOTE (SebastianG @ Mar 21 2008, 01:41) Q...   Mar 20 2008, 17:07
||- - SebastianG   QUOTE (MLXXX @ Mar 20 2008, 17:07) 1. THD...   Mar 20 2008, 18:35
||- - Woodinville   QUOTE (MLXXX @ Mar 20 2008, 09:07) 1. THD...   Mar 20 2008, 19:52
|- - MLXXX   QUOTE (2Bdecided @ Mar 21 2008, 00:43) I ...   Mar 22 2008, 15:26
|- - 2Bdecided   QUOTE (MLXXX @ Mar 22 2008, 14:26) I have...   Mar 25 2008, 11:40
|- - MLXXX   QUOTE (cabbagerat @ Mar 25 2008, 20:28) A...   Mar 25 2008, 11:46
- - MLXXX   Since my previous post I have used Cooledit to: 1....   Mar 20 2008, 12:18
- - pdq   In the case of the small 20 kHz signal, if one app...   Mar 20 2008, 17:45
|- - MLXXX   QUOTE (pdq @ Mar 21 2008, 02:45) In the c...   Mar 22 2008, 16:20
- - SebastianG   Here's something I've been thinking about ...   Mar 21 2008, 15:46
- - cabbagerat   QUOTE (MLXXX @ Mar 22 2008, 07:20) First ...   Mar 25 2008, 06:57
|- - MLXXX   Cabbagerat, I have been wrong so many times previo...   Mar 25 2008, 10:56
|- - pdq   QUOTE (MLXXX @ Mar 25 2008, 05:56) I do n...   Mar 25 2008, 11:11
|- - MLXXX   QUOTE (pdq @ Mar 25 2008, 20:11) A series...   Mar 25 2008, 15:25
- - cabbagerat   QUOTE (MLXXX @ Mar 25 2008, 01:56) Cabbag...   Mar 25 2008, 11:28
|- - pdq   QUOTE (cabbagerat @ Mar 25 2008, 06:28) Q...   Mar 25 2008, 14:04
- - 2Bdecided   Also, IIRC, the "correct" dither setting...   Mar 25 2008, 12:28
- - cabbagerat   QUOTE (MLXXX @ Mar 25 2008, 02:46) The po...   Mar 25 2008, 14:03
- - cabbagerat   QUOTE (MLXXX @ Mar 25 2008, 06:25) QUOTE ...   Mar 25 2008, 16:12
- - 2Bdecided   MLXXX, Click "FAQ" (top right) Click ...   Mar 25 2008, 16:20
|- - MLXXX   David, I'll take that to mean you have tired ...   Mar 25 2008, 17:16
|- - 2Bdecided   QUOTE (MLXXX @ Mar 25 2008, 16:16) David,...   Mar 26 2008, 14:17
|- - MLXXX   QUOTE (cabbagerat @ Mar 25 2008, 23:03) ....   Mar 26 2008, 16:00
- - cabbagerat   QUOTE (MLXXX @ Mar 25 2008, 08:16) I am s...   Mar 25 2008, 17:41
|- - MLXXX   QUOTE (cabbagerat @ Mar 26 2008, 02:41) W...   Mar 25 2008, 17:58
|- - greynol   QUOTE (MLXXX @ Mar 25 2008, 09:58) You ha...   Mar 25 2008, 18:01
|- - MLXXX   QUOTE (greynol @ Mar 26 2008, 03:01) Beca...   Mar 25 2008, 18:09
- - greynol   That would be an 11.025 kHz signal! Sounds li...   Mar 25 2008, 18:12
- - MLXXX   Yes greynol, it appears I typed far too late into ...   Mar 25 2008, 18:33
- - 2Bdecided   Contrary to a lot of what you'll read on HA, I...   Mar 26 2008, 16:29
|- - krabapple   QUOTE (2Bdecided @ Mar 26 2008, 11:29) Co...   Mar 26 2008, 17:27
||- - 2Bdecided   QUOTE (krabapple @ Mar 26 2008, 16:27) Bu...   Mar 26 2008, 18:33
||- - Woodinville   QUOTE (2Bdecided @ Mar 26 2008, 10:33) QU...   Mar 27 2008, 06:20
|- - MLXXX   QUOTE (2Bdecided @ Mar 27 2008, 01:29) Co...   Mar 26 2008, 23:35
- - pdq   When applying dither to 16-bit signals, is there a...   Mar 26 2008, 16:37
- - hellokeith   Woodinville, In regards to filtering/dithering/no...   Mar 27 2008, 20:14
|- - Woodinville   QUOTE (hellokeith @ Mar 27 2008, 12:14) W...   Mar 28 2008, 21:26
|- - DualIP   [quote name='Woodinville' date='Mar 28...   Mar 29 2008, 11:35
|- - MLXXX   QUOTE (DualIP @ Mar 29 2008, 20:35) Even ...   Mar 29 2008, 12:07
|- - Woodinville   QUOTE (DualIP @ Mar 29 2008, 03:35) EQ is...   Mar 29 2008, 23:34
- - hellokeith   QUOTE (Woodinville @ Mar 28 2008, 15:26) ...   Mar 31 2008, 04:34
2 Pages V   1 2 >


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: 17th September 2014 - 02:16