Skip to content
Tone.js

ScaleExp

class Signal ↳ extends Scale<ScaleExpOptions>

Performs an exponential scaling on an input signal. Scales a NormalRange value [0,1] exponentially to the output range of outputMin to outputMax.

const scaleExp = new Tone.ScaleExp(0, 100, 2);
const signal = new Tone.Signal(0.5).connect(scaleExp);
new ScaleExp(min?: number, max?: number, exponent?: number)

Parameters

  • min number optional

    The output value when the input is 0.

  • max number optional

    The output value when the input is 1.

  • exponent number optional

    The exponent which scales the incoming signal.

new ScaleExp(options?: Partial<ScaleExpOptions>)

Parameters

↳ inherited from Scale

input: InputNode

The input node or nodes. If the object is a source, it does not have any input and this.input is undefined.

read-only

name: string

The name of the class

Default: "ScaleExp"

↳ inherited from Scale

output: OutputNode

The output nodes. If the object is a sink, it does not have any output and this.output is undefined.

exponent: number

Instead of interpolating linearly between the min and max values, setting the exponent will interpolate between the two values with an exponential curve.

↳ inherited from Scale

max: number

The maximum output value. This number is output when the value input value is 1.

↳ inherited from Scale

min: number

The minimum output value. This number is output when the value input value is 0.

↳ inherited from SignalOperator

connect(destination: InputNode, outputNum?: number, inputNum?: number): this

connect the output of a ToneAudioNode to an AudioParam, AudioNode, or ToneAudioNode

Parameters

  • destination InputNode

    The output to connect to

  • outputNum number optional default 0

    The output to connect from

  • inputNum number optional default 0

    The input to connect to

Returns this

↳ inherited from SignalOperator

disconnect(destination: InputNode, outputNum?: number, inputNum?: number): this

disconnect the output

Parameters

  • destination InputNode
  • outputNum number optional default 0
  • inputNum number optional default 0

Returns this

dispose(): this

Dispose and disconnect

Returns this

static

getDefaults(): ScaleExpOptions

Returns all of the default options belonging to the class.

Returns ScaleExpOptions