[LAD] Calculate R M S

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Wednesday, February 16, 2011 - 5:51 pm

---moq1297878669c7cd0be18f16251daf82f8b5089b37a8
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi Experts.
I wanna normalize my sound stream by loudness (energy / pressure /
intensity) , not by peaks.
How i do it ?
Is available Jack plugin for so what ?
What is (we hear as) "loudness" ?
RMS or +(average) or something else ?
Is somewhere available examples how to calculate RMS ?
Is it done simlpe by :
 int i, n;  double sums, rms;
 sums=3D0.0;  n=3D10;  rms=3D0;
 for(i=3D0; i 10 kHz ?
How to calculate RMS with hi-precision for frequencies > 10 kHz ?
With inerpolation or so ?
What is reference ( 0dB ) RMS for example for 16bit PCM signal 1024
samples ?
  sqrt( 1024*(0x7FFF ^ 2) / 1024 )  =3D=3D  sqrt( (0x7FFF
^ 2)  ) =3D=3D 0x7FFF 
Is it simple  0x7FFF (32000 dec) ?
How to calc RMS for stereo signal ?
So , or somehow else ?
for(i=3D0; iHi Experts.I wanna normalize my sound str=
eam by loudness (energy / pressure / intensity) , not by peaks.How i =
do it ?Is available Jack plugin for so what ?What is (we =
hear as) "loudness" ?RMS or +(average) or something else ?Is somewhere available examples how to calculate RMS ?Is it done sim=
lpe by : int i, n;  double sums, rms; sums=
=3D0.0;  n=3D10;  rms=3D0; for(i=3D0; i<n;i++) {   sums =3D sums + ( (double)i * (double)i );  } rms =3D sqrt(sums / n); printf("    =
      rms =3D %12.12f\n\n", rms );Is s=
o sipmple algo good enough for frequencies > 10 kHz ?How to calcul=
ate RMS with hi-precision for frequencies > 10 kHz ?With inerpolat=
ion or so ?What is reference ( 0dB ) RMS for example for 16bit =
PCM signal 1024 samples ?  sqrt( 1024*(0x7FFF ^ 2) / 1024 )&#160=
; =3D=3D  sqrt( (0x7FFF ^ 2)  ) =3D=3D 0x7FFF  Is it s=
imple  0x7FFF (32000 dec) ?How to calc RMS for stereo sign=
al ?So , or somehow else ?for(i=3D0; i<n;i++) {&#=
160; ....   sums =3D sampleL/2 + sampleR/2;  }In case operating with float point, what should be a bit faster,  =
/ 2  or * 0.5 ?How to gotta RMS value in dB ? &=
#160; 20 x log10(Measured/Reference0_dB)  or 10 x log10(Measured=
/Reference0_dB)  ??Im just physics student and im new in D=
SP,so pleaz no angree about simple or stuppid questions.A=
ny examples and hints welcomed.Many Tnx in advance.Alf ----
=0A
---moq1297878669c7cd0be18f16251daf82f8b5089b37a8--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Calculate R M S, Alfs Kurmis, (Wed Feb 16, 5:51 pm)
Re: [LAD] Calculate R M S, Jens M Andreasen, (Fri Feb 18, 1:16 am)
Re: [LAD] Calculate R M S, Georg Holzmann, (Thu Feb 17, 7:09 pm)
Re: [LAD] Calculate R M S, Dominique Michel, (Wed Feb 16, 8:33 pm)
Re: [LAD] Calculate R M S, Fons Adriaensen, (Wed Feb 16, 6:45 pm)
Re: [LAD] Calculate R M S, Mark Knecht, (Fri Feb 18, 7:30 pm)
Re: [LAD] Calculate R M S, Fons Adriaensen, (Fri Feb 18, 9:20 pm)
Re: [LAD] Calculate R M S, Mark Knecht, (Fri Feb 18, 10:38 pm)
Re: [LAD] Calculate R M S, Folderol, (Fri Feb 18, 9:24 pm)
Re: [LAD] Calculate R M S, Fons Adriaensen, (Fri Feb 18, 9:30 pm)
Re: [LAD] Calculate R M S, Alfs Kurmis, (Fri Feb 18, 5:53 pm)
Re: [LAD] Calculate R M S, Fons Adriaensen, (Fri Feb 18, 7:02 pm)
Re: [LAD] Calculate R M S - correction, Fons Adriaensen, (Fri Feb 18, 7:06 pm)