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);
Constructor
Section titled “Constructor”new ScaleExp(min?: number, max?: number, exponent?: number)Parameters
-
min
numberoptionalThe output value when the input is 0.
-
max
numberoptionalThe output value when the input is 1.
-
exponent
numberoptionalThe exponent which scales the incoming signal.
new ScaleExp(options?: Partial<ScaleExpOptions>)Parameters
- options
Partial<ScaleExpOptions>optional
Properties
Section titled “Properties”↳ inherited from Scale
input: InputNodeThe input node or nodes. If the object is a source, it does not have any input and this.input is undefined.
output
Section titled “output”↳ inherited from Scale
output: OutputNodeThe output nodes. If the object is a sink, it does not have any output and this.output is undefined.
exponent
Section titled “exponent”exponent: number↳ inherited from Scale
max: numberThe maximum output value. This number is output when the value input value is 1.
↳ inherited from Scale
min: numberThe minimum output value. This number is output when the value input value is 0.
Methods
Section titled “Methods”connect()
Section titled “connect()”↳ inherited from SignalOperator
connect(destination: InputNode, outputNum?: number, inputNum?: number): thisconnect the output of a ToneAudioNode to an AudioParam, AudioNode, or ToneAudioNode
Parameters
-
destination
InputNodeThe output to connect to
-
outputNum
numberoptional default0The output to connect from
-
inputNum
numberoptional default0The input to connect to
Returns this
getDefaults()
Section titled “getDefaults()”static
getDefaults(): ScaleExpOptionsReturns all of the default options belonging to the class.
Returns ScaleExpOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), disconnect(), fan(), toDestination(), toMaster()