Panner
class Component ↳ extends ToneAudioNode<TonePannerOptions>
Panner is an equal power Left/Right Panner. It is a wrapper around the StereoPannerNode.
return Tone.Offline(() => {
// move the input signal from right to left
const panner = new Tone.Panner(1).toDestination();
panner.pan.rampTo(-1, 0.5);
const osc = new Tone.Oscillator(100).connect(panner).start();
}, 0.5, 2);Constructor
Section titled “Constructor”new Panner(options?: Partial<TonePannerOptions>)Parameters
- options
Partial<TonePannerOptions>optional
new Panner(pan?: number)Parameters
-
pan
numberoptionalThe initial panner value (Defaults to 0 = “center”).
Properties
Section titled “Properties”read-only
input: StereoPannerNodeThe input node or nodes. If the object is a source, it does not have any input and this.input is undefined.
output
Section titled “output”read-only
output: StereoPannerNodeThe 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 pan control. -1 = hard left, 1 = hard right.
Range: -1 to 1
return Tone.Offline(() => {
// pan hard right
const panner = new Tone.Panner(1).toDestination();
// pan hard left
panner.pan.setValueAtTime(-1, 0.25);
const osc = new Tone.Oscillator(50, "triangle").connect(panner).start();
}, 0.5, 2);Methods
Section titled “Methods”getDefaults()
Section titled “getDefaults()”static
getDefaults(): TonePannerOptionsReturns all of the default options belonging to the class.
Returns TonePannerOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()