Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to rec.audio.high-end
Alan Hoyle
 
Posts: n/a
Default Dithering vs resampling?

I know dithering is required when lowering the volume of a digital
signal or when you decrease the number of bits in the signal (e.g. 24
bit to 16 bit). Is dithering required when a signal is just resampled e.g.
from 96 KHz/24bit to 48 Khz/24 bit?

-alan


--
Alan Hoyle - - http://www.alanhoyle.com/
"I don't want the world, I just want your half." -TMBG
Get Horizontal, Play Ultimate.


--

  #2   Report Post  
Posted to rec.audio.high-end
MC
 
Posts: n/a
Default Dithering vs resampling?

"Alan Hoyle" wrote in message
...
I know dithering is required when lowering the volume of a digital
signal or when you decrease the number of bits in the signal (e.g. 24
bit to 16 bit). Is dithering required when a signal is just resampled
e.g.
from 96 KHz/24bit to 48 Khz/24 bit?


Certainly not when you're just combining every 2 samples into one, as in the
example you describe. I would think not even when the relationship is more
complex.
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
  #3   Report Post  
Posted to rec.audio.high-end
Denis Sbragion
 
Posts: n/a
Default Dithering vs resampling?

Hello Alan,

Alan Hoyle wrote in :

I know dithering is required when lowering the volume of a digital
signal or when you decrease the number of bits in the signal (e.g. 24
bit to 16 bit). Is dithering required when a signal is just resampled
e.g. from 96 KHz/24bit to 48 Khz/24 bit?


I think most of the times, yes, it's needed, at least in theory. The
intermediate results of the resampling procedure usually need an higher
resolution than the target resolution. So there are stages where you need
to truncate back to the target resolution, and so dithering in theory is
needed. It's pretty common to perform the sample rate conversion operation
switching to floating point arithmetics for better accuracy.

I don't know if there are resampling algorithms that avoid the need of
higher resolution for the intermediate results. BTW, if the target
resolution is 24 bit, this is pretty much just theory. The artifacts
generated by a truncation from, say, 64 bit double precision floating point
samples coming out from the resampling algorithm back to 24 bit PCM are
well below the noise and distortion levels of even the most accurate DAC
available in the market.

Bye,

--
Denis Sbragion
InfoTecna
Tel: +39 0362 805396, Fax: +39 0362 805404
URL: http://www.infotecna.it
  #4   Report Post  
Posted to rec.audio.high-end
Walt
 
Posts: n/a
Default Dithering vs resampling?

Alan Hoyle wrote:

I know dithering is required when lowering the volume of a digital
signal or when you decrease the number of bits in the signal (e.g. 24
bit to 16 bit). Is dithering required when a signal is just resampled e.g.
from 96 KHz/24bit to 48 Khz/24 bit?


Dithering is never actually *required* - if you don't add dither the low
level signals will be distorted, but it's not actually a requirement.
Maybe this is a specious thing to point out since dithering is always
used in practice, but bear in mind that dithering is used to make the
low level signals sound better, and there is more than one way to do it
- more recent, better algorithms base the dither on the program material
with better results.

Now, if you reduce the volume of a digital signal by, say, 6 db, you are
in effect resampling it at 1 bit less than it was before - throw away
the least significant bit, shift all the others down one and you're done
- except you've thrown away the dither (which is present in the least
significant bit) so you need to re-add dither. That's why you need to
re-dither as per your first sentence.

Now, what happens when you change the sample rate - the least
significant bit is still there, so the dither is still there. No need
to re-introduce it. However, remember what I said about there being
more than one way to introduce dither, that there are some dithering
schemes that take advantage of program material to do it "better" (i.e.
lower distortion and lower noise). So, in theory, you don't need to
re-dither, but in practice it may be beneficial to introduce additional
dithering.

//Walt
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
  #5   Report Post  
Posted to rec.audio.high-end
 
Posts: n/a
Default Dithering vs resampling?

Nope, because all you're doing is downsampling from 96Khz to 48Khz

CD
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth


  #6   Report Post  
Posted to rec.audio.high-end
 
Posts: n/a
Default Dithering vs resampling?

Alan Hoyle wrote:
I know dithering is required when lowering the volume of a digital
signal or when you decrease the number of bits in the signal (e.g. 24
bit to 16 bit). Is dithering required when a signal is just resampled e.g.
from 96 KHz/24bit to 48 Khz/24 bit?


Anytime truncation takes place, something has to be
done to prevent the generation of quantization artifacts.
If the sample rate conversion process does not require
any truncation, then no redithering or noise shaping is
required. However, it's very unlikely that such a process
would not be without truncation of some sort.

What essentially is happening when you are doing a
sample rate conversion as you describe is that first an
anti-alias filter has to be applied to limit the bandwidth
to less than half the target sample rate, in this case, the
filter must be be a low-pass with a cutoff below 24 kHz.
Then, basically, you can throw away ("decimate) every
other sample once you've done that (an integer-ratio
sample-rate reduction like this is the simplest to do,
but the principles are basically the same).

The filtering process very likely involves multiplications,
and when you have mutlitplications, you end up with
sample lengths longer than when you started. For
example, if you're multiplying a 24- by sample by a 24-
bit coefficient, the result is 48 bits long, in the same
way that multiplying a 3-digit decimal number by a 4-
digit decimal number results in a 7 digit decimal
number (e.g., 999 * 9999 = 9989001). At some point,
all this extra data is going to have to be truncated, but
if we simply throw away the bottom 24 bits, we'll get
truncation artifacts (whether, at 24 bits, it's audible is
another issue entirely).

So, BEFORE we're done and ready to send out the
filtered, down-sampled, we (in the case of simple
dither) add a suitable random value to the bottom
of the sample, and THEN get rid of the least sig-
nificant bits. This addition of this random value has
the effect that the actual value of the data you're
throwing away will tend to bias the resulting value
to one direction or another. Noise shaping accomp-
lishes a somewhat similar function, but here, in
essence, we take the part we threw away and es-
sentially feed it back into the process. Unlike simple
dither, which tends to have a broad, even spectrum,
with most of the energy in easily audible areas of the
spectrum, noise shaping algorithms will often run
the residue values through a filter in the feedback
loop and shift the noise to the extremes of the
spectrum, where it's much more difficult to hear.
The only requirement is that you have a random
value of sufficient amplitude, doesn't make much
difference what the specturm is, so you might as
well, bias the specturm so it's the least audible.

But the basic answer is, most likely, yes, resampling
requires redither or noise shaping, because it's fairly
likely that multiplication and truncation is required in
the process, and its the truncation that makes it
necessary.
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
  #8   Report Post  
Posted to rec.audio.high-end
 
Posts: n/a
Default Dithering vs resampling?

My answer was quite short. Effectively the net result of the format
change is a downsample. The sample rate converter, when it downsamples,
as my basic understanding of it goes, does so by finding common
multiple for both sample rates, in this case 96000 * 48000 =
4,608,000,000 samples. The file is converted up to that higher rate
format. Then, the file is subsequently reduced down to 48000 by
throwing away 4607952000 alternate samples for each second of music of
the file.

Also, anti-aliasing and dithering are not the same thing. Dithering is
the introduction of noise (very low level, of course) to smoothen out
and subsequently lower the noise floor of the musical data.
Anti-aliasing filters out the un-wanted frequencies above the Nyquist
frequency. The OP asked about dithering and I said it's not needed
given the formats he wanted to convert bewteen.

CD


--

  #9   Report Post  
Posted to rec.audio.high-end
 
Posts: n/a
Default Dithering vs resampling?

wrote:
My answer was quite short. Effectively the net result of the format
change is a downsample. The sample rate converter, when it downsamples,
as my basic understanding of it goes, does so by finding common
multiple for both sample rates, in this case 96000 * 48000 =
4,608,000,000 samples.


Uh, no. The technique is to find the lowerst common multiple
and up sample to that. In this case, the lowest common
multiple of 96,000 and 48,000 is, of sourse, 96,000.

The fun begins when you want to sample-rate-convert between
two rates that are not so simply related, for example, between
96,000 and 44100. It is NOT upsampled to the product,
which is 4.2 gS/sec, rather, find the least common multiple.

The file is converted up to that higher rate format. Then,
the file is subsequently reduced down to 48000 by
throwing away 4607952000 alternate samples for each
second of music of the file.


And that's where you're wrong. ANY downsampling process
MUST go through anti-aliasing FIRST, before decimation.
This is a fuindamental prerequiste of sampling, whether
you're sampling from a continuous (i.e., analog) stream or
you're down-sampling from a higher rate.

Also, anti-aliasing and dithering are not the same thing.


Nobody, most especially myself, ever said it was.

Dithering is
the introduction of noise (very low level, of course) to smoothen out
and subsequently lower the noise floor of the musical data.


Well, no, that's NOT the way it works. It does NOT lower the
noise floor, in fact, it raises it slightly. WHat it does is de-
correlates the spectrum of that noise floor from the signal.

Anti-aliasing filters out the un-wanted frequencies above
the Nyquist frequency.


Yup, that's correct, and it is PRECISELY why you MUST
remove out-of-base-band information ("un-wanted
frequencies") BEFORE you decimate. And removing
potential aliases ("un-wnated frequencies") requires
filtering. And filtering requires operations that are, as
likely as not, going to result in extension of the precision
(sample length) of each sample and thus will require
truncation. And truncation requires dithering FIRST to
prevent the introduction of signal-correlated quantization
artifacts.

The OP asked about dithering and I said it's not needed
given the formats he wanted to convert bewteen.


And, you're wrong, because the downsampling process is
NOT a simple activity of just throwing away sample as you
describe. Even when it is between two sample rates related
by the simple whole-number ratio of 2:1.

The original 96 kHz sampled stream has a bandwidth of
less than 48 kHz. The destination 48 kHz sampled stream
has a bandwidth of less than 24 kHz. If you do nothing but
decimate, the bandwidth between 24 kHz (in the new rate)
and 48 kHz (in the old rate) will be aliased down into the
0-24 kHz base band of the new 48 kHz sample stream.

Is that what you want?

I didn't think so.

So how do you prevent that?

You have to run the 96 kHz strem FIRST through a 24 kHz
low-pass anti-alias filter.. Once that's done, then, sure,
throw away every other sample, and you're done.

How do you implement a 24 kHz filter? Well, you can do it
digitally, and that takes math that does additions and
multipliciations. The result is sanmples that have MORE
than the original 24 bits. But the output is 24 bits, so you
have to truncate (normalize) to 24 bits. But, if you just
truncate, you have quantization distortion. So you dither.

You CAN'T downsample without filtering, and if you filter,
you HAVE to use operations that increase the sample
length, and if you HAVE to return your sample length
back to the original, you HAVE to truncate, and if have
to truncate, you HAVE to dither.

Downsampling by simply throwing away samples is NOT
the way it's done.


--

  #11   Report Post  
Posted to rec.audio.high-end
 
Posts: n/a
Default Dithering vs resampling?

Let me ask you this: I use CoolEdit 2000 and sometimes record at 96/24.
If I convert down to 48/24, the software won't encourage me to use
dither, but if I go from 96/24 to 48/16, the dither option is
automatically grayed in so that I have to use it. What does that say
about the sample rate converter inside CoolEdit?

CD


--

  #13   Report Post  
Posted to rec.audio.high-end
Denis Sbragion
 
Posts: n/a
Default Dithering vs resampling?

Hello Dick,

wrote in :

....
Regardless, I would hardly hold up CoolEdit as a model of
correct implementation of sample rate conversion. Every single

....

despite it being a "prosumer" product the software SRC implemented into
CoolEdit/Audition has performances close to the theoretical limits. Even
some competitors agree on this:

http://www.bias-
inc.com/products/peakPro5/resampling/peakResamplingWhitePaper.pdf

To my surprise the sample rate converters included into many professional
DAW softwares don't reach the accuracy of the much cheaper CoolEdit.

Don't know why CoolEdit prevents dithering when resampling between 24 bits
streams. May be the original author of the software simply decided it isn't
worth the effort, and I'm sure you will agree that there's little chance
that a truncation to 24 bit will ever be audible in any practical
situation. BTW I completely agree that at least in theory it's needed.

Bye,

--
Denis Sbragion
InfoTecna
Tel: +39 0362 805396, Fax: +39 0362 805404
URL: http://www.infotecna.it


--

  #14   Report Post  
Posted to rec.audio.high-end
Steven Sullivan
 
Posts: n/a
Default Dithering vs resampling?

Denis Sbragion wrote:
Hello Dick,


wrote in :


...
Regardless, I would hardly hold up CoolEdit as a model of
correct implementation of sample rate conversion. Every single

...


despite it being a "prosumer" product the software SRC implemented into
CoolEdit/Audition has performances close to the theoretical limits. Even
some competitors agree on this:


http://www.bias-
inc.com/products/peakPro5/resampling/peakResamplingWhitePaper.pdf


To my surprise the sample rate converters included into many professional
DAW softwares don't reach the accuracy of the much cheaper CoolEdit.


Don't know why CoolEdit prevents dithering when resampling between 24 bits
streams. May be the original author of the software simply decided it isn't
worth the effort, and I'm sure you will agree that there's little chance
that a truncation to 24 bit will ever be audible in any practical
situation. BTW I completely agree that at least in theory it's needed.


Bye,


FWIW, the latter day version of Cool Edit, Adobe Audition (at least the version I have --
1.0) offers 8, 16, and 32-bit resolution, but not 24 bit.



--

  #15   Report Post  
Posted to rec.audio.high-end
 
Posts: n/a
Default Dithering vs resampling?

That's right. I have CoolEdit 2000 version 1.1. It also records in
8,16,and 32 bit. The soundcard, however, only delivers 24 bits of
musical data to it, hence my saying I record 24 bit.


CD


--



  #16   Report Post  
Posted to rec.audio.high-end
Norbert Hahn
 
Posts: n/a
Default Dithering vs resampling?

On 27 Apr 2006 23:58:46 GMT, Steven Sullivan wrote:

Denis Sbragion wrote:


Don't know why CoolEdit prevents dithering when resampling between 24 bits
streams. May be the original author of the software simply decided it isn't
worth the effort, and I'm sure you will agree that there's little chance
that a truncation to 24 bit will ever be audible in any practical
situation. BTW I completely agree that at least in theory it's needed.


If I'm not mistaken, CE uses floating point numbers for storing
intermediate data, hence no need for dithering.

FWIW, the latter day version of Cool Edit, Adobe Audition (at least the version I have --
1.0) offers 8, 16, and 32-bit resolution, but not 24 bit.


You're right that CE and AA does not offer 24 bit in the menu you
reach by "Edit" - "Convert sample type...". It does offer 24 bit
when saving data to wave and to aiff format. Maybe saving to other
storage formats will support 24 bit there, but I don't use them.
Input from soundcards uses 8, 16, and 24 bits. Output as well but
you can choose dithering when decimating is needed.

Norbert


--

  #17   Report Post  
Posted to rec.audio.high-end
Denis Sbragion
 
Posts: n/a
Default Dithering vs resampling?

Hello Norbert,

Norbert Hahn wrote in
:

If I'm not mistaken, CE uses floating point numbers for storing
intermediate data, hence no need for dithering.

....
Input from soundcards uses 8, 16, and 24 bits. Output as well but
you can choose dithering when decimating is needed.


yep, you're right. So now everything makes sense, and it looks like CE is
doing everything the right way, applying dithering whenever it's needed. It
really looks like this tool has been developed by someone knowing what he
was doing.

Bye,

--
Denis Sbragion
InfoTecna
Tel: +39 0362 805396, Fax: +39 0362 805404
URL: http://www.infotecna.it


--

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resample and dither or dither and resample? Michael Hansen Pro Audio 69 March 9th 05 11:22 PM
Q: Hardware v. software resampling David Petrou Pro Audio 1 June 12th 04 08:18 AM
Wavelab 4.0 dithering Jerry Gerber Pro Audio 3 May 6th 04 12:45 AM
Dithering Digital Audio Karl Uppiano High End Audio 12 December 30th 03 04:12 AM
a question about dithering Arny Krueger Pro Audio 3 September 9th 03 05:25 PM


All times are GMT +1. The time now is 11:01 PM.

Powered by: vBulletin
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 AudioBanter.com.
The comments are property of their posters.
 

About Us

"It's about Audio and hi-fi"