UNPKG

1.44 kBTypeScriptView Raw
1import { MidSideEffect, MidSideEffectOptions } from "../effect/MidSideEffect.js";
2import { Signal } from "../signal/Signal.js";
3import { NormalRange } from "../core/type/Units.js";
4export interface StereoWidenerOptions extends MidSideEffectOptions {
5 width: NormalRange;
6}
7/**
8 * Applies a width factor to the mid/side seperation.
9 * 0 is all mid and 1 is all side.
10 * Algorithm found in [kvraudio forums](http://www.kvraudio.com/forum/viewtopic.php?t=212587).
11 * ```
12 * Mid *= 2*(1-width)<br>
13 * Side *= 2*width
14 * ```
15 * @category Effect
16 */
17export declare class StereoWidener extends MidSideEffect<StereoWidenerOptions> {
18 readonly name: string;
19 /**
20 * The width control. 0 = 100% mid. 1 = 100% side. 0.5 = no change.
21 */
22 readonly width: Signal<"normalRange">;
23 /**
24 * Two times the (1-width) for the mid channel
25 */
26 private _twoTimesWidthMid;
27 /**
28 * Two times the width for the side channel
29 */
30 private _twoTimesWidthSide;
31 /**
32 * Mid multiplier
33 */
34 private _midMult;
35 /**
36 * 1 - width
37 */
38 private _oneMinusWidth;
39 /**
40 * Side multiplier
41 */
42 private _sideMult;
43 /**
44 * @param width The stereo width. A width of 0 is mono and 1 is stereo. 0.5 is no change.
45 */
46 constructor(width?: NormalRange);
47 constructor(options?: Partial<StereoWidenerOptions>);
48 static getDefaults(): StereoWidenerOptions;
49 dispose(): this;
50}