Tone.TimelineSignal
↳ EXTENDS Tone.ParamA signal which adds the method getValueAtTime. Code and inspiration from https://github.com/jsantell/web-audio-automation-timeline
CONSTRUCTOR
new Tone.TimelineSignal ( [The initial value of the signal
The conversion units of the signal.
Members
Methods
.cancelScheduledValues ( )
#this
Cancels all scheduled parameter changes with times greater than or equal to startTime.
.connect ( )
#The output number to connect from.
The input number to connect to.
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.
.setTargetAtTime ( )
#this
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");.setValueCurveAtTime ( )
#If the values in the curve should be scaled by some value
this
Set an array of arbitrary values starting at the given time for the given duration.
.exponentialRampToValueAtTime ( )
#Schedules an exponential continuous change in parameter value from the previous scheduled parameter value to the given value.
.exponentialRampToValueBetween ( )
#The value to ramp to.
The beginning anchor point to do the exponential ramp
The ending anchor point by which the value of the signal will equal the given value.
this
Do a exponential ramp to the given value between the start and finish times.
.getValueAtTime ( )
#Get the scheduled value at the given time. This will return the unconverted (raw) value.
.linearRampToValueAtTime ( )
#Schedules a linear continuous change in parameter value from the previous scheduled parameter value to the given value.
.linearRampToValueBetween ( )
#The value to ramp to.
The beginning anchor point to do the linear ramp
The ending anchor point by which the value of the signal will equal the given value.
this
Do a linear ramp to the given value between the start and finish times.
.setRampPoint ( )
#When to set the ramp point
this
Sets the computed value at the given time. This provides a point from which a linear or exponential curve can be scheduled after. Will cancel events after the given time and shorten the currently scheduled linear or exponential ramp so that it ends at time . This is to avoid discontinuities and clicks in envelopes.
.exponentialRampToValue ( )
#The value to ramp to.
the time that it takes the value to ramp from it’s current value
When the ramp should start.
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);.rampTo ( )
#The time that it takes the value to ramp from it’s current value
When the ramp should start.
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);
EXAMPLE
//schedule it to ramp starting at a specific time
signal.rampTo(0, 10, 5).linearRampToValue ( )
#The value to ramp to.
the time that it takes the value to ramp from it’s current value
When the ramp should start.
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);