UNPKG

1.42 kBTypeScriptView Raw
1import { InputNode, OutputNode, ToneAudioNode, ToneAudioNodeOptions } from "../../core/context/ToneAudioNode.js";
2import { Decibels } from "../../core/type/Units.js";
3import { Param } from "../../core/context/Param.js";
4export interface LimiterOptions extends ToneAudioNodeOptions {
5 threshold: Decibels;
6}
7/**
8 * Limiter will limit the loudness of an incoming signal.
9 * Under the hood it's composed of a {@link Compressor} with a fast attack
10 * and release and max compression ratio.
11 *
12 * @example
13 * const limiter = new Tone.Limiter(-20).toDestination();
14 * const oscillator = new Tone.Oscillator().connect(limiter);
15 * oscillator.start();
16 * @category Component
17 */
18export declare class Limiter extends ToneAudioNode<LimiterOptions> {
19 readonly name: string;
20 readonly input: InputNode;
21 readonly output: OutputNode;
22 /**
23 * The compressor which does the limiting
24 */
25 private _compressor;
26 readonly threshold: Param<"decibels">;
27 /**
28 * @param threshold The threshold above which the gain reduction is applied.
29 */
30 constructor(threshold?: Decibels);
31 constructor(options?: Partial<LimiterOptions>);
32 static getDefaults(): LimiterOptions;
33 /**
34 * A read-only decibel value for metering purposes, representing the current amount of gain
35 * reduction that the compressor is applying to the signal.
36 */
37 get reduction(): Decibels;
38 dispose(): this;
39}