UNPKG

1.29 kBTypeScriptView Raw
1import { Scale, ScaleOptions } from "./Scale.js";
2import { Positive } from "../core/type/Units.js";
3export interface ScaleExpOptions extends ScaleOptions {
4 exponent: Positive;
5}
6/**
7 * Performs an exponential scaling on an input signal.
8 * Scales a NormalRange value [0,1] exponentially
9 * to the output range of outputMin to outputMax.
10 * @example
11 * const scaleExp = new Tone.ScaleExp(0, 100, 2);
12 * const signal = new Tone.Signal(0.5).connect(scaleExp);
13 * @category Signal
14 */
15export declare class ScaleExp extends Scale<ScaleExpOptions> {
16 readonly name: string;
17 /**
18 * The exponent scaler
19 */
20 private _exp;
21 /**
22 * @param min The output value when the input is 0.
23 * @param max The output value when the input is 1.
24 * @param exponent The exponent which scales the incoming signal.
25 */
26 constructor(min?: number, max?: number, exponent?: number);
27 constructor(options?: Partial<ScaleExpOptions>);
28 static getDefaults(): ScaleExpOptions;
29 /**
30 * Instead of interpolating linearly between the {@link min} and
31 * {@link max} values, setting the exponent will interpolate between
32 * the two values with an exponential curve.
33 */
34 get exponent(): Positive;
35 set exponent(exp: Positive);
36 dispose(): this;
37}