UNPKG

1.42 kBTypeScriptView Raw
1import { ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode.js";
2import { Merge } from "./Merge.js";
3export type MidSideMergeOptions = ToneAudioNodeOptions;
4/**
5 * MidSideMerge merges the mid and side signal after they've been separated by {@link MidSideSplit}
6 * ```
7 * Mid = (Left+Right)/sqrt(2); // obtain mid-signal from left and right
8 * Side = (Left-Right)/sqrt(2); // obtain side-signal from left and right
9 * ```
10 * @category Component
11 */
12export declare class MidSideMerge extends ToneAudioNode<MidSideMergeOptions> {
13 readonly name: string;
14 /**
15 * There is no input, connect sources to either {@link mid} or {@link side} inputs.
16 */
17 readonly input: undefined;
18 /**
19 * The merged signal
20 */
21 readonly output: Merge;
22 /**
23 * Merge the incoming signal into left and right channels
24 */
25 private _merge;
26 /**
27 * The "mid" input.
28 */
29 readonly mid: ToneAudioNode;
30 /**
31 * The "side" input.
32 */
33 readonly side: ToneAudioNode;
34 /**
35 * Recombine the mid/side into Left
36 */
37 private _left;
38 /**
39 * Recombine the mid/side into Right
40 */
41 private _right;
42 /**
43 * Multiply the right by sqrt(1/2)
44 */
45 private _leftMult;
46 /**
47 * Multiply the left by sqrt(1/2)
48 */
49 private _rightMult;
50 constructor(options?: Partial<MidSideMergeOptions>);
51 dispose(): this;
52}