Previous Up Next

28.2.16  Loudness estimation

The rms command computes the RMS (root mean square) of the audio data (see Section 21.2.1 for other uses of rms).

Example

With the file CantinaBand3.wav downloaded from here:

clip:=normalize(readwav("/home/luka/Downloads/CantinaBand3.wav"),0)
     
a sound clip with 66150 samples at 22050 Hz (16 bit, mono)           
r:=rms(clip)
     
0.152788493422           

Average loudness in dB:

20*log10(r)
     
−16.3181870293           

Previous Up Next