Tone.IfThenElse
↳ EXTENDS Tone.SignalBaseIfThenElse has three inputs. When the first input (if) is true (i.e. === 1), then it will pass the second input (then) through to the output, otherwise, if it’s not true (i.e. === 0) then it will pass the third input (else) through to the output.
CONSTRUCTOR
new Tone.IfThenElse ( )EXAMPLE
var ifThenElse = new Tone.IfThenElse();
var ifSignal = new Tone.Signal(1).connect(ifThenElse.if);
var pwmOsc = new Tone.PWMOscillator().connect(ifThenElse.then);
var pulseOsc = new Tone.PulseOscillator().connect(ifThenElse.else);
//ifThenElse outputs pwmOsc
signal.value = 0;
//now ifThenElse outputs pulseOsc- dispose
METHODS