UNPKG

1.61 kBTypeScriptView Raw
1import { Effect, EffectOptions } from "./Effect.js";
2import { OutputNode, ToneAudioNode } from "../core/context/ToneAudioNode.js";
3export type MidSideEffectOptions = EffectOptions;
4/**
5 * Mid/Side processing separates the the 'mid' signal
6 * (which comes out of both the left and the right channel)
7 * and the 'side' (which only comes out of the the side channels)
8 * and effects them separately before being recombined.
9 * Applies a Mid/Side seperation and recombination.
10 * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).
11 * This is a base-class for Mid/Side Effects.
12 * @category Effect
13 */
14export declare abstract class MidSideEffect<Options extends MidSideEffectOptions> extends Effect<Options> {
15 readonly name: string;
16 /**
17 * The mid/side split
18 */
19 private _midSideSplit;
20 /**
21 * The mid/side merge
22 */
23 private _midSideMerge;
24 /**
25 * The mid send. Connect to mid processing
26 */
27 protected _midSend: ToneAudioNode;
28 /**
29 * The side send. Connect to side processing
30 */
31 protected _sideSend: ToneAudioNode;
32 /**
33 * The mid return connection
34 */
35 protected _midReturn: ToneAudioNode;
36 /**
37 * The side return connection
38 */
39 protected _sideReturn: ToneAudioNode;
40 constructor(options: MidSideEffectOptions);
41 /**
42 * Connect the mid chain of the effect
43 */
44 protected connectEffectMid(...nodes: OutputNode[]): void;
45 /**
46 * Connect the side chain of the effect
47 */
48 protected connectEffectSide(...nodes: OutputNode[]): void;
49 dispose(): this;
50}