Skip to content

sig.rms

Olivier Lartillot edited this page Jan 17, 2018 · 2 revisions

The global amplitude of the signal x can be computed simply by taking the root average of the square of the waveform, also called root-mean-square (RMS):

https://miningsuite.googlecode.com/svn/wiki/SigRms_eq1.png

Flowchart Interconnections

sig.rms accepts as input data type either:

  • sig.input objects, where the audio waveform can be segmented (using sig.segment), decomposed into channels (using sig.filterbank), and/or decomposed into frames (using sig.frame),
  • file name(s) or the 'Folder' keyword,
  • other objects, such as sig.Spectrum, are accepted as well.

The following command orders the computation of the RMS related to a given audio file: sig.rms('ragtime')

which produce the resulting message in the Command Window: The RMS energy related to file ragtime is 0.017932

Frame decomposition

sig.rms(…,'Frame',…) performs first a frame decomposition, with by default a frame length of 50 ms and half overlapping. For the specification of other frame configuration using additional parameters, cf. the previous SigFrame vs. 'Frame' section.

For instance: sig.rms('ragtime','Frame')

we obtain a temporal evolution of the energy:

https://miningsuite.googlecode.com/svn/wiki/SigRms_ex1.png

We can note that this energy curve is very close to the envelope:

https://miningsuite.googlecode.com/svn/wiki/SigRms_ex2.png

Options

sig.rms(…,'Median') replaces the mean by the median, corresponding to what could be called a “root-median-square”.

Clone this wiki locally