Re: math calculation problem when looking for silence

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi Jack

First I want to recommend you some links related to this issue:

http://en.wikipedia.org/wiki/Logarithm

http://en.wikipedia.org/wiki/Decibel

dB can be calculated from the following formula

X dB = -20 * log10( V / Vmax),

where X is the result in dB, log10 is logarithm in base 10, V is the
current level value and
Vmax is the max lelvel value.

In your case:

5 dB = -20 * log10( V / 70), where V is the value you're looking for.

In most programming languages there is no such thing as logarithm in
base 10,
but there is logarithm in base "e" - ln.

So I'll transform the formula from log10 to ln :

5 dB = -20 * ln( V / 70 ) / ln( 10 )

And from here:

(5dB / -20) * ln(10) = ln(V / 70)

ln(10^(5dB / -20)) = ln(V / 70), where "^" denotes the power function.

10 ^ (5dB / -20) = V / 70

V = 70 * 10 ^ (5 / -20) = 39.3638.. from your range from 0 to 70.


Regards,
Tsviatko Jongov
http://tsviatko.jongov.com


Jack написа:
Hi,
I have basic math calculation understanding problem.
Let say user selectable Silence level is 5dB.
My code is calculating average volume value carrying by the receiving
buffer.
That value is just an absolute value (in range of 0 to 70)
How should I relate that average value to that Silence level threshold set
at 5 dB to find out if that qualifies as a silence or not?
What kind of calculation that does it take?
Your help with the formula will be deeply appreciated,
Jack

.



Relevant Pages

  • math calculation problem when looking for silence
    ... I have basic math calculation understanding problem. ... Let say user selectable Silence level is 5dB. ... My code is calculating average volume value carrying by the receiving ... buffer. ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: Opening
    ... of part of the definition of a logarithm. ... it would help if I understood what you intended as an explanation. ... long calculation, the y not really being part of the n*n*n*n.... ... proof doesn't mean understanding. ...
    (rec.arts.sf.composition)
  • Re: Complex numbers
    ... IMAGINARY Returns the imaginary coefficient of a complex number ... IMLOG10 Returns the base-10 logarithm of a complex number ... IMREAL Returns the real coefficient of a complex number ... > I would like to know if there is some possiblities to use> complex variable to do calculation in a subroutine or if> you have to use real number and do the calculation by ...
    (microsoft.public.excel.programming)
  • Re: math calculation problem when looking for silence
    ... I have basic math calculation understanding problem. ... Let say user selectable Silence level is 5dB. ... How should I relate that average value to that Silence level threshold set ... You don't mention SPL for your silence threshold, ...
    (microsoft.public.win32.programmer.mmedia)