Tone.Scale

↳ EXTENDS Tone.SignalBase

Performs a linear scaling on an input signal. Scales a NormalRange input to between outputMin and outputMax.

CONSTRUCTOR

new Tone.Scale ( [
outputMin
= 0 ] , [
outputMax
= 1 ] )
outputMin

The output value when the input is 0.

type: number
default: 0
outputMax

The output value when the input is 1.

type: number
default: 1

EXAMPLE

var scale = new Tone.Scale(50, 100);
var signal = new Tone.Signal(0.5).connect(scale);
//the output of scale equals 75

Members

.max

number #

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

</>

.min

number #

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

</>

Methods

.dispose ( )

#
↪ returns Tone.Scale

this

Clean up.

</>
inherited from Tone.SignalBase

.connect ( )

#
node
type: AudioParam or AudioNode or Tone.Signal or Tone
outputNumber

The output number to connect from.

type: number
default: 0
inputNumber

The input number to connect to.

type: number
default: 0
↪ returns Tone.SignalBase

this

When signals connect to other signals or AudioParams, they take over the output value of that signal or AudioParam. For all other nodes, the behavior is the same as a default connect.

</>
docs generated Sep 15 2019