[mad-dev] Suggested limits for madplay equalizer_filter and attenuate_filter functions

Robet John Shepherd robert@reviewer.co.uk
Fri, 20 Feb 2004 00:40:43 -0000


Not hearing the results from playing with this that I expected, so I'm
guessing something isn't quite right with the formula you provided. :/

If I use that I get very odd results, not at all like I expect, yet if I use
something like MAD_F_MAX / 4 then things do sound somewhat more how I'd
expect them to.

Very confused. :/

Also is there a list of what subbands apply to what frequencies anywhere?
I've not had any luck in the usual places, every site and its dog lists the
rough process of how mp3 is encoded/decoded but no specifics. :/


Yours Unwhettedly,
Robert John Shepherd.

Editor
DVD REVIEWER
The UK's BIGGEST Online DVD Magazine
http://www.dvd.reviewer.co.uk

For a copy of my Public PGP key, email: pgp@robertsworld.org.uk  

 

> -----Original Message-----
> From: mad-dev-admin@lists.mars.org 
> [mailto:mad-dev-admin@lists.mars.org] On Behalf Of Rob Leslie
> Sent: 18 February 2004 20:03
> To: mad-dev@lists.mars.org
> Subject: Re: [mad-dev] Suggested limits for madplay 
> equalizer_filter and attenuate_filter functions
> 
> On Feb 18, 2004, at 1:20 AM, Robert John Shepherd wrote:
> > In the equalizer.c and filter.c source for madplay, it 
> seems to define 
> > no equalisation (flat) as MAD_F_ONE, but I couldn't find any 
> > documentation on what the upper and lower limits on this were, and 
> > whether this should be a linear scale.
> >
> > Also in attenuate_filter what is the maximum scalefactor?
> 
> The lower limit is 0, reducing the signal to absolute silence. The 
> upper limit depends on the signal being modified, but cannot 
> be greater 
> than MAD_F_MAX. The risk of course is you may amplify the 
> signal beyond 
> the range of full scale (causing clipping), or worse, beyond 
> the range 
> of representable values.
> 
> Usually it is best to calculate a scalefactor from the desired change 
> in decibels. For example, to reduce the signal by 3 dB, calculate:
> 
>      scalefactor = mad_f_tofixed(pow(10, -3.0 / 20));
> 
> Using the decibel scale, the effective range is limited from DB_MIN 
> (-175) to DB_MAX (+18).
> 
> -- 
> Rob Leslie
> rob@mars.org
> 
>