Tone.Gate
↳ EXTENDS Tone.AudioNodeTone.Gate only passes a signal through when the incoming signal exceeds a specified threshold. To do this, Gate uses a Tone.Follower to follow the amplitude of the incoming signal. A common implementation of this class is a Noise Gate.
CONSTRUCTOR
new Tone.Gate ( [threshold
] , [ attack
] , [ release
]
)
DEFAULTS
{
attack
:
0.1
,
release
:
0.1
,
threshold
:
-40
}
EXAMPLE
var gate = new Tone.Gate(-30, 0.2, 0.3).toMaster();
var mic = new Tone.UserMedia().connect(gate);
//the gate will only pass through the incoming
//signal when it's louder than -30db
Members
↳ inherited from
Tone.AudioNode
.context
↝ Tone.Context READONLY #Get the audio context belonging to this instance.
Methods
↳ inherited from
Tone.AudioNode
.connect ( )
#
unit
type:
Tone
or
AudioParam
or
AudioNode
outputNum
optionally which output to connect from
type:
number
default:
0
inputNum
optionally which input to connect to
type:
number
default:
0
↪ returns
Tone.AudioNode
this
connect the output of a ToneNode to an AudioParam, AudioNode, or ToneNode
↳ inherited from
Tone.AudioNode
.disconnect ( )
#
output
Either the output index to disconnect if the output is an array, or the node to disconnect from.
↪ returns
Tone.AudioNode
this
disconnect the output
↳ inherited from
Tone.AudioNode
.toMaster ( )
#
↪ returns
Tone.AudioNode
this
Connect ‘this’ to the master output. Shorthand for this.connect(Tone.Master)
EXAMPLE
//connect an oscillator to the master output
var osc = new Tone.Oscillator().toMaster();