1 | import { Param } from "../../core/context/Param.js";
|
2 | import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode.js";
|
3 | import { AudioRange } from "../../core/type/Units.js";
|
4 | interface TonePannerOptions extends ToneAudioNodeOptions {
|
5 | pan: AudioRange;
|
6 | channelCount: number;
|
7 | }
|
8 | /**
|
9 | * Panner is an equal power Left/Right Panner. It is a wrapper around the StereoPannerNode.
|
10 | * @example
|
11 | * return Tone.Offline(() => {
|
12 | * // move the input signal from right to left
|
13 | * const panner = new Tone.Panner(1).toDestination();
|
14 | * panner.pan.rampTo(-1, 0.5);
|
15 | * const osc = new Tone.Oscillator(100).connect(panner).start();
|
16 | * }, 0.5, 2);
|
17 | * @category Component
|
18 | */
|
19 | export declare class Panner extends ToneAudioNode<TonePannerOptions> {
|
20 | readonly name: string;
|
21 | /**
|
22 | * the panner node
|
23 | */
|
24 | private _panner;
|
25 | readonly input: StereoPannerNode;
|
26 | readonly output: StereoPannerNode;
|
27 | /**
|
28 | * The pan control. -1 = hard left, 1 = hard right.
|
29 | * @min -1
|
30 | * @max 1
|
31 | * @example
|
32 | * return Tone.Offline(() => {
|
33 | * // pan hard right
|
34 | * const panner = new Tone.Panner(1).toDestination();
|
35 | * // pan hard left
|
36 | * panner.pan.setValueAtTime(-1, 0.25);
|
37 | * const osc = new Tone.Oscillator(50, "triangle").connect(panner).start();
|
38 | * }, 0.5, 2);
|
39 | */
|
40 | readonly pan: Param<"audioRange">;
|
41 | constructor(options?: Partial<TonePannerOptions>);
|
42 | /**
|
43 | * @param pan The initial panner value (Defaults to 0 = "center").
|
44 | */
|
45 | constructor(pan?: AudioRange);
|
46 | static getDefaults(): TonePannerOptions;
|
47 | dispose(): this;
|
48 | }
|
49 | export {};
|