Skip to content
Tone.js

DCMeter

class Component ↳ extends MeterBase<DCMeterOptions>

DCMeter gets the raw value of the input signal at the current time.

const meter = new Tone.DCMeter();
const mic = new Tone.UserMedia();
mic.open();
// connect mic to the meter
mic.connect(meter);
// the current level of the mic
const level = meter.getValue();

See also: Meter.

new DCMeter(options?: Partial<ToneWithContextOptions>)

Parameters

↳ inherited from MeterBase

input: InputNode

The signal to be analysed

read-only

name: string

The name of the class

Default: "DCMeter"

↳ inherited from MeterBase

output: OutputNode

The output is just a pass through of the input

↳ inherited from MeterBase

dispose(): this

Dispose and disconnect

Returns this

getValue(): number

Get the signal value of the incoming signal

Returns number