UNPKG

1.29 kBTypeScriptView Raw
1import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode.js";
2import { Positive } from "../../core/type/Units.js";
3interface MergeOptions extends ToneAudioNodeOptions {
4 channels: Positive;
5}
6/**
7 * Merge brings multiple mono input channels into a single multichannel output channel.
8 *
9 * @example
10 * const merge = new Tone.Merge().toDestination();
11 * // routing a sine tone in the left channel
12 * const osc = new Tone.Oscillator().connect(merge, 0, 0).start();
13 * // and noise in the right channel
14 * const noise = new Tone.Noise().connect(merge, 0, 1).start();;
15 * @category Component
16 */
17export declare class Merge extends ToneAudioNode<MergeOptions> {
18 readonly name: string;
19 /**
20 * The merger node for the channels.
21 */
22 private _merger;
23 /**
24 * The output is the input channels combined into a single (multichannel) output
25 */
26 readonly output: ChannelMergerNode;
27 /**
28 * Multiple input connections combine into a single output.
29 */
30 readonly input: ChannelMergerNode;
31 /**
32 * @param channels The number of channels to merge.
33 */
34 constructor(channels?: Positive);
35 constructor(options?: Partial<MergeOptions>);
36 static getDefaults(): MergeOptions;
37 dispose(): this;
38}
39export {};