Tone.Meter
↳ EXTENDS ToneTone.Meter gets the RMS of an input signal with some averaging applied. It can also get the raw value of the input signal.
CONSTRUCTOR
new Tone.Meter (type
, smoothing
)
type
Either “level” or “signal”.
type:
String
smoothing
The amount of smoothing applied between frames.
type:
Number
DEFAULTS
{
smoothing
:
0.8
,
type
:
Tone.Meter.Type.Level
}
EXAMPLE
var meter = new Tone.Meter();
var mic = new Tone.Microphone().start();
//connect mic to the meter
mic.connect(meter);
//the current level of the mic input
var level = meter.value;Members
.smoothing
↝ Number #The amount of carryover between the current and last frame. Only applied meter for “level” type.
.type
↝ String #The type of the meter, either “level” or “signal”. A “level” meter will return the volume level (rms) of the input signal and a “signal” meter will return the signal value of the input.