From: Afinko on
>Thank you Greg.
>
>With Parseval's theorem it works great.
>I am attaching MATLAB code for verification:
>
>f1 = 50; % [Hz]
>fs = 10000; % [Hz]
>t_max = 1; % [sec]
>
>x = sin(2*pi*f1*(0:1/(fs-1):t_max));
>% x = randn(10000,1); % It works for any input
>X = fft(x);
>
>RMS_t = sqrt((sum(x.^2))/length(x));
>RMS_f = sqrt(sum(abs(X/length(X)).^2));
>
>error = RMS_t - RMS_f
>
>error =
>
> 1.8874e-015
>

I added this information also to the wikipedia:
http://en.wikipedia.org/wiki/Root_mean_square#RMS_in_frequency_domain
From: Robert Orban on
In article <a5b54ee5-fe98-4652-828c-
437f64dc1ffb(a)h2g2000vbd.googlegroups.com>, makolber(a)yahoo.com says...
>
>
>
>>
>> I have a program that will compute the peak and RMS for a WAV
>> file, such as recorded by a digital audio recorder. �I sometimes
>> try to use the peak and RMS to equalize the level between tracks,
>> but it isn't quite as easy as I might like. �
>>
>> -- glen
>
>Glen...
>
>you are doing this i presume to attempt to equalize the "loudness"
>between tracks..
>
>I'm sure you have found that equalizing the peak does not do a good
>job of equalizing loudnes..
>
>How well do you find the RMS works for this?
>
>My guess is it would work pretty well as long as there are no long
>periods of silence in the track.

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

From: Mark on

>
> >I'm sure you have found that equalizing the peak does not do a good
> >job of equalizing loudnes..
>
> >How well do you find the RMS works for this?
>
> >My guess is it would work pretty well as long as there are no long
> >periods of silence in the track.
>
> http://en.wikipedia.org/wiki/Replay_Gain- Hide quoted text -
>

thanks Robert...

Mark