Class: Rms

Rms

Compute the Root Mean Square of a signal.

support standalone usage

Constructor

new Rms(options)

Parameters:
Name Type Description
options Object

Override default parameters.

Properties
Name Type Attributes Default Description
power Boolean <optional>
false

If true remove the "R" of the "Rms" and return the squared result (i.e. power).

Source:
Example
import * as lfo from 'waves-lfo/client';

// assuming some `AudioBuffer`
const audioInBuffer = new lfo.source.AudioInBuffer({
  audioBuffer: audioBuffer,
  frameSize: 512,
});

const rms = new lfo.operator.Rms();
const logger = new lfo.sink.Logger({ data: true });

audioInBuffer.connect(rms);
rms.connect(logger);

audioInBuffer.start();

Methods

inputSignal(signal) → {Number}

Allows for the use of a Rms outside a graph (e.g. inside another node). Return the rms of the given signal block.

Parameters:
Name Type Description
signal Number

Signal block to be computed.

Source:
Returns:
  • rms of the input signal.
Type
Number
Example
import * as lfo from 'waves-lfo/client';

const rms = new lfo.operator.Rms();
rms.initStream({ frameType: 'signal', frameSize: 1000 });

const results = rms.inputSignal([...values]);