View Full Version : The order of operations: normalize and resample
Leonid Makarovsky
November 16th 04, 01:05 AM
I need to resample 44.1kHz to 48kHz and normalize. The question is what should
I do first normalization or resampling? Does the order really matter?
--Leonid
Bob Olhsson
November 16th 04, 05:50 AM
"Leonid Makarovsky" > wrote in message
...
> I need to resample 44.1kHz to 48kHz and normalize. The question is what
should
> I do first normalization or resampling? Does the order really matter?
Ripple in the resampling filter can distort so if anything, it's desirable
to reduce the level before resampling.
I'm not a fan of normalizing because it buys you nothing but lost resolution
in all but extreme cases where the D to A is really dirty. The whole concept
is a leftover from the 8 bit sampling keyboard era when it could be useful.
--
Bob Olhsson Audio Mastery, Nashville TN
Mastering, Audio for Picture, Mix Evaluation and Quality Control
Over 40 years making people sound better than they ever imagined!
615.385.8051 http://www.hyperback.com
Bob Olhsson
November 16th 04, 05:50 AM
"Leonid Makarovsky" > wrote in message
...
> I need to resample 44.1kHz to 48kHz and normalize. The question is what
should
> I do first normalization or resampling? Does the order really matter?
Ripple in the resampling filter can distort so if anything, it's desirable
to reduce the level before resampling.
I'm not a fan of normalizing because it buys you nothing but lost resolution
in all but extreme cases where the D to A is really dirty. The whole concept
is a leftover from the 8 bit sampling keyboard era when it could be useful.
--
Bob Olhsson Audio Mastery, Nashville TN
Mastering, Audio for Picture, Mix Evaluation and Quality Control
Over 40 years making people sound better than they ever imagined!
615.385.8051 http://www.hyperback.com
Arny Krueger
November 16th 04, 12:55 PM
"Leonid Makarovsky" > wrote in message
> I need to resample 44.1kHz to 48kHz and normalize.
You don't say what level you plan to normalize to. Here's some friendly
advice: It is not a good idea to normalize to 0 dB. Instead normalize to a
slightly lower level, -1 dB or at most -0.5 dB. The reason is that
converters, particularly cheap ones, can lose a lot of linearity in that
last dB before full scale.
By normalizing to a slightly lower level than FS, you may avoid some nasty
bursts of distortion that some equipment makes when it clips at slightly
lower levels than you may naively expect. At worst, -1 dB is a barely
audible increment lower than FS, but it can sound a lot better if you avoid
problems with your listener's playback equipment.
> The question is what should I do first normalization or resampling?
Resampling generally includes digital filtering, and digital filters are
among those processing steps that can get dirty in that last dB before full
scale. Resampling done poorly can also cause a loss of dynamic range.
However, if you start out with reasonable levels, say within 10 dB of FS,
the slight dynamic range loss in most resampling steps is a small nit.
>Does the order really matter?
Under reasonable situations, no.
Finally, normalizing is itself a potentially problematical process, as
described in these references:
http://www.cquest.utoronto.ca/psych/psy280f/ch10/
http://www.auditory.org/mhonarc/2004/msg00660.html
If you are normalizing to equalize the perceived loudness of tracks on a
collection of songs, you may not accomplish your goal. The human perception
of loudness is based on a complex, interacting set of parameters. Your best
bet may be to simply adjust levels so that you perceive that the loudness of
the songs flows in an agreeable way, rather than blindly normalizing and
hoping for the best.
There are tools that attempt to correct for a number of the well-known
psychoacoustic effects that affect our perception of loudness. They are
better tools to use for this purpose than normalizing.
Here is one such tool:
http://homepage.ntlworld.com/jfe1205/Others/WaveGainManual.htm
and an easier-to-use front end for it:
http://members.home.nl/w.speek/wavegain.htm
Arny Krueger
November 16th 04, 12:55 PM
"Leonid Makarovsky" > wrote in message
> I need to resample 44.1kHz to 48kHz and normalize.
You don't say what level you plan to normalize to. Here's some friendly
advice: It is not a good idea to normalize to 0 dB. Instead normalize to a
slightly lower level, -1 dB or at most -0.5 dB. The reason is that
converters, particularly cheap ones, can lose a lot of linearity in that
last dB before full scale.
By normalizing to a slightly lower level than FS, you may avoid some nasty
bursts of distortion that some equipment makes when it clips at slightly
lower levels than you may naively expect. At worst, -1 dB is a barely
audible increment lower than FS, but it can sound a lot better if you avoid
problems with your listener's playback equipment.
> The question is what should I do first normalization or resampling?
Resampling generally includes digital filtering, and digital filters are
among those processing steps that can get dirty in that last dB before full
scale. Resampling done poorly can also cause a loss of dynamic range.
However, if you start out with reasonable levels, say within 10 dB of FS,
the slight dynamic range loss in most resampling steps is a small nit.
>Does the order really matter?
Under reasonable situations, no.
Finally, normalizing is itself a potentially problematical process, as
described in these references:
http://www.cquest.utoronto.ca/psych/psy280f/ch10/
http://www.auditory.org/mhonarc/2004/msg00660.html
If you are normalizing to equalize the perceived loudness of tracks on a
collection of songs, you may not accomplish your goal. The human perception
of loudness is based on a complex, interacting set of parameters. Your best
bet may be to simply adjust levels so that you perceive that the loudness of
the songs flows in an agreeable way, rather than blindly normalizing and
hoping for the best.
There are tools that attempt to correct for a number of the well-known
psychoacoustic effects that affect our perception of loudness. They are
better tools to use for this purpose than normalizing.
Here is one such tool:
http://homepage.ntlworld.com/jfe1205/Others/WaveGainManual.htm
and an easier-to-use front end for it:
http://members.home.nl/w.speek/wavegain.htm
Leonid Makarovsky
November 16th 04, 03:43 PM
Arny Krueger > wrote:
:> I need to resample 44.1kHz to 48kHz and normalize.
: You don't say what level you plan to normalize to. Here's some friendly
: advice: It is not a good idea to normalize to 0 dB. Instead normalize to a
: slightly lower level, -1 dB or at most -0.5 dB. The reason is that
: converters, particularly cheap ones, can lose a lot of linearity in that
: last dB before full scale.
I was going to normalize it to actually 0db. I was going to put 44.1kHz on CD
as an audio track and 48kHz to DVD video. (I recorded a footage from a
LaserDisc transferring sound digitally at 44.1kHz).
: By normalizing to a slightly lower level than FS, you may avoid some nasty
: bursts of distortion that some equipment makes when it clips at slightly
: lower levels than you may naively expect. At worst, -1 dB is a barely
: audible increment lower than FS, but it can sound a lot better if you avoid
: problems with your listener's playback equipment.
I see. I wish I knew it in the past.... In the past I was normalizing up to 0db
using Peak (NOT RMS).
: Resampling generally includes digital filtering, and digital filters are
: among those processing steps that can get dirty in that last dB before full
: scale. Resampling done poorly can also cause a loss of dynamic range.
: However, if you start out with reasonable levels, say within 10 dB of FS,
: the slight dynamic range loss in most resampling steps is a small nit.
I use SSRC tool for resampling. I always use 2 pass filtering.
: If you are normalizing to equalize the perceived loudness of tracks on a
: collection of songs, you may not accomplish your goal. The human perception
: of loudness is based on a complex, interacting set of parameters. Your best
: bet may be to simply adjust levels so that you perceive that the loudness of
: the songs flows in an agreeable way, rather than blindly normalizing and
: hoping for the best.
I'll read the articles. I always thought normalization is just increasing the
volume to a certain level.
Thanks.
--Leonid
Leonid Makarovsky
November 16th 04, 03:43 PM
Arny Krueger > wrote:
:> I need to resample 44.1kHz to 48kHz and normalize.
: You don't say what level you plan to normalize to. Here's some friendly
: advice: It is not a good idea to normalize to 0 dB. Instead normalize to a
: slightly lower level, -1 dB or at most -0.5 dB. The reason is that
: converters, particularly cheap ones, can lose a lot of linearity in that
: last dB before full scale.
I was going to normalize it to actually 0db. I was going to put 44.1kHz on CD
as an audio track and 48kHz to DVD video. (I recorded a footage from a
LaserDisc transferring sound digitally at 44.1kHz).
: By normalizing to a slightly lower level than FS, you may avoid some nasty
: bursts of distortion that some equipment makes when it clips at slightly
: lower levels than you may naively expect. At worst, -1 dB is a barely
: audible increment lower than FS, but it can sound a lot better if you avoid
: problems with your listener's playback equipment.
I see. I wish I knew it in the past.... In the past I was normalizing up to 0db
using Peak (NOT RMS).
: Resampling generally includes digital filtering, and digital filters are
: among those processing steps that can get dirty in that last dB before full
: scale. Resampling done poorly can also cause a loss of dynamic range.
: However, if you start out with reasonable levels, say within 10 dB of FS,
: the slight dynamic range loss in most resampling steps is a small nit.
I use SSRC tool for resampling. I always use 2 pass filtering.
: If you are normalizing to equalize the perceived loudness of tracks on a
: collection of songs, you may not accomplish your goal. The human perception
: of loudness is based on a complex, interacting set of parameters. Your best
: bet may be to simply adjust levels so that you perceive that the loudness of
: the songs flows in an agreeable way, rather than blindly normalizing and
: hoping for the best.
I'll read the articles. I always thought normalization is just increasing the
volume to a certain level.
Thanks.
--Leonid
S O'Neill
November 16th 04, 05:42 PM
Leonid Makarovsky wrote:
> I'll read the articles. I always thought normalization is just increasing the
> volume to a certain level.
That's exactly what it is. But you can increase the _perceived_ level
beyond what maximum (0dBFS or -1 dBFS or whatever) normalization sounds
like by using compression to increase the average power while keeping
the peak (what normalization adjusts) the same.
S O'Neill
November 16th 04, 05:42 PM
Leonid Makarovsky wrote:
> I'll read the articles. I always thought normalization is just increasing the
> volume to a certain level.
That's exactly what it is. But you can increase the _perceived_ level
beyond what maximum (0dBFS or -1 dBFS or whatever) normalization sounds
like by using compression to increase the average power while keeping
the peak (what normalization adjusts) the same.
Leonid Makarovsky
November 16th 04, 07:36 PM
S O'Neill > wrote:
: That's exactly what it is. But you can increase the _perceived_ level
: beyond what maximum (0dBFS or -1 dBFS or whatever) normalization sounds
: like by using compression to increase the average power while keeping
: the peak (what normalization adjusts) the same.
Ok suppose I just normalize up to 0db using peak leavel. Say my maximum peak
was -6db and I normalized the whole thing from 6db to 0db. Wouldn't it have the
same effect as if I did not normalize, but turned the volume handle of my
amplifier 6db up?
--Leonid
Leonid Makarovsky
November 16th 04, 07:36 PM
S O'Neill > wrote:
: That's exactly what it is. But you can increase the _perceived_ level
: beyond what maximum (0dBFS or -1 dBFS or whatever) normalization sounds
: like by using compression to increase the average power while keeping
: the peak (what normalization adjusts) the same.
Ok suppose I just normalize up to 0db using peak leavel. Say my maximum peak
was -6db and I normalized the whole thing from 6db to 0db. Wouldn't it have the
same effect as if I did not normalize, but turned the volume handle of my
amplifier 6db up?
--Leonid
Scott Dorsey
November 16th 04, 07:54 PM
Leonid Makarovsky > wrote:
>S O'Neill > wrote:
>: That's exactly what it is. But you can increase the _perceived_ level
>: beyond what maximum (0dBFS or -1 dBFS or whatever) normalization sounds
>: like by using compression to increase the average power while keeping
>: the peak (what normalization adjusts) the same.
>
>Ok suppose I just normalize up to 0db using peak leavel. Say my maximum peak
>was -6db and I normalized the whole thing from 6db to 0db. Wouldn't it have the
>same effect as if I did not normalize, but turned the volume handle of my
>amplifier 6db up?
Yes. And for a 6 dB increase all you need to do is a right shift, so there
is no loss of precision.
But for any other level changes that are NOT powers of two, there will be
some rounding error introduced with the multiplication, and that is what folks
are trying to avoid.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Scott Dorsey
November 16th 04, 07:54 PM
Leonid Makarovsky > wrote:
>S O'Neill > wrote:
>: That's exactly what it is. But you can increase the _perceived_ level
>: beyond what maximum (0dBFS or -1 dBFS or whatever) normalization sounds
>: like by using compression to increase the average power while keeping
>: the peak (what normalization adjusts) the same.
>
>Ok suppose I just normalize up to 0db using peak leavel. Say my maximum peak
>was -6db and I normalized the whole thing from 6db to 0db. Wouldn't it have the
>same effect as if I did not normalize, but turned the volume handle of my
>amplifier 6db up?
Yes. And for a 6 dB increase all you need to do is a right shift, so there
is no loss of precision.
But for any other level changes that are NOT powers of two, there will be
some rounding error introduced with the multiplication, and that is what folks
are trying to avoid.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Arny Krueger
November 16th 04, 08:10 PM
"Scott Dorsey" > wrote in message
> Leonid Makarovsky > wrote:
>> S O'Neill > wrote:
>>> That's exactly what it is. But you can increase the _perceived_
>>> level beyond what maximum (0dBFS or -1 dBFS or whatever)
>>> normalization sounds like by using compression to increase the
>>> average power while keeping the peak (what normalization adjusts)
>>> the same.
>>
>> Ok suppose I just normalize up to 0db using peak leavel. Say my
>> maximum peak was -6db and I normalized the whole thing from 6db to
>> 0db. Wouldn't it have the same effect as if I did not normalize, but
>> turned the volume handle of my amplifier 6db up?
>
> Yes. And for a 6 dB increase all you need to do is a right shift, so
> there is no loss of precision.
Trouble is, with a pure right shift there is also a loss of dithering of the
LSB.
> But for any other level changes that are NOT powers of two, there
> will be some rounding error introduced with the multiplication, and
> that is what folks are trying to avoid.
I know not why someone would avoid having a properly-dithered waveform.
Arny Krueger
November 16th 04, 08:10 PM
"Scott Dorsey" > wrote in message
> Leonid Makarovsky > wrote:
>> S O'Neill > wrote:
>>> That's exactly what it is. But you can increase the _perceived_
>>> level beyond what maximum (0dBFS or -1 dBFS or whatever)
>>> normalization sounds like by using compression to increase the
>>> average power while keeping the peak (what normalization adjusts)
>>> the same.
>>
>> Ok suppose I just normalize up to 0db using peak leavel. Say my
>> maximum peak was -6db and I normalized the whole thing from 6db to
>> 0db. Wouldn't it have the same effect as if I did not normalize, but
>> turned the volume handle of my amplifier 6db up?
>
> Yes. And for a 6 dB increase all you need to do is a right shift, so
> there is no loss of precision.
Trouble is, with a pure right shift there is also a loss of dithering of the
LSB.
> But for any other level changes that are NOT powers of two, there
> will be some rounding error introduced with the multiplication, and
> that is what folks are trying to avoid.
I know not why someone would avoid having a properly-dithered waveform.
Chris Hornbeck
November 16th 04, 10:01 PM
On Tue, 16 Nov 2004 15:10:53 -0500, "Arny Krueger" >
wrote:
>> Yes. And for a 6 dB increase all you need to do is a right shift, so
>> there is no loss of precision.
>
>Trouble is, with a pure right shift there is also a loss of dithering of the
>LSB.
Is this literally true?
Chris Hornbeck
Chris Hornbeck
November 16th 04, 10:01 PM
On Tue, 16 Nov 2004 15:10:53 -0500, "Arny Krueger" >
wrote:
>> Yes. And for a 6 dB increase all you need to do is a right shift, so
>> there is no loss of precision.
>
>Trouble is, with a pure right shift there is also a loss of dithering of the
>LSB.
Is this literally true?
Chris Hornbeck
Mike Rivers
November 16th 04, 11:06 PM
In article > writes:
> Ok suppose I just normalize up to 0db using peak leavel. Say my maximum peak
> was -6db and I normalized the whole thing from 6db to 0db. Wouldn't it have the
> same effect as if I did not normalize, but turned the volume handle of my
> amplifier 6db up?
Yes, exactly.
Well, almost exactly. It's possible when normalizing the highest
amplitude sample to full scale to have the actual reconstructed analog
signal exceed the full scale amplitude between two adjacent high
amplitude samples. This can cause distortion in some D/A converters
and can exceed the headroom of marginally designed output stages - but
not by much. I only said that for the nit-pickers.
The reason to normalize is because the average listener is too lazy to
reach over (or get up) and turn up the volume. And on a lot of those
portable players that people use today, it's damn inconvenient to
adjust the volume because you don't have a knob, you have up/down
buttons.
--
I'm really Mike Rivers )
However, until the spam goes away or Hell freezes over,
lots of IP addresses are blocked from this system. If
you e-mail me and it bounces, use your secret decoder ring
and reach me here: double-m-eleven-double-zero at yahoo
Mike Rivers
November 16th 04, 11:06 PM
In article > writes:
> Ok suppose I just normalize up to 0db using peak leavel. Say my maximum peak
> was -6db and I normalized the whole thing from 6db to 0db. Wouldn't it have the
> same effect as if I did not normalize, but turned the volume handle of my
> amplifier 6db up?
Yes, exactly.
Well, almost exactly. It's possible when normalizing the highest
amplitude sample to full scale to have the actual reconstructed analog
signal exceed the full scale amplitude between two adjacent high
amplitude samples. This can cause distortion in some D/A converters
and can exceed the headroom of marginally designed output stages - but
not by much. I only said that for the nit-pickers.
The reason to normalize is because the average listener is too lazy to
reach over (or get up) and turn up the volume. And on a lot of those
portable players that people use today, it's damn inconvenient to
adjust the volume because you don't have a knob, you have up/down
buttons.
--
I'm really Mike Rivers )
However, until the spam goes away or Hell freezes over,
lots of IP addresses are blocked from this system. If
you e-mail me and it bounces, use your secret decoder ring
and reach me here: double-m-eleven-double-zero at yahoo
Arny Krueger
November 16th 04, 11:34 PM
"Chris Hornbeck" > wrote in message
> On Tue, 16 Nov 2004 15:10:53 -0500, "Arny Krueger" >
> wrote:
>
>>> Yes. And for a 6 dB increase all you need to do is a right shift,
>>> so there is no loss of precision.
>>
>> Trouble is, with a pure right shift there is also a loss of
>> dithering of the LSB.
>
> Is this literally true?
Sure, the quantization error doubles.
Arny Krueger
November 16th 04, 11:34 PM
"Chris Hornbeck" > wrote in message
> On Tue, 16 Nov 2004 15:10:53 -0500, "Arny Krueger" >
> wrote:
>
>>> Yes. And for a 6 dB increase all you need to do is a right shift,
>>> so there is no loss of precision.
>>
>> Trouble is, with a pure right shift there is also a loss of
>> dithering of the LSB.
>
> Is this literally true?
Sure, the quantization error doubles.
S O'Neill
November 17th 04, 01:53 AM
Arny Krueger wrote:
> "Chris Hornbeck" > wrote in message
>
>
>>On Tue, 16 Nov 2004 15:10:53 -0500, "Arny Krueger" >
>>wrote:
>>
>>
>>>>Yes. And for a 6 dB increase all you need to do is a right shift,
>>>>so there is no loss of precision.
>>>
>>>Trouble is, with a pure right shift there is also a loss of
>>>dithering of the LSB.
>>
>>Is this literally true?
>
>
> Sure, the quantization error doubles.
Before this goes too far, a 6 dB increase would actually be a *left*
shift; a new zero appears on the right (lsb). It may be advantageous to
dither that; ie, sometimes shift in a 1 instead.
S O'Neill
November 17th 04, 01:53 AM
Arny Krueger wrote:
> "Chris Hornbeck" > wrote in message
>
>
>>On Tue, 16 Nov 2004 15:10:53 -0500, "Arny Krueger" >
>>wrote:
>>
>>
>>>>Yes. And for a 6 dB increase all you need to do is a right shift,
>>>>so there is no loss of precision.
>>>
>>>Trouble is, with a pure right shift there is also a loss of
>>>dithering of the LSB.
>>
>>Is this literally true?
>
>
> Sure, the quantization error doubles.
Before this goes too far, a 6 dB increase would actually be a *left*
shift; a new zero appears on the right (lsb). It may be advantageous to
dither that; ie, sometimes shift in a 1 instead.
Arny Krueger
November 17th 04, 03:09 AM
"S O'Neill" > wrote in message
> Arny Krueger wrote:
>> "Chris Hornbeck" > wrote in message
>>
>>
>>> On Tue, 16 Nov 2004 15:10:53 -0500, "Arny Krueger"
>>> > wrote:
>>>
>>>
>>>>> Yes. And for a 6 dB increase all you need to do is a right shift,
>>>>> so there is no loss of precision.
>>>>
>>>> Trouble is, with a pure right shift there is also a loss of
>>>> dithering of the LSB.
>>>
>>> Is this literally true?
>> Sure, the quantization error doubles.
> Before this goes too far, a 6 dB increase would actually be a *left*
> shift; a new zero appears on the right (lsb).
I guess I read what he meant, not what he wrote.
>It may be advantageous
> to dither that; ie, sometimes shift in a 1 instead.
Exactly. The problem is that the binary represenation of an analog voltage
is rarely exact. There is almost always quantization error. When you double
the data by means of simple shifting, you also double the quantization
error.
Arny Krueger
November 17th 04, 03:09 AM
"S O'Neill" > wrote in message
> Arny Krueger wrote:
>> "Chris Hornbeck" > wrote in message
>>
>>
>>> On Tue, 16 Nov 2004 15:10:53 -0500, "Arny Krueger"
>>> > wrote:
>>>
>>>
>>>>> Yes. And for a 6 dB increase all you need to do is a right shift,
>>>>> so there is no loss of precision.
>>>>
>>>> Trouble is, with a pure right shift there is also a loss of
>>>> dithering of the LSB.
>>>
>>> Is this literally true?
>> Sure, the quantization error doubles.
> Before this goes too far, a 6 dB increase would actually be a *left*
> shift; a new zero appears on the right (lsb).
I guess I read what he meant, not what he wrote.
>It may be advantageous
> to dither that; ie, sometimes shift in a 1 instead.
Exactly. The problem is that the binary represenation of an analog voltage
is rarely exact. There is almost always quantization error. When you double
the data by means of simple shifting, you also double the quantization
error.
Leonid Makarovsky
November 17th 04, 04:02 AM
Scott Dorsey > wrote:
: But for any other level changes that are NOT powers of two, there will be
: some rounding error introduced with the multiplication, and that is what folks
: are trying to avoid.
Is 6 powers of 2? Did you mean the odd numbers would introduce rounding error?
Say if I went from -5db to 0db, I would've had a problem? Well, I guess I was
going from any negative # to 0db. I wish I knew better.
--Leonid
Leonid Makarovsky
November 17th 04, 04:02 AM
Scott Dorsey > wrote:
: But for any other level changes that are NOT powers of two, there will be
: some rounding error introduced with the multiplication, and that is what folks
: are trying to avoid.
Is 6 powers of 2? Did you mean the odd numbers would introduce rounding error?
Say if I went from -5db to 0db, I would've had a problem? Well, I guess I was
going from any negative # to 0db. I wish I knew better.
--Leonid
S O'Neill
November 17th 04, 05:06 AM
Leonid Makarovsky wrote:
> Scott Dorsey > wrote:
> : But for any other level changes that are NOT powers of two, there will be
> : some rounding error introduced with the multiplication, and that is what folks
> : are trying to avoid.
>
> Is 6 powers of 2? Did you mean the odd numbers would introduce rounding error?
> Say if I went from -5db to 0db, I would've had a problem? Well, I guess I was
> going from any negative # to 0db. I wish I knew better.
No, he's translating 6 dB into "double the voltage", the same way that
12 dB is four times the voltage (two bits).
S O'Neill
November 17th 04, 05:06 AM
Leonid Makarovsky wrote:
> Scott Dorsey > wrote:
> : But for any other level changes that are NOT powers of two, there will be
> : some rounding error introduced with the multiplication, and that is what folks
> : are trying to avoid.
>
> Is 6 powers of 2? Did you mean the odd numbers would introduce rounding error?
> Say if I went from -5db to 0db, I would've had a problem? Well, I guess I was
> going from any negative # to 0db. I wish I knew better.
No, he's translating 6 dB into "double the voltage", the same way that
12 dB is four times the voltage (two bits).
Ben Bradley
November 17th 04, 05:10 AM
On 17 Nov 2004 04:02:46 GMT, Leonid Makarovsky >
wrote:
>Scott Dorsey > wrote:
>: But for any other level changes that are NOT powers of two, there will be
>: some rounding error introduced with the multiplication, and that is what folks
>: are trying to avoid.
>
>Is 6 powers of 2? Did you mean the odd numbers would introduce rounding error?
>Say if I went from -5db to 0db, I would've had a problem? Well, I guess I was
>going from any negative # to 0db. I wish I knew better.
To make things even more convolutated, an exact doubling or halving
of signal level caused by a 1-bit shift is actually 6.0206 dB (and
that's only five significant figures), not quite 6dB. So basically,
any gain change does "damage" and will need dither noise added before
doing it to get it right (though your DAW software may already do that
as part of changing gain).
>
>--Leonid
-----
http://mindspring.com/~benbradley
Ben Bradley
November 17th 04, 05:10 AM
On 17 Nov 2004 04:02:46 GMT, Leonid Makarovsky >
wrote:
>Scott Dorsey > wrote:
>: But for any other level changes that are NOT powers of two, there will be
>: some rounding error introduced with the multiplication, and that is what folks
>: are trying to avoid.
>
>Is 6 powers of 2? Did you mean the odd numbers would introduce rounding error?
>Say if I went from -5db to 0db, I would've had a problem? Well, I guess I was
>going from any negative # to 0db. I wish I knew better.
To make things even more convolutated, an exact doubling or halving
of signal level caused by a 1-bit shift is actually 6.0206 dB (and
that's only five significant figures), not quite 6dB. So basically,
any gain change does "damage" and will need dither noise added before
doing it to get it right (though your DAW software may already do that
as part of changing gain).
>
>--Leonid
-----
http://mindspring.com/~benbradley
Chris Hornbeck
November 17th 04, 05:35 AM
On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger" >
wrote:
>>It may be advantageous
>> to dither that; ie, sometimes shift in a 1 instead.
>
>Exactly. The problem is that the binary represenation of an analog voltage
>is rarely exact. There is almost always quantization error. When you double
>the data by means of simple shifting, you also double the quantization
>error.
OK, but how about in a theoretical, ideal case that's properly
dithered and has no quantization error. Does a shift cause any
quantization error?
My line of thinking is that the same data bits are surrounded
by infinite zeros in each direction, so the information
hasn't changed in the shift.
Of course, my limited math has gotten me into plenty of trouble
plenty of times. Maybe Bob Cain could weigh in from a heavy
math POV....
Thanks,
Chris Hornbeck
Chris Hornbeck
November 17th 04, 05:35 AM
On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger" >
wrote:
>>It may be advantageous
>> to dither that; ie, sometimes shift in a 1 instead.
>
>Exactly. The problem is that the binary represenation of an analog voltage
>is rarely exact. There is almost always quantization error. When you double
>the data by means of simple shifting, you also double the quantization
>error.
OK, but how about in a theoretical, ideal case that's properly
dithered and has no quantization error. Does a shift cause any
quantization error?
My line of thinking is that the same data bits are surrounded
by infinite zeros in each direction, so the information
hasn't changed in the shift.
Of course, my limited math has gotten me into plenty of trouble
plenty of times. Maybe Bob Cain could weigh in from a heavy
math POV....
Thanks,
Chris Hornbeck
Logan Shaw
November 17th 04, 06:23 AM
Scott Dorsey wrote
> Yes. And for a 6 dB increase all you need to do is a right shift, so there
> is no loss of precision.
Well, as others have said cross-thread, it would actually be a
left shift. (Unless you are recording in Hebrew.)
> But for any other level changes that are NOT powers of two, there will be
> some rounding error introduced with the multiplication, and that is what folks
> are trying to avoid.
Well, Scott normally has things pretty well nailed down technically,
but in this case I'm going to have to disagree.
In reality, it's not necessary to multiply by a power of two. All that's
necessary[1] for scaling without losing information (changing the sound)
is to multiply by a positive integer that's small enough that you do not
overflow[2]. For example, if you have 8-bit signed integers and your
sample data ranges from -40 to +41, then you can multiply each sample
by 3 and not lose data. If you did so, you'd translate the set of
values { -40, -39, ..., 0, 1, 2, ... 41 } into the set
{ -120, -117, ..., 0, 3, 6, ... 123 }. No information will have
been lost to round-off error in this process.
However, in the real world, probably no software gives you the option
of multiplying by an integer constant, and there would be limited
utility in doing so anyway, unless the levels are really pretty
darned low and you don't care about your final levels.
The best thing to do, mathematically, is to either do dithering
and gain adjustment as a single combined final step, or to do
gain adjustment at some point before you dither down to a lower
sample size.
- Logan
[1] For the general case, where you have no prior knowledge of
what the samples look like, that is. If you happen to know
all your samples' values are multiples of 3, then you could
multiply by 5/3 and not lose information. Of course, this
is EXCEEDINGLY unlikely to ever happen with real audio
information.
[2] This is, as someone else noted, dependent on the assumption
that the D/A convertor is linear. But, even changing volume
by left-shift is dependent on that!
Logan Shaw
November 17th 04, 06:23 AM
Scott Dorsey wrote
> Yes. And for a 6 dB increase all you need to do is a right shift, so there
> is no loss of precision.
Well, as others have said cross-thread, it would actually be a
left shift. (Unless you are recording in Hebrew.)
> But for any other level changes that are NOT powers of two, there will be
> some rounding error introduced with the multiplication, and that is what folks
> are trying to avoid.
Well, Scott normally has things pretty well nailed down technically,
but in this case I'm going to have to disagree.
In reality, it's not necessary to multiply by a power of two. All that's
necessary[1] for scaling without losing information (changing the sound)
is to multiply by a positive integer that's small enough that you do not
overflow[2]. For example, if you have 8-bit signed integers and your
sample data ranges from -40 to +41, then you can multiply each sample
by 3 and not lose data. If you did so, you'd translate the set of
values { -40, -39, ..., 0, 1, 2, ... 41 } into the set
{ -120, -117, ..., 0, 3, 6, ... 123 }. No information will have
been lost to round-off error in this process.
However, in the real world, probably no software gives you the option
of multiplying by an integer constant, and there would be limited
utility in doing so anyway, unless the levels are really pretty
darned low and you don't care about your final levels.
The best thing to do, mathematically, is to either do dithering
and gain adjustment as a single combined final step, or to do
gain adjustment at some point before you dither down to a lower
sample size.
- Logan
[1] For the general case, where you have no prior knowledge of
what the samples look like, that is. If you happen to know
all your samples' values are multiples of 3, then you could
multiply by 5/3 and not lose information. Of course, this
is EXCEEDINGLY unlikely to ever happen with real audio
information.
[2] This is, as someone else noted, dependent on the assumption
that the D/A convertor is linear. But, even changing volume
by left-shift is dependent on that!
Bob Cain
November 17th 04, 09:10 AM
Chris Hornbeck wrote:
> On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger" >
> wrote:
>
>
>>>It may be advantageous
>>>to dither that; ie, sometimes shift in a 1 instead.
>>
>>Exactly. The problem is that the binary represenation of an analog voltage
>>is rarely exact. There is almost always quantization error. When you double
>>the data by means of simple shifting, you also double the quantization
>>error.
>
>
> OK, but how about in a theoretical, ideal case that's properly
> dithered and has no quantization error. Does a shift cause any
> quantization error?
A doubling by a left shift leaves the SNR unchanged. Both
the signal and the quantization noise are doubled.
Randomizing the low order bit rather than leaving it zero
would seem to decrease the SNR. Too lazy to work out by how
much, though.
> My line of thinking is that the same data bits are surrounded
> by infinite zeros in each direction, so the information
> hasn't changed in the shift.
Correct.
> Of course, my limited math has gotten me into plenty of trouble
> plenty of times. Maybe Bob Cain could weigh in from a heavy
> math POV....
Heavy enough? :-)
Bob
--
"Things should be described as simply as possible, but no
simpler."
A. Einstein
Bob Cain
November 17th 04, 09:10 AM
Chris Hornbeck wrote:
> On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger" >
> wrote:
>
>
>>>It may be advantageous
>>>to dither that; ie, sometimes shift in a 1 instead.
>>
>>Exactly. The problem is that the binary represenation of an analog voltage
>>is rarely exact. There is almost always quantization error. When you double
>>the data by means of simple shifting, you also double the quantization
>>error.
>
>
> OK, but how about in a theoretical, ideal case that's properly
> dithered and has no quantization error. Does a shift cause any
> quantization error?
A doubling by a left shift leaves the SNR unchanged. Both
the signal and the quantization noise are doubled.
Randomizing the low order bit rather than leaving it zero
would seem to decrease the SNR. Too lazy to work out by how
much, though.
> My line of thinking is that the same data bits are surrounded
> by infinite zeros in each direction, so the information
> hasn't changed in the shift.
Correct.
> Of course, my limited math has gotten me into plenty of trouble
> plenty of times. Maybe Bob Cain could weigh in from a heavy
> math POV....
Heavy enough? :-)
Bob
--
"Things should be described as simply as possible, but no
simpler."
A. Einstein
Arny Krueger
November 17th 04, 01:00 PM
"Chris Hornbeck" > wrote in message
> On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger" >
> wrote:
>
>>> It may be advantageous
>>> to dither that; ie, sometimes shift in a 1 instead.
>>
>> Exactly. The problem is that the binary represenation of an analog
>> voltage is rarely exact. There is almost always quantization error.
>> When you double the data by means of simple shifting, you also
>> double the quantization error.
>
> OK, but how about in a theoretical, ideal case that's properly
> dithered and has no quantization error. Does a shift cause any
> quantization error?
The shift does not add or subtract quantization error. Instead, it
multiplies the error that is already there. As was pointed out, the SNR does
not change, but the noise level increases.
Arny Krueger
November 17th 04, 01:00 PM
"Chris Hornbeck" > wrote in message
> On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger" >
> wrote:
>
>>> It may be advantageous
>>> to dither that; ie, sometimes shift in a 1 instead.
>>
>> Exactly. The problem is that the binary represenation of an analog
>> voltage is rarely exact. There is almost always quantization error.
>> When you double the data by means of simple shifting, you also
>> double the quantization error.
>
> OK, but how about in a theoretical, ideal case that's properly
> dithered and has no quantization error. Does a shift cause any
> quantization error?
The shift does not add or subtract quantization error. Instead, it
multiplies the error that is already there. As was pointed out, the SNR does
not change, but the noise level increases.
Scott Dorsey
November 17th 04, 01:51 PM
In article >,
Leonid Makarovsky > wrote:
>Scott Dorsey > wrote:
>: But for any other level changes that are NOT powers of two, there will be
>: some rounding error introduced with the multiplication, and that is what folks
>: are trying to avoid.
>
>Is 6 powers of 2? Did you mean the odd numbers would introduce rounding error?
No. A 6 dB increase is a doubling of level. If you multiply all the elements
in your data file by two, the meters jump 6 dB.
In binary, multiplying by two is just done with shifting, the way in base 10,
multiplying by ten is just done with shifting.
>Say if I went from -5db to 0db, I would've had a problem? Well, I guess I was
>going from any negative # to 0db. I wish I knew better.
Well, the chances that you'll ever want to do anything in precise 6 dB
increments are pretty small.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Scott Dorsey
November 17th 04, 01:51 PM
In article >,
Leonid Makarovsky > wrote:
>Scott Dorsey > wrote:
>: But for any other level changes that are NOT powers of two, there will be
>: some rounding error introduced with the multiplication, and that is what folks
>: are trying to avoid.
>
>Is 6 powers of 2? Did you mean the odd numbers would introduce rounding error?
No. A 6 dB increase is a doubling of level. If you multiply all the elements
in your data file by two, the meters jump 6 dB.
In binary, multiplying by two is just done with shifting, the way in base 10,
multiplying by ten is just done with shifting.
>Say if I went from -5db to 0db, I would've had a problem? Well, I guess I was
>going from any negative # to 0db. I wish I knew better.
Well, the chances that you'll ever want to do anything in precise 6 dB
increments are pretty small.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Leonid Makarovsky
November 17th 04, 03:47 PM
Scott Dorsey > wrote:
: No. A 6 dB increase is a doubling of level. If you multiply all the elements
: in your data file by two, the meters jump 6 dB.
: In binary, multiplying by two is just done with shifting, the way in base 10,
: multiplying by ten is just done with shifting.
Ok. I got it. Thanks. So let me make sure I understand it. When I normalize, I
don't add the volume, but multiply by some number. So it looks more like
Y(x) = n * x rather than Y(x) = x + n
Thanks.
--Leonid
Leonid Makarovsky
November 17th 04, 03:47 PM
Scott Dorsey > wrote:
: No. A 6 dB increase is a doubling of level. If you multiply all the elements
: in your data file by two, the meters jump 6 dB.
: In binary, multiplying by two is just done with shifting, the way in base 10,
: multiplying by ten is just done with shifting.
Ok. I got it. Thanks. So let me make sure I understand it. When I normalize, I
don't add the volume, but multiply by some number. So it looks more like
Y(x) = n * x rather than Y(x) = x + n
Thanks.
--Leonid
Scott Dorsey
November 17th 04, 03:53 PM
In article >,
Leonid Makarovsky > wrote:
>Scott Dorsey > wrote:
>: No. A 6 dB increase is a doubling of level. If you multiply all the elements
>: in your data file by two, the meters jump 6 dB.
>
>: In binary, multiplying by two is just done with shifting, the way in base 10,
>: multiplying by ten is just done with shifting.
>
>Ok. I got it. Thanks. So let me make sure I understand it. When I normalize, I
>don't add the volume, but multiply by some number. So it looks more like
>Y(x) = n * x rather than Y(x) = x + n
Right. If you added, what you would get would be a DC offset.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Scott Dorsey
November 17th 04, 03:53 PM
In article >,
Leonid Makarovsky > wrote:
>Scott Dorsey > wrote:
>: No. A 6 dB increase is a doubling of level. If you multiply all the elements
>: in your data file by two, the meters jump 6 dB.
>
>: In binary, multiplying by two is just done with shifting, the way in base 10,
>: multiplying by ten is just done with shifting.
>
>Ok. I got it. Thanks. So let me make sure I understand it. When I normalize, I
>don't add the volume, but multiply by some number. So it looks more like
>Y(x) = n * x rather than Y(x) = x + n
Right. If you added, what you would get would be a DC offset.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Leonid Makarovsky
November 17th 04, 06:26 PM
Scott Dorsey > wrote:
:>don't add the volume, but multiply by some number. So it looks more like
:>Y(x) = n * x rather than Y(x) = x + n
: Right. If you added, what you would get would be a DC offset.
Then it does make sense to normalize with multiples of 2. Now in SoundForge 5,
how do I make sure I normalize with multiples of 2? I don't even normalize
both channels at the same time. I normalize each channel individually by peak
making sure that the average volume level is about the same.
--Leonid
Leonid Makarovsky
November 17th 04, 06:26 PM
Scott Dorsey > wrote:
:>don't add the volume, but multiply by some number. So it looks more like
:>Y(x) = n * x rather than Y(x) = x + n
: Right. If you added, what you would get would be a DC offset.
Then it does make sense to normalize with multiples of 2. Now in SoundForge 5,
how do I make sure I normalize with multiples of 2? I don't even normalize
both channels at the same time. I normalize each channel individually by peak
making sure that the average volume level is about the same.
--Leonid
Scott Dorsey
November 17th 04, 08:00 PM
Leonid Makarovsky > wrote:
>Scott Dorsey > wrote:
>:>don't add the volume, but multiply by some number. So it looks more like
>:>Y(x) = n * x rather than Y(x) = x + n
>
>: Right. If you added, what you would get would be a DC offset.
>
>Then it does make sense to normalize with multiples of 2. Now in SoundForge 5,
>how do I make sure I normalize with multiples of 2? I don't even normalize
>both channels at the same time. I normalize each channel individually by peak
>making sure that the average volume level is about the same.
You can't. So you have to do the normalizing as late as possible and live'with whatever rounding you get. Life is like that.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Scott Dorsey
November 17th 04, 08:00 PM
Leonid Makarovsky > wrote:
>Scott Dorsey > wrote:
>:>don't add the volume, but multiply by some number. So it looks more like
>:>Y(x) = n * x rather than Y(x) = x + n
>
>: Right. If you added, what you would get would be a DC offset.
>
>Then it does make sense to normalize with multiples of 2. Now in SoundForge 5,
>how do I make sure I normalize with multiples of 2? I don't even normalize
>both channels at the same time. I normalize each channel individually by peak
>making sure that the average volume level is about the same.
You can't. So you have to do the normalizing as late as possible and live'with whatever rounding you get. Life is like that.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Logan Shaw
November 17th 04, 09:20 PM
Leonid Makarovsky wrote:
> Scott Dorsey > wrote:
> :>don't add the volume, but multiply by some number. So it looks more like
> :>Y(x) = n * x rather than Y(x) = x + n
>
> : Right. If you added, what you would get would be a DC offset.
>
> Then it does make sense to normalize with multiples of 2.
Close, except that it actually makes sense to normalize with multiples
of 1 rather than 2 (i.e. positive integers). And except that other
seems to be saying that in the real world, software doesn't support it.
The best plan solution by far is to normalize at some higher sample
size (24-bit or 32-bit) and then convert down to 16-bit later.
- Logan
Logan Shaw
November 17th 04, 09:20 PM
Leonid Makarovsky wrote:
> Scott Dorsey > wrote:
> :>don't add the volume, but multiply by some number. So it looks more like
> :>Y(x) = n * x rather than Y(x) = x + n
>
> : Right. If you added, what you would get would be a DC offset.
>
> Then it does make sense to normalize with multiples of 2.
Close, except that it actually makes sense to normalize with multiples
of 1 rather than 2 (i.e. positive integers). And except that other
seems to be saying that in the real world, software doesn't support it.
The best plan solution by far is to normalize at some higher sample
size (24-bit or 32-bit) and then convert down to 16-bit later.
- Logan
Ed Anson
November 18th 04, 12:06 AM
Arny Krueger wrote:
> "Chris Hornbeck" > wrote in message
>
>
>>On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger" >
>>wrote:
>>
>>
>>>>It may be advantageous
>>>>to dither that; ie, sometimes shift in a 1 instead.
>>>
>>>Exactly. The problem is that the binary represenation of an analog
>>>voltage is rarely exact. There is almost always quantization error.
>>>When you double the data by means of simple shifting, you also
>>>double the quantization error.
>>
>>OK, but how about in a theoretical, ideal case that's properly
>>dithered and has no quantization error. Does a shift cause any
>>quantization error?
>
>
> The shift does not add or subtract quantization error. Instead, it
> multiplies the error that is already there. As was pointed out, the SNR does
> not change, but the noise level increases.
Given that the final playback level will presumably be unchanged, the
only practical effect of the shift is that subsequent processing MAY be
more precise due to the newly available low-order bits. Whether that
actually happens depends on the algorithms used.
Ed Anson
November 18th 04, 12:06 AM
Arny Krueger wrote:
> "Chris Hornbeck" > wrote in message
>
>
>>On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger" >
>>wrote:
>>
>>
>>>>It may be advantageous
>>>>to dither that; ie, sometimes shift in a 1 instead.
>>>
>>>Exactly. The problem is that the binary represenation of an analog
>>>voltage is rarely exact. There is almost always quantization error.
>>>When you double the data by means of simple shifting, you also
>>>double the quantization error.
>>
>>OK, but how about in a theoretical, ideal case that's properly
>>dithered and has no quantization error. Does a shift cause any
>>quantization error?
>
>
> The shift does not add or subtract quantization error. Instead, it
> multiplies the error that is already there. As was pointed out, the SNR does
> not change, but the noise level increases.
Given that the final playback level will presumably be unchanged, the
only practical effect of the shift is that subsequent processing MAY be
more precise due to the newly available low-order bits. Whether that
actually happens depends on the algorithms used.
Arny Krueger
November 18th 04, 12:49 AM
"Ed Anson" > wrote in message
> Arny Krueger wrote:
>> "Chris Hornbeck" > wrote in message
>>
>>
>>> On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger"
>>> > wrote:
>>>
>>>
>>>>> It may be advantageous
>>>>> to dither that; ie, sometimes shift in a 1 instead.
>>>>
>>>> Exactly. The problem is that the binary represenation of an analog
>>>> voltage is rarely exact. There is almost always quantization error.
>>>> When you double the data by means of simple shifting, you also
>>>> double the quantization error.
>>>
>>> OK, but how about in a theoretical, ideal case that's properly
>>> dithered and has no quantization error. Does a shift cause any
>>> quantization error?
>>
>>
>> The shift does not add or subtract quantization error. Instead, it
>> multiplies the error that is already there. As was pointed out, the
>> SNR does not change, but the noise level increases.
>
> Given that the final playback level will presumably be unchanged, the
> only practical effect of the shift is that subsequent processing MAY
> be more precise due to the newly available low-order bits. Whether
> that actually happens depends on the algorithms used.
IME these claims about the alleged technical superiority of doubling or
halving of levels have a lot more to do emotion to them than practical
technology. We recently deconstructed similar claims related to sample rate
conversions.
Arny Krueger
November 18th 04, 12:49 AM
"Ed Anson" > wrote in message
> Arny Krueger wrote:
>> "Chris Hornbeck" > wrote in message
>>
>>
>>> On Tue, 16 Nov 2004 22:09:24 -0500, "Arny Krueger"
>>> > wrote:
>>>
>>>
>>>>> It may be advantageous
>>>>> to dither that; ie, sometimes shift in a 1 instead.
>>>>
>>>> Exactly. The problem is that the binary represenation of an analog
>>>> voltage is rarely exact. There is almost always quantization error.
>>>> When you double the data by means of simple shifting, you also
>>>> double the quantization error.
>>>
>>> OK, but how about in a theoretical, ideal case that's properly
>>> dithered and has no quantization error. Does a shift cause any
>>> quantization error?
>>
>>
>> The shift does not add or subtract quantization error. Instead, it
>> multiplies the error that is already there. As was pointed out, the
>> SNR does not change, but the noise level increases.
>
> Given that the final playback level will presumably be unchanged, the
> only practical effect of the shift is that subsequent processing MAY
> be more precise due to the newly available low-order bits. Whether
> that actually happens depends on the algorithms used.
IME these claims about the alleged technical superiority of doubling or
halving of levels have a lot more to do emotion to them than practical
technology. We recently deconstructed similar claims related to sample rate
conversions.
Leonid Makarovsky
November 18th 04, 03:15 AM
Logan Shaw > wrote:
: The best plan solution by far is to normalize at some higher sample
: size (24-bit or 32-bit) and then convert down to 16-bit later.
If I record at 24bit (from record, then yes). But what if I digitally x-fer
audio from say LaserDisc player which is 16 bit. Do you recommend to upsample
it to 32 bit, perform operations and then downsample it back to 16 bit?
--Leonid
Leonid Makarovsky
November 18th 04, 03:15 AM
Logan Shaw > wrote:
: The best plan solution by far is to normalize at some higher sample
: size (24-bit or 32-bit) and then convert down to 16-bit later.
If I record at 24bit (from record, then yes). But what if I digitally x-fer
audio from say LaserDisc player which is 16 bit. Do you recommend to upsample
it to 32 bit, perform operations and then downsample it back to 16 bit?
--Leonid
Logan Shaw
November 18th 04, 07:49 AM
Leonid Makarovsky wrote:
> Logan Shaw > wrote:
> : The best plan solution by far is to normalize at some higher sample
> : size (24-bit or 32-bit) and then convert down to 16-bit later.
>
> If I record at 24bit (from record, then yes). But what if I digitally x-fer
> audio from say LaserDisc player which is 16 bit. Do you recommend to upsample
> it to 32 bit, perform operations and then downsample it back to 16 bit?
Well, first of all, please be aware that I do pretty much just live
sound and not any kind of sophisticated recording, so anything I
say here is based more on my knowledge of computer science (in which
I do have a degree...) and math than on practical experience with
real digital sound editing software.
But yes, even if you are just normalizing, I would probably convert
to 24-bit (or 32-bit) to do the work then dither back to 16-bit.
If you are doing a sample rate conversion and normalizing, I would
definitely do it.
The first and most obvious reason is that going to a higher bit
depth is certainly not going to hurt. There are no negative
effects on the sound.
Plus, normalizing is basically going to trash the accuracy of
the least significant bit (unless you do it by multiplying by
an integer, which as discussed before is exceedingly unlikely),
so it makes sense to add precision beyond the (original) least
significant bit so that you aren't throwing away information.
Things are a little clouded by the fact that the least significant
bit is probably already mostly trash, but there's no reason to
make it worse.
Sample rate conversion, if reducing the sample rate, could/should
actually give you in effect additional bits of information.
That is, if you go from 16-bit 48kHz down to 44.1kHz, there
is enough information there (assuming the original 16-bit samples
are not garbage in the lower order bits) to create more than 16
bits of information per sample. I think of it sort of like what
you do when you do a survey or a measurement in science: by
taking multiple measurements and combining the results, you can
get a more accurate value than any one of the samples. So
each of the samples at the 44.1kHz rate is composed of information
gleaned from more than one sample (at the 48kHz rate). This
is where my math background stretches very thin, but if you
converted from 88.2kHz / 16-bit to 44.1kHz, you should have enough
info for maybe another full bit of sample precision, i.e. you
could get perhaps 44.1kHz / 17-bit worth of information out
of the 88.2kHz / 16-bit original material. When making a less
dramatic conversion (e.g. 48kHz to 44.1kHz), you don't gain that
much extra, but the point is that the original sample size is
not big enough to contain the extra information you can get
by combining multiple samples into one sample, even if you
only have 480 samples' worth of information to use to build
441 new samples.
By the way, if anyone who really does know this stuff backwards
and forwards would like to comment on whether what I've said is
accurate, that might be nice. :-)
- Logan
Logan Shaw
November 18th 04, 07:49 AM
Leonid Makarovsky wrote:
> Logan Shaw > wrote:
> : The best plan solution by far is to normalize at some higher sample
> : size (24-bit or 32-bit) and then convert down to 16-bit later.
>
> If I record at 24bit (from record, then yes). But what if I digitally x-fer
> audio from say LaserDisc player which is 16 bit. Do you recommend to upsample
> it to 32 bit, perform operations and then downsample it back to 16 bit?
Well, first of all, please be aware that I do pretty much just live
sound and not any kind of sophisticated recording, so anything I
say here is based more on my knowledge of computer science (in which
I do have a degree...) and math than on practical experience with
real digital sound editing software.
But yes, even if you are just normalizing, I would probably convert
to 24-bit (or 32-bit) to do the work then dither back to 16-bit.
If you are doing a sample rate conversion and normalizing, I would
definitely do it.
The first and most obvious reason is that going to a higher bit
depth is certainly not going to hurt. There are no negative
effects on the sound.
Plus, normalizing is basically going to trash the accuracy of
the least significant bit (unless you do it by multiplying by
an integer, which as discussed before is exceedingly unlikely),
so it makes sense to add precision beyond the (original) least
significant bit so that you aren't throwing away information.
Things are a little clouded by the fact that the least significant
bit is probably already mostly trash, but there's no reason to
make it worse.
Sample rate conversion, if reducing the sample rate, could/should
actually give you in effect additional bits of information.
That is, if you go from 16-bit 48kHz down to 44.1kHz, there
is enough information there (assuming the original 16-bit samples
are not garbage in the lower order bits) to create more than 16
bits of information per sample. I think of it sort of like what
you do when you do a survey or a measurement in science: by
taking multiple measurements and combining the results, you can
get a more accurate value than any one of the samples. So
each of the samples at the 44.1kHz rate is composed of information
gleaned from more than one sample (at the 48kHz rate). This
is where my math background stretches very thin, but if you
converted from 88.2kHz / 16-bit to 44.1kHz, you should have enough
info for maybe another full bit of sample precision, i.e. you
could get perhaps 44.1kHz / 17-bit worth of information out
of the 88.2kHz / 16-bit original material. When making a less
dramatic conversion (e.g. 48kHz to 44.1kHz), you don't gain that
much extra, but the point is that the original sample size is
not big enough to contain the extra information you can get
by combining multiple samples into one sample, even if you
only have 480 samples' worth of information to use to build
441 new samples.
By the way, if anyone who really does know this stuff backwards
and forwards would like to comment on whether what I've said is
accurate, that might be nice. :-)
- Logan
Arny Krueger
November 18th 04, 12:56 PM
"Leonid Makarovsky" > wrote in message
> Logan Shaw > wrote:
>> The best plan solution by far is to normalize at some higher sample
>> size (24-bit or 32-bit) and then convert down to 16-bit later.
> If I record at 24bit (from record, then yes).
Agreed.
> But what if I digitally
> x-fer audio from say LaserDisc player which is 16 bit.
As a rule you should be able to transcribe an existing high quality
recording without a lot of editing or processing. This isn't a LP or
cassette source, its actually a fairly modern format with decent dynamic
range.
Therfore there should be no reason to do much of anything but simply
re-record the audio.
Arny Krueger
November 18th 04, 12:56 PM
"Leonid Makarovsky" > wrote in message
> Logan Shaw > wrote:
>> The best plan solution by far is to normalize at some higher sample
>> size (24-bit or 32-bit) and then convert down to 16-bit later.
> If I record at 24bit (from record, then yes).
Agreed.
> But what if I digitally
> x-fer audio from say LaserDisc player which is 16 bit.
As a rule you should be able to transcribe an existing high quality
recording without a lot of editing or processing. This isn't a LP or
cassette source, its actually a fairly modern format with decent dynamic
range.
Therfore there should be no reason to do much of anything but simply
re-record the audio.
Leonid Makarovsky
November 18th 04, 03:51 PM
Logan Shaw > wrote:
: The first and most obvious reason is that going to a higher bit
: depth is certainly not going to hurt. There are no negative
: effects on the sound.
I see. Thanks.
: Sample rate conversion, if reducing the sample rate, could/should
In my case I was increasing sample rate from 44.1 to 48. I wish DVDs have
44.1 audio in their specs.
Thanks.
--Leonid
Leonid Makarovsky
November 18th 04, 03:51 PM
Logan Shaw > wrote:
: The first and most obvious reason is that going to a higher bit
: depth is certainly not going to hurt. There are no negative
: effects on the sound.
I see. Thanks.
: Sample rate conversion, if reducing the sample rate, could/should
In my case I was increasing sample rate from 44.1 to 48. I wish DVDs have
44.1 audio in their specs.
Thanks.
--Leonid
Leonid Makarovsky
November 18th 04, 03:53 PM
Arny Krueger > wrote:
:> But what if I digitally
:> x-fer audio from say LaserDisc player which is 16 bit.
: As a rule you should be able to transcribe an existing high quality
: recording without a lot of editing or processing. This isn't a LP or
: cassette source, its actually a fairly modern format with decent dynamic
: range.
: Therfore there should be no reason to do much of anything but simply
: re-record the audio.
Sample rate conversion needed to match a DVD format. As for Normalizing, the
volume there was really low. RMS was -24db and the peak was -8db. I didn't do
anything else.
--Leonid
Leonid Makarovsky
November 18th 04, 03:53 PM
Arny Krueger > wrote:
:> But what if I digitally
:> x-fer audio from say LaserDisc player which is 16 bit.
: As a rule you should be able to transcribe an existing high quality
: recording without a lot of editing or processing. This isn't a LP or
: cassette source, its actually a fairly modern format with decent dynamic
: range.
: Therfore there should be no reason to do much of anything but simply
: re-record the audio.
Sample rate conversion needed to match a DVD format. As for Normalizing, the
volume there was really low. RMS was -24db and the peak was -8db. I didn't do
anything else.
--Leonid
Ryan
November 19th 04, 12:57 AM
(Scott Dorsey) wrote in message >...
> Yes. And for a 6 dB increase all you need to do is a right shift, so there
> is no loss of precision.
>
> But for any other level changes that are NOT powers of two, there will be
> some rounding error introduced with the multiplication, and that is what folks
> are trying to avoid.
Powers of two are: 2, 4, 8, 16, 32, 64, etc., yes?
Do you mean multiple of two?
Ryan
November 19th 04, 12:57 AM
(Scott Dorsey) wrote in message >...
> Yes. And for a 6 dB increase all you need to do is a right shift, so there
> is no loss of precision.
>
> But for any other level changes that are NOT powers of two, there will be
> some rounding error introduced with the multiplication, and that is what folks
> are trying to avoid.
Powers of two are: 2, 4, 8, 16, 32, 64, etc., yes?
Do you mean multiple of two?
Logan Shaw
November 19th 04, 01:54 AM
Ryan wrote:
> (Scott Dorsey) wrote in message >...
>>But for any other level changes that are NOT powers of two, there will be
>>some rounding error introduced with the multiplication,
> Powers of two are: 2, 4, 8, 16, 32, 64, etc., yes?
> Do you mean multiple of two?
Even multiple of two is not correct, although it's closer.
The set of integers is closed under the multiplication operator[1].
Therefore, any integer will do. (Although zero and negative
integers will tend to have OTHER negative effects.)
- Logan
[1] In other words, for all A and B in the set (of integers),
A*B is also in the set.
Logan Shaw
November 19th 04, 01:54 AM
Ryan wrote:
> (Scott Dorsey) wrote in message >...
>>But for any other level changes that are NOT powers of two, there will be
>>some rounding error introduced with the multiplication,
> Powers of two are: 2, 4, 8, 16, 32, 64, etc., yes?
> Do you mean multiple of two?
Even multiple of two is not correct, although it's closer.
The set of integers is closed under the multiplication operator[1].
Therefore, any integer will do. (Although zero and negative
integers will tend to have OTHER negative effects.)
- Logan
[1] In other words, for all A and B in the set (of integers),
A*B is also in the set.
Scott Dorsey
November 19th 04, 04:13 AM
Ryan > wrote:
(Scott Dorsey) wrote in message >...
>
>> Yes. And for a 6 dB increase all you need to do is a right shift, so there
>> is no loss of precision.
>>
>> But for any other level changes that are NOT powers of two, there will be
>> some rounding error introduced with the multiplication, and that is what folks
>> are trying to avoid.
>
>Powers of two are: 2, 4, 8, 16, 32, 64, etc., yes?
Right.
>Do you mean multiple of two?
No. The first shift doubles it. The second shift doubles that, giving
your four times. The third shift doubles it again, giving you eight.
The doubling operation is the only thing you can do that has a guarantee
of never having rounding error.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Scott Dorsey
November 19th 04, 04:13 AM
Ryan > wrote:
(Scott Dorsey) wrote in message >...
>
>> Yes. And for a 6 dB increase all you need to do is a right shift, so there
>> is no loss of precision.
>>
>> But for any other level changes that are NOT powers of two, there will be
>> some rounding error introduced with the multiplication, and that is what folks
>> are trying to avoid.
>
>Powers of two are: 2, 4, 8, 16, 32, 64, etc., yes?
Right.
>Do you mean multiple of two?
No. The first shift doubles it. The second shift doubles that, giving
your four times. The third shift doubles it again, giving you eight.
The doubling operation is the only thing you can do that has a guarantee
of never having rounding error.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."
Eric Desrochers
November 20th 04, 04:34 AM
Mike Rivers > wrote:
> The reason to normalize is because the average listener is too lazy to
> reach over (or get up) and turn up the volume. And on a lot of those
> portable players that people use today, it's damn inconvenient to
> adjust the volume because you don't have a knob, you have up/down
> buttons.
I'm sure someone could come up with a situation where full scale on the
CD is desirable. Say a user with some cheap discman with low
sensitivity earbuds in a noisy environment. in that case, a CD that is
peaking at -18 dB may not produce sufficent output even with the volume
knob maxed out.
I'm by no mean aproving the "CD volume war" that is going on for the
last 10 years, but simple normalizing is providing several benefits for
only a minute degradation in sound quality, imho.
--
Eric (Dero) Desrochers
http://homepage.mac.com/dero72
Hiroshima 45, Tchernobyl 86, Windows 95
Eric Desrochers
November 20th 04, 04:34 AM
Mike Rivers > wrote:
> The reason to normalize is because the average listener is too lazy to
> reach over (or get up) and turn up the volume. And on a lot of those
> portable players that people use today, it's damn inconvenient to
> adjust the volume because you don't have a knob, you have up/down
> buttons.
I'm sure someone could come up with a situation where full scale on the
CD is desirable. Say a user with some cheap discman with low
sensitivity earbuds in a noisy environment. in that case, a CD that is
peaking at -18 dB may not produce sufficent output even with the volume
knob maxed out.
I'm by no mean aproving the "CD volume war" that is going on for the
last 10 years, but simple normalizing is providing several benefits for
only a minute degradation in sound quality, imho.
--
Eric (Dero) Desrochers
http://homepage.mac.com/dero72
Hiroshima 45, Tchernobyl 86, Windows 95
Arny Krueger
November 20th 04, 09:25 AM
"Eric Desrochers" > wrote in message
> Mike Rivers > wrote:
>
>> The reason to normalize is because the average listener is too lazy
>> to reach over (or get up) and turn up the volume. And on a lot of
>> those portable players that people use today, it's damn inconvenient
>> to adjust the volume because you don't have a knob, you have up/down
>> buttons.
> I'm sure someone could come up with a situation where full scale on
> the CD is desirable.
Coming up with a reason to have peaks that come within a few dB of full
scale is pretty easy, but coming up with a reason to have peaks that go to
exactly FS is pretty hard. After all, if you miss FS by 1 dB people can
hardly hear the difference between that and FS. OTOH, its not unusual to
find converters that act strange at some point within that last 1 dB before
FS.
> Say a user with some cheap discman with low
> sensitivity earbuds in a noisy environment. in that case, a CD that
> is peaking at -18 dB may not produce sufficent output even with the
> volume knob maxed out.
The 21st century real-world version of that story is typified by an European
iPod with Etymotic ER-4 or ER-6 earphones plugged into it. The problem was
so bad that Etymotic came out with a special high-output model of the ER-6.
> I'm by no mean aproving the "CD volume war" that is going on for the
> last 10 years, but simple normalizing is providing several benefits
> for only a minute degradation in sound quality, imho.
Normalizing to -1 dB can work and provide few sonic disadvantages, if any.
Of course, not all music is optimized artistically by being played at the
highest reasonable levels.
Arny Krueger
November 20th 04, 09:25 AM
"Eric Desrochers" > wrote in message
> Mike Rivers > wrote:
>
>> The reason to normalize is because the average listener is too lazy
>> to reach over (or get up) and turn up the volume. And on a lot of
>> those portable players that people use today, it's damn inconvenient
>> to adjust the volume because you don't have a knob, you have up/down
>> buttons.
> I'm sure someone could come up with a situation where full scale on
> the CD is desirable.
Coming up with a reason to have peaks that come within a few dB of full
scale is pretty easy, but coming up with a reason to have peaks that go to
exactly FS is pretty hard. After all, if you miss FS by 1 dB people can
hardly hear the difference between that and FS. OTOH, its not unusual to
find converters that act strange at some point within that last 1 dB before
FS.
> Say a user with some cheap discman with low
> sensitivity earbuds in a noisy environment. in that case, a CD that
> is peaking at -18 dB may not produce sufficent output even with the
> volume knob maxed out.
The 21st century real-world version of that story is typified by an European
iPod with Etymotic ER-4 or ER-6 earphones plugged into it. The problem was
so bad that Etymotic came out with a special high-output model of the ER-6.
> I'm by no mean aproving the "CD volume war" that is going on for the
> last 10 years, but simple normalizing is providing several benefits
> for only a minute degradation in sound quality, imho.
Normalizing to -1 dB can work and provide few sonic disadvantages, if any.
Of course, not all music is optimized artistically by being played at the
highest reasonable levels.
Eric Desrochers
November 20th 04, 05:59 PM
I used the term "full scale" but really intended to mean "near full
scale"! I know of those converters with FS problems...
--
Eric (Dero) Desrochers
http://homepage.mac.com/dero72
Hiroshima 45, Tchernobyl 86, Windows 95
Eric Desrochers
November 20th 04, 05:59 PM
I used the term "full scale" but really intended to mean "near full
scale"! I know of those converters with FS problems...
--
Eric (Dero) Desrochers
http://homepage.mac.com/dero72
Hiroshima 45, Tchernobyl 86, Windows 95
vBulletin® v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.