UNPKG

1.54 kBTypeScriptView Raw
1import { Param } from "../../core/context/Param.js";
2import { InputNode, OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode.js";
3import { AudioRange, Decibels } from "../../core/type/Units.js";
4export interface PanVolOptions extends ToneAudioNodeOptions {
5 pan: AudioRange;
6 volume: Decibels;
7 mute: boolean;
8 channelCount: number;
9}
10/**
11 * PanVol is a Tone.Panner and Tone.Volume in one.
12 * @example
13 * // pan the incoming signal left and drop the volume
14 * const panVol = new Tone.PanVol(-0.25, -12).toDestination();
15 * const osc = new Tone.Oscillator().connect(panVol).start();
16 * @category Component
17 */
18export declare class PanVol extends ToneAudioNode<PanVolOptions> {
19 readonly name: string;
20 readonly input: InputNode;
21 readonly output: OutputNode;
22 /**
23 * The panning node
24 */
25 private _panner;
26 /**
27 * The L/R panning control. -1 = hard left, 1 = hard right.
28 * @min -1
29 * @max 1
30 */
31 readonly pan: Param<"audioRange">;
32 /**
33 * The volume node
34 */
35 private _volume;
36 /**
37 * The volume control in decibels.
38 */
39 readonly volume: Param<"decibels">;
40 /**
41 * @param pan the initial pan
42 * @param volume The output volume.
43 */
44 constructor(pan?: AudioRange, volume?: Decibels);
45 constructor(options?: Partial<PanVolOptions>);
46 static getDefaults(): PanVolOptions;
47 /**
48 * Mute/unmute the volume
49 */
50 get mute(): boolean;
51 set mute(mute: boolean);
52 dispose(): this;
53}