Loudness estimation

### 26.2.14 Loudness estimation

The rms command computes the RMS (root mean square) of the audio data (see Section 19.2.1).

- rms command takes one mandatory argument and two optional arguments:
  - A, an audio clip.
  - Optionally, offset, a nonnegative integer (by default, offset=0).
  - Optionally, len, a positive integer (by default, len=L−offset, where L is the length of A).
- rms(A ⟨,offset,len ⟩) computes RMS for each channel (optionally restricted to the portion of length len starting at offset) and returns the result as √∑cRMSc2, where RMSc is the RMS of channel c.
- rms operates with sample values mapped to [−1,1], hence the result is in [0,1]. To convert the result to decibels, use the formula RMSdB=20log10(RMS).
- RMS is a measure of the average loudness of the audio.