Re: [LAD] Gain in dB

From: Fred Gleason <fredg@email-addr-hidden>
Date: Tue Oct 15 2013 - 23:41:46 EEST

On Oct 15, 2013, at 10:11 05, André Garnier Coutinho wrote:

> GdB = 20log(Out/In) ?

Close. You actually want:

        GdB = 20*log10(out/in)

You probably knew this already as standard mathematical notation assumes log == 'log to the base of 10'. However, the log() function in the math library will get you natural logarithms ('log to the base of e'). You want log10(). Been there, done that confusion myself… :)

Cheers!

|-------------------------------------------------------------------------|
| Frederick F. Gleason, Jr. | Chief Developer |
| | Paravel Systems |
|-------------------------------------------------------------------------|
| Brian Kernighan has an automobile which he helped design. |
| Unlike most automobiles, it has neither speedometer, nor gas guage, nor |
| any of the numerous idiot lights which plague the modern driver. |
| Rather, if the driver makes any mistake, a giant "?" lights up in the |
| center of the dashboard. "The experienced driver", he says, "will |
| usually know what's wrong." |
|-------------------------------------------------------------------------|

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Oct 16 08:15:03 2013

This archive was generated by hypermail 2.1.8 : Wed Oct 16 2013 - 08:15:04 EEST