Tone.Max
↳ EXTENDS Tone.SignalOutputs the greater of two signals. If a number is provided in the constructor it will use that instead of the signal.
CONSTRUCTOR
new Tone.Max ( [Max value if provided. if not provided, it will use the signal value from input 1.
EXAMPLE
var max = new Tone.Max(2);
var sig = new Tone.Signal(3).connect(max);
//max outputs 3
sig.value = 1;
//max outputs 2
EXAMPLE
var max = new Tone.Max();
var sigA = new Tone.Signal(3);
var sigB = new Tone.Signal(4);
sigA.connect(max, 0, 0);
sigB.connect(max, 0, 1);
//output of max is 4.Members
Methods
.exponentialRampToValue ( )
#The value to ramp to.
the time that it takes the value to ramp from it’s current value
this
Schedules an exponential continuous change in parameter value from the current time and current value to the given value over the duration of the rampTime.
EXAMPLE
//exponentially ramp to the value 2 over 4 seconds.
signal.exponentialRampToValue(2, 4);.exponentialRampToValueAtTime ( )
#Schedules an exponential continuous change in parameter value from the previous scheduled parameter value to the given value.
.linearRampToValue ( )
#The value to ramp to.
the time that it takes the value to ramp from it’s current value
this
Schedules an linear continuous change in parameter value from the current time and current value to the given value over the duration of the rampTime.
EXAMPLE
//linearly ramp to the value 4 over 3 seconds.
signal.linearRampToValue(4, 3);.linearRampToValueAtTime ( )
#Schedules a linear continuous change in parameter value from the previous scheduled parameter value to the given value.
.rampTo ( )
#the time that it takes the value to ramp from it’s current value
this
Ramps to the given value over the duration of the rampTime. Automatically selects the best ramp type (exponential or linear) depending on the units of the signal
EXAMPLE
//ramp to the value either linearly or exponentially
//depending on the "units" value of the signal
signal.rampTo(0, 10);.setRampPoint ( )
#(Optionally) pass the now value in.
this
Creates a schedule point with the current value at the current time. This is useful for creating an automation anchor point in order to schedule changes from the current value.
.setTargetAtTime ( )
#Start exponentially approaching the target value at the given time with a rate having the given time constant.
.setValueAtTime ( )
#The value to set the signal.
The time when the change should occur.
this
Schedules a parameter value change at the given time.
EXAMPLE
//set the frequency to "G4" in exactly 1 second from now.
freq.setValueAtTime("G4", "+1");.cancelScheduledValues ( )
#this
Cancels all scheduled parameter changes with times greater than or equal to startTime.
.setValueCurveAtTime ( )
#Sets an array of arbitrary parameter values starting at the given time for the given duration.