Skip to content
Tone.js

PanVol

class Component ↳ extends ToneAudioNode<PanVolOptions>

PanVol is a Tone.Panner and Tone.Volume in one.

// pan the incoming signal left and drop the volume
const panVol = new Tone.PanVol(-0.25, -12).toDestination();
const osc = new Tone.Oscillator().connect(panVol).start();
new PanVol(pan?: number, volume?: number)

Parameters

  • pan number optional

    the initial pan

  • volume number optional

    The output volume.

new PanVol(options?: Partial<PanVolOptions>)

Parameters

read-only

input: InputNode

The input node or nodes. If the object is a source, it does not have any input and this.input is undefined.

read-only

name: string

The name of the class

Default: "PanVol"

read-only

output: OutputNode

The output nodes. If the object is a sink, it does not have any output and this.output is undefined.

read-only

pan: Param<"audioRange">

The L/R panning control. -1 = hard left, 1 = hard right.

Range: -1 to 1

read-only

volume: Param<"decibels">

The volume control in decibels.

mute: boolean

Mute/unmute the volume

dispose(): this

Dispose and disconnect

Returns this

static

getDefaults(): PanVolOptions

Returns all of the default options belonging to the class.

Returns PanVolOptions