Re: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread DAVID BALAZIC

From: David [EMAIL PROTECTED]

This is an example of peak normalization (correct me if I am wrong)..

We have a song in a (stereo 16bit)wavfile called mysong.wav

we scan the wav files and find these values..(they are fake of course)

MaxRightSample = 16000;
MinRightSample = -8000;

MaxLeftSample = 15876;
MinLeftSample = -1;


We then choose the loudest sample from either side..

LeftTotal = MaxLeftSample;

if( abs(MinLeftSample)  MaxLeftSample)
  LeftTotal = abs(MinLeftSample);

RightTotal = MaxLeftSample;

if( abs(MinRightSample)  MaxRightSample)
  RightTotal = abs(MinRightSample);

 Now we calc the am factors

Leftampfactor = (double)65535 / (double)LeftTotal ;
Reftampfactor = (double)65535 / (double)RightTotal ;

Now we go back through the wav file and multiply the ampfactor to all 
the samples (left and right).

Uh , I would use the SAME factor for both channels. Otherwise one channel 
will be more apmilified than the other , like if someone turned the 
balance knob.

So :
maxValue = max(RightTotal,LeftTotal);
for(i=0;iNR_SAMPLES;i++)
{
 sample_left[i] *= 32768/maxValue;
 sample_right[i] *= 32768/maxValue;   /* 32768 is correct , 65535 ; SHORT_MAX = 2^15 , 
one bit is the sign ! */
}


-- 
David Balazic , student
E-mail   : [EMAIL PROTECTED] | living in  sLOVEnija
home page: http://surf.to/stein
Computer: Amiga 1200 + Quantum LPS-340AT
--
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Thomas_Marschall



Good idea but this would cause to play songs with a high amplitude (this
are "normal" songs as the amplitude should use the full range of 16 bits)
with a low output gain, to catch up songs with a low amplitude. The output
gain of my soundcard is quiet low and I would receive more noise from
analog amplification.

However normalization will be implemented, it must be a addable feature,
not standard behavior. Sometimes it is necessary to have unmodified
amplitude. For example CDs without gaps between songs. A jump in volume
would result. I use a self written tool to normalize the samples by first
scanning through the file, then adding a constant value to all samples
lifting maximum peak to boundaries. It takes quiet a lot of time (30 sec
on 30Megs on K6-200, just a guess, am on different computer now).








Greg Maxwell [EMAIL PROTECTED] on 17.01.2000 21:10:35

Please respond to [EMAIL PROTECTED]





  
  
  
 To:  [EMAIL PROTECTED]  
  
 cc:  (bcc: Thomas Marschall/MUC/Santix)  
  
  
  
 Subject: Re: [MP3 ENCODER] Normalization routine?
  







On Mon, 17 Jan 2000 [EMAIL PROTECTED] wrote:

 I think performance loss due to rounding errors can be ignored because:
[snip]

Insted of normalizaing your mp3 collection while you encode it,
potentially losing some (even a small amount) of quality/dynamic range,
why not just add compute a 'perceptual volume index' while you encode, and
stick it on the file ALA id3, the decoder would then adjust your mixer
levels between files to keep them closer togeather.


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Thomas_Marschall



You are right if you are talking of mixing lots of tracks. But for one
time normalization of a final track (that what we are talking about) it is
absoulutely irrelevant, where my samples are from (single sample from
analog or mixed from 256 sources). I have 16 Bit Samples and I introduce
an maximum error of +-1!  No quality loss at all.

This would be different if I do lots of subsequent calculations in
integer, especialy when I lower the amplitude, storing then result  in
integers.










DAVID BALAZIC [EMAIL PROTECTED] on 17.01.2000 17:03:43

Please respond to [EMAIL PROTECTED]





  
  
  
 To:  [EMAIL PROTECTED]  
  
 cc:  (bcc: Thomas Marschall/MUC/Santix)  
  
  
  
 Subject: Re: [MP3 ENCODER] Normalization routine?
  







Date: Mon, 17 Jan 2000 15:47:52 +0100
From: [EMAIL PROTECTED]

I think performance loss due to rounding errors can be ignored because:

You do mean _quality_ loss ?

rounding errors are _very_ small
 (if we take 16 it samples we have values from -32767 to +32768
 if we assume we have a sample around +-16000 and double
 the amplitude we get around +-32000 with an error of +-1
 this is less than 0.0033% (damn no calculator am I right?))

show me a AD device that samples this accurate. The error introduced
by simply multiplying a constant value is (IMHO) minimal.

But some audio records ( like the music CDs ) are not simply sampled,
but mixed from a lot of tracks. When you mix two tracks you need one extra
bit to avoid resolution loss. So if you sample with 8 bit and then you
mix 256 channels ( in practice not that many is used , I know ) then you need
8 extra bits ( giving a 16 bit result ) !


Good audio software uses dithering when converting the results of a
computation from some more accurate format to 16 bit to achieve better
results. ( now go to them and say they are wasting their time; 16 bit
is anough for everyone :-)


OTOH , if the samples are converted to some more precise format in LAME,
then the normalization should be done after the conversion, because it
does not make it slower and it does have higher quality , and quality
is the point of the LAME project , no ?

DAVID BALAZIC [EMAIL PROTECTED] on 17.01.2000 14:41:05

Please respond to [EMAIL PROTECTED]








 To:  [EMAIL PROTECTED]

 cc:  (bcc: Thomas Marschall/MUC/Santix)



 Subject: Re: [MP3 ENCODER] Normalization routine?








From: Ross Levis [EMAIL PROTECTED]

I can't help you directly but I always normalise before encoding music for my
FM radio
station.  I use the CD rippers Audiograbber and CDex which both have this
option.
CDex being freeware, you may be able to obtain code from the author
(mailto:[EMAIL PROTECTED] http://www.cdex.n3.net)

Ross.

By normalizing 16 bit samples you loose quality,
due to rounding errors.
But maybe the loss can be reduced by doing the normalization
on when the samples are in more suitable format ( double or something ) ?


--
David Balazic , student
E-mail   : [EMAIL PROTECTED] | living in  sLOVEnija
home page: http://surf.to/stein
Computer: Amiga 1200 + Quantum LPS-340AT
--
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

--
David Balazic , student
E-mail   : [EMAIL PROTECTED] | living in  sLOVEnija
home page: http://surf.to/stein
Computer: Amiga 1200 + Quantum LPS-340AT
--
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



RE: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Thomas_Marschall



This is nearly what I would understand of normalization except don't use
different factors for left and right channel. This would change balance in
the soundfile. Instead use the lower value of the amplification factors
for left and right channel.

Thomas Marschall








David [EMAIL PROTECTED] on 17.01.2000 21:46:07

Please respond to [EMAIL PROTECTED]





  
  
  
 To:  "'[EMAIL PROTECTED]'" [EMAIL PROTECTED] 
  
 cc:  (bcc: Thomas Marschall/MUC/Santix)  
  
  
  
 Subject: RE: [MP3 ENCODER] Normalization routine?
  







This is an example of peak normalization (correct me if I am wrong)..

We have a song in a (stereo 16bit)wavfile called mysong.wav

we scan the wav files and find these values..(they are fake of course)

MaxRightSample = 16000;
MinRightSample = -8000;

MaxLeftSample = 15876;
MinLeftSample = -1;


We then choose the loudest sample from either side..

LeftTotal = MaxLeftSample;

if( abs(MinLeftSample)  MaxLeftSample)
  LeftTotal = abs(MinLeftSample);

RightTotal = MaxLeftSample;

if( abs(MinRightSample)  MaxRightSample)
  RightTotal = abs(MinRightSample);

 Now we calc the am factors

Leftampfactor = (double)65535 / (double)LeftTotal ;
Reftampfactor = (double)65535 / (double)RightTotal ;

Now we go back through the wav file and multiply the ampfactor to all
the samples (left and right).


-David Swigger



-Original Message-
From: Mark Stephens [SMTP:[EMAIL PROTECTED]]
Sent: Monday, January 17, 2000 1:12 PM
To:  [EMAIL PROTECTED]
Subject:  RE: [MP3 ENCODER] Normalization routine?

Howdy

You mentioned the limited value of normalization that only looks at peak
levels to normalize, especially if there are just a couple of loud passages
in a song.  If you first applied peak limiting, the loud passages would be
compressed to be just a little louder than the normal passages.  Second,
apply normalization to it to bring the loudest passage up to the maximum
level.

As you may know, normalization just brings the loudest portion of the wav
file up to maximum level (or whatever level you specify) and adjusts
everything else equally.  Normalization is like turning up the volume, no
dynamic range is lost.  The difference between the quietest sounds and the
loudest sound is the same.  If you change the difference (dynamics) of the
music then you are either compressing or expanding.  By letting the peaks
clip, you are using distortion to reducing the dynamic range of the music.
Peak limiting just reduces the output for any waveform above a threshold
that you set, without adding clipping distortion.

AFAIK many classical radio stations use peak limiting compression during
broadcast to reduce the output of the loud passages without effecting the
quiet ones.  POP stations tend to use broadband compression, and you can
hear it during quiet passages when it sounds like someone is turning up the
volume and you hear all the background noise.  Of course, with todays super
quiet digital equipment it isn't really that noticeable any more.

mark stephens



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard A. Smith
Sent: Monday, January 17, 2000 12:55 PM
To: [EMAIL PROTECTED]
Subject: RE: [MP3 ENCODER] Normalization routine?


On Mon, 17 Jan 2000 11:03:57 -0500, Mark Stephens wrote:

Wouldn't that be compression, instead of normalization?

I don't really know.  I don't have much experience with compressors.
Will a compressor boost a quiet waveform and allow it to clip?

I still have an old DBX compressor/expander box where I can choose to
compress over the whole range, or set it to peak limiting mode and only
compress over a certain threshold.  It sounds like it might be valuable to
have a routine that can do peak limiting, and then normalize the result.

I don't understand what you mean by peak limiting and why it would be
necessary if you are going to normalization.



--
Richard A. Smith Bitworks, Inc.
[EMAIL PROTECTED]   501.846.5777
Sr. Design Engineerhttp://www.bitworks.com


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

--
MP3 ENCODER mailing l

Re: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Jeremy Hall

Hi,

Check out ecasound at http://www.wakkanet.fi/ecasound.  It has a nice
compresser that is tunable. Perhaps you may find it useful.

_J

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



RE: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread David

This is an example of peak normalization (correct me if I am wrong)..

We have a song in a (stereo 16bit)wavfile called mysong.wav

we scan the wav files and find these values..(they are fake of course)

MaxRightSample = 16000;
MinRightSample = -8000;

MaxLeftSample = 15876;
MinLeftSample = -1;


We then choose the loudest sample from either side..

LeftTotal = MaxLeftSample;

if( abs(MinLeftSample)  MaxLeftSample)
  LeftTotal = abs(MinLeftSample);

RightTotal = MaxLeftSample;

if( abs(MinRightSample)  MaxRightSample)
  RightTotal = abs(MinRightSample);

 Now we calc the am factors

Leftampfactor = (double)65535 / (double)LeftTotal ;
Reftampfactor = (double)65535 / (double)RightTotal ;

Now we go back through the wav file and multiply the ampfactor to all 
the samples (left and right).


-David Swigger



-Original Message-
From:   Mark Stephens [SMTP:[EMAIL PROTECTED]]
Sent:   Monday, January 17, 2000 1:12 PM
To: [EMAIL PROTECTED]
Subject:RE: [MP3 ENCODER] Normalization routine?

Howdy

You mentioned the limited value of normalization that only looks at peak
levels to normalize, especially if there are just a couple of loud passages
in a song.  If you first applied peak limiting, the loud passages would be
compressed to be just a little louder than the normal passages.  Second,
apply normalization to it to bring the loudest passage up to the maximum
level.

As you may know, normalization just brings the loudest portion of the wav
file up to maximum level (or whatever level you specify) and adjusts
everything else equally.  Normalization is like turning up the volume, no
dynamic range is lost.  The difference between the quietest sounds and the
loudest sound is the same.  If you change the difference (dynamics) of the
music then you are either compressing or expanding.  By letting the peaks
clip, you are using distortion to reducing the dynamic range of the music.
Peak limiting just reduces the output for any waveform above a threshold
that you set, without adding clipping distortion.

AFAIK many classical radio stations use peak limiting compression during
broadcast to reduce the output of the loud passages without effecting the
quiet ones.  POP stations tend to use broadband compression, and you can
hear it during quiet passages when it sounds like someone is turning up the
volume and you hear all the background noise.  Of course, with todays super
quiet digital equipment it isn't really that noticeable any more.

mark stephens



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard A. Smith
Sent: Monday, January 17, 2000 12:55 PM
To: [EMAIL PROTECTED]
Subject: RE: [MP3 ENCODER] Normalization routine?


On Mon, 17 Jan 2000 11:03:57 -0500, Mark Stephens wrote:

Wouldn't that be compression, instead of normalization?

I don't really know.  I don't have much experience with compressors.
Will a compressor boost a quiet waveform and allow it to clip?

I still have an old DBX compressor/expander box where I can choose to
compress over the whole range, or set it to peak limiting mode and only
compress over a certain threshold.  It sounds like it might be valuable to
have a routine that can do peak limiting, and then normalize the result.

I don't understand what you mean by peak limiting and why it would be
necessary if you are going to normalization.



--
Richard A. Smith Bitworks, Inc.
[EMAIL PROTECTED]   501.846.5777
Sr. Design Engineerhttp://www.bitworks.com


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



RE: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Richard A. Smith

On Mon, 17 Jan 2000 14:12:20 -0500, Mark Stephens wrote:

everything else equally.  Normalization is like turning up the volume, no
dynamic range is lost.  The difference between the quietest sounds and the
loudest sound is the same.  If you change the difference (dynamics) of the
music then you are either compressing or expanding.  By letting the peaks
clip, you are using distortion to reducing the dynamic range of the music.
Peak limiting just reduces the output for any waveform above a threshold
that you set, without adding clipping distortion.

Ah.. I see.  Thank you.  I had a general idea what a compander did
but never had a full explaination.  This sounds like a better
solution than what I was doing. 

How is the interface handled between the music sections?  I mean when
you scale a portion how do you match it back up to the sections
surrounding it? Some sort of changeing scalefactor?


--
Richard A. Smith Bitworks, Inc.   
[EMAIL PROTECTED]   501.846.5777
Sr. Design Engineerhttp://www.bitworks.com   


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



RE: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Mark Stephens

Howdy

You mentioned the limited value of normalization that only looks at peak
levels to normalize, especially if there are just a couple of loud passages
in a song.  If you first applied peak limiting, the loud passages would be
compressed to be just a little louder than the normal passages.  Second,
apply normalization to it to bring the loudest passage up to the maximum
level.

As you may know, normalization just brings the loudest portion of the wav
file up to maximum level (or whatever level you specify) and adjusts
everything else equally.  Normalization is like turning up the volume, no
dynamic range is lost.  The difference between the quietest sounds and the
loudest sound is the same.  If you change the difference (dynamics) of the
music then you are either compressing or expanding.  By letting the peaks
clip, you are using distortion to reducing the dynamic range of the music.
Peak limiting just reduces the output for any waveform above a threshold
that you set, without adding clipping distortion.

AFAIK many classical radio stations use peak limiting compression during
broadcast to reduce the output of the loud passages without effecting the
quiet ones.  POP stations tend to use broadband compression, and you can
hear it during quiet passages when it sounds like someone is turning up the
volume and you hear all the background noise.  Of course, with todays super
quiet digital equipment it isn't really that noticeable any more.

mark stephens



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard A. Smith
Sent: Monday, January 17, 2000 12:55 PM
To: [EMAIL PROTECTED]
Subject: RE: [MP3 ENCODER] Normalization routine?


On Mon, 17 Jan 2000 11:03:57 -0500, Mark Stephens wrote:

Wouldn't that be compression, instead of normalization?

I don't really know.  I don't have much experience with compressors.
Will a compressor boost a quiet waveform and allow it to clip?

I still have an old DBX compressor/expander box where I can choose to
compress over the whole range, or set it to peak limiting mode and only
compress over a certain threshold.  It sounds like it might be valuable to
have a routine that can do peak limiting, and then normalize the result.

I don't understand what you mean by peak limiting and why it would be
necessary if you are going to normalization.



--
Richard A. Smith Bitworks, Inc.
[EMAIL PROTECTED]   501.846.5777
Sr. Design Engineerhttp://www.bitworks.com


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



RE: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Richard A. Smith

On Mon, 17 Jan 2000 11:03:57 -0500, Mark Stephens wrote:

Wouldn't that be compression, instead of normalization?

I don't really know.  I don't have much experience with compressors. 
Will a compressor boost a quiet waveform and allow it to clip?

I still have an old DBX compressor/expander box where I can choose to
compress over the whole range, or set it to peak limiting mode and only
compress over a certain threshold.  It sounds like it might be valuable to
have a routine that can do peak limiting, and then normalize the result.

I don't understand what you mean by peak limiting and why it would be
necessary if you are going to normalization. 



--
Richard A. Smith Bitworks, Inc.   
[EMAIL PROTECTED]   501.846.5777
Sr. Design Engineerhttp://www.bitworks.com   


--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread DAVID BALAZIC

Date: Mon, 17 Jan 2000 15:47:52 +0100
From: [EMAIL PROTECTED]

I think performance loss due to rounding errors can be ignored because:

You do mean _quality_ loss ?

rounding errors are _very_ small
 (if we take 16 it samples we have values from -32767 to +32768
 if we assume we have a sample around +-16000 and double
 the amplitude we get around +-32000 with an error of +-1
 this is less than 0.0033% (damn no calculator am I right?))

show me a AD device that samples this accurate. The error introduced
by simply multiplying a constant value is (IMHO) minimal.

But some audio records ( like the music CDs ) are not simply sampled,
but mixed from a lot of tracks. When you mix two tracks you need one extra
bit to avoid resolution loss. So if you sample with 8 bit and then you
mix 256 channels ( in practice not that many is used , I know ) then you need
8 extra bits ( giving a 16 bit result ) !


Good audio software uses dithering when converting the results of a 
computation from some more accurate format to 16 bit to achieve better
results. ( now go to them and say they are wasting their time; 16 bit 
is anough for everyone :-)


OTOH , if the samples are converted to some more precise format in LAME,
then the normalization should be done after the conversion, because it
does not make it slower and it does have higher quality , and quality
is the point of the LAME project , no ? 

DAVID BALAZIC [EMAIL PROTECTED] on 17.01.2000 14:41:05

Please respond to [EMAIL PROTECTED]





  
  
  
 To:  [EMAIL PROTECTED]  
  
 cc:  (bcc: Thomas Marschall/MUC/Santix)  
  
  
  
 Subject: Re: [MP3 ENCODER] Normalization routine?
  







From: Ross Levis [EMAIL PROTECTED]

I can't help you directly but I always normalise before encoding music for my
FM radio
station.  I use the CD rippers Audiograbber and CDex which both have this
option.
CDex being freeware, you may be able to obtain code from the author
(mailto:[EMAIL PROTECTED] http://www.cdex.n3.net)

Ross.

By normalizing 16 bit samples you loose quality,
due to rounding errors.
But maybe the loss can be reduced by doing the normalization
on when the samples are in more suitable format ( double or something ) ?


--
David Balazic , student
E-mail   : [EMAIL PROTECTED] | living in  sLOVEnija
home page: http://surf.to/stein
Computer: Amiga 1200 + Quantum LPS-340AT
--
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )

-- 
David Balazic , student
E-mail   : [EMAIL PROTECTED] | living in  sLOVEnija
home page: http://surf.to/stein
Computer: Amiga 1200 + Quantum LPS-340AT
--
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



RE: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Mark Stephens

Wouldn't that be compression, instead of normalization?

I still have an old DBX compressor/expander box where I can choose to
compress over the whole range, or set it to peak limiting mode and only
compress over a certain threshold.  It sounds like it might be valuable to
have a routine that can do peak limiting, and then normalize the result.

mark stephens

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard A. Smith
Sent: Monday, January 17, 2000 10:43 AM
To: [EMAIL PROTECTED]
Subject: Re: [MP3 ENCODER] Normalization routine?


Before I burn stuff to CD's I usually hand normalize the music with
CoolEdit.  It's been my experience that you can introduce quite a bit
of clipping in the waveform without any noticable quality loss.  In
fact several of the songs ripped directly from my CD's had a
suprising ammount of clipping to begin with.

I doubt that any normalization routine rounding errors are going to
make a perceved quality difference.  The problem that I find with
automatic normalization programs is that they normalize to the peak
level which can still leave quite a bit of difference between a quiet
song and a loud song.

An intelligent normalization routine would be quite handy.  To do
this properly however I think you will need some sort of 2 pass
procedure.  1 to run through the file and compute the scale factor
and then a second pass to apply it.


--
Richard A. Smith Bitworks, Inc.
[EMAIL PROTECTED]   501.846.5777
Sr. Design Engineerhttp://www.bitworks.com

--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Richard A. Smith

On Mon, 17 Jan 2000 14:41:05 +0100 (MET), DAVID BALAZIC wrote:

From: Ross Levis [EMAIL PROTECTED]

I can't help you directly but I always normalise before encoding music for my FM 
radio
station.  I use the CD rippers Audiograbber and CDex which both have this option.

By normalizing 16 bit samples you loose quality,
due to rounding errors. 
But maybe the loss can be reduced by doing the normalization
on when the samples are in more suitable format ( double or something ) ?

Before I burn stuff to CD's I usually hand normalize the music with
CoolEdit.  It's been my experience that you can introduce quite a bit
of clipping in the waveform without any noticable quality loss.  In
fact several of the songs ripped directly from my CD's had a
suprising ammount of clipping to begin with.

I doubt that any normalization routine rounding errors are going to
make a perceved quality difference.  The problem that I find with
automatic normalization programs is that they normalize to the peak
level which can still leave quite a bit of difference between a quiet
song and a loud song.

An intelligent normalization routine would be quite handy.  To do
this properly however I think you will need some sort of 2 pass
procedure.  1 to run through the file and compute the scale factor
and then a second pass to apply it.


--
Richard A. Smith Bitworks, Inc.   
[EMAIL PROTECTED]   501.846.5777
Sr. Design Engineerhttp://www.bitworks.com   




--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread Thomas_Marschall




I think performance loss due to rounding errors can be ignored because:

rounding errors are _very_ small
 (if we take 16 it samples we have values from -32767 to +32768
 if we assume we have a sample around +-16000 and double
 the amplitude we get around +-32000 with an error of +-1
 this is less than 0.0033% (damn no calculator am I right?))

show me a AD device that samples this accurate. The error introduced
by simply multiplying a constant value is (IMHO) minimal.

Thomas









DAVID BALAZIC [EMAIL PROTECTED] on 17.01.2000 14:41:05

Please respond to [EMAIL PROTECTED]





  
  
  
 To:  [EMAIL PROTECTED]  
  
 cc:  (bcc: Thomas Marschall/MUC/Santix)  
  
  
  
 Subject: Re: [MP3 ENCODER] Normalization routine?
  







From: Ross Levis [EMAIL PROTECTED]

I can't help you directly but I always normalise before encoding music for my
FM radio
station.  I use the CD rippers Audiograbber and CDex which both have this
option.
CDex being freeware, you may be able to obtain code from the author
(mailto:[EMAIL PROTECTED] http://www.cdex.n3.net)

Ross.

By normalizing 16 bit samples you loose quality,
due to rounding errors.
But maybe the loss can be reduced by doing the normalization
on when the samples are in more suitable format ( double or something ) ?


--
David Balazic , student
E-mail   : [EMAIL PROTECTED] | living in  sLOVEnija
home page: http://surf.to/stein
Computer: Amiga 1200 + Quantum LPS-340AT
--
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )



Re: [MP3 ENCODER] Normalization routine?

2000-01-20 Thread DAVID BALAZIC

From: Ross Levis [EMAIL PROTECTED]

I can't help you directly but I always normalise before encoding music for my FM radio
station.  I use the CD rippers Audiograbber and CDex which both have this option.
CDex being freeware, you may be able to obtain code from the author
(mailto:[EMAIL PROTECTED] http://www.cdex.n3.net)

Ross.

By normalizing 16 bit samples you loose quality,
due to rounding errors. 
But maybe the loss can be reduced by doing the normalization
on when the samples are in more suitable format ( double or something ) ?


-- 
David Balazic , student
E-mail   : [EMAIL PROTECTED] | living in  sLOVEnija
home page: http://surf.to/stein
Computer: Amiga 1200 + Quantum LPS-340AT
--
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )