AbstractParam < Type >

Abstract base class for Param and Signal

Type Parameter

Hierarchy

    • AbstractParam

Properties

convert #

boolean

If the value should be converted or not

maxValue #

number

The maximum value of the output given the units

minValue #

number

The minimum value of the output given the units

overridden #

boolean

True if the signal value is being overridden by a connected signal. Internal use only.

value #

Type

The current value of the parameter. Setting this value is equivalent to setValueAtTime(value, context.currentTime)

Methods

cancelAndHoldAtTime #

This is similar to cancelScheduledValues except it holds the automated value at time until the next automated event.

cancelAndHoldAtTime (
time:Time
) => this

cancelScheduledValues #

Cancels all scheduled parameter changes with times greater than or equal to startTime.

cancelScheduledValues (
time:Time
) => this

exponentialApproachValueAtTime #

Start exponentially approaching the target value at the given time. Since it is an exponential approach it will continue approaching after the ramp duration. The rampTime is the time that it takes to reach over 99% of the way towards the value. This methods is similar to setTargetAtTime except the third argument is a time instead of a 'timeConstant'


//exponentially ramp to the value 2 over 4 seconds.
signal.exponentialRampTo(2, 4);
exponentialApproachValueAtTime (
value:Type ,

The value to ramp to.

time:Time ,

When the ramp should start.

rampTime:Time

the time that it takes the value to ramp from it's current value

) => this

exponentialRampTo #

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.


//exponentially ramp to the value 2 over 4 seconds.
signal.exponentialRampTo(2, 4);
exponentialRampTo (
value:Type ,

The value to ramp to.

rampTime:Time ,

the time that it takes thevalue to ramp from it's current value

startTime?:Time

When the ramp should start.

) => this

exponentialRampToValueAtTime #

Schedules an exponential continuous change in parameter value from the previous scheduled parameter value to the given value.

exponentialRampToValueAtTime (
value:Type ,
time:Time
) => this

getValueAtTime #

Get the signals value at the given time. Subsequent scheduling may invalidate the returned value.

getValueAtTime (
time:Time

When to get the value

) => Type

linearRampTo #

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.


//linearly ramp to the value 4 over 3 seconds.
signal.linearRampTo(4, 3);
linearRampTo (
value:Type ,

The value to ramp to.

rampTime:Time ,

the time that it takes thevalue to ramp from it's current value

startTime?:Time

When the ramp should start.

) => this
this

linearRampToValueAtTime #

Schedules a linear continuous change in parameter value from the previous scheduled parameter value to the given value.

linearRampToValueAtTime (
value:Type ,
time:Time
) => this

rampTo #

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


//ramp to the value either linearly or exponentially
//depending on the "units" value of the signal
signal.rampTo(0, 10);

//schedule it to ramp starting at a specific time
signal.rampTo(0, 10, 5)
rampTo (
value:Type ,
rampTime:Time ,

The time that it takes the value to ramp from it's current value

startTime?:Time

When the ramp should start.

) => this

setRampPoint #

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.


param.getValueAtTime(Tone.now())
setRampPoint (
time:Time

When to add a ramp point.

) => this

setTargetAtTime #

Start exponentially approaching the target value at the given time with a rate having the given time constant.

setTargetAtTime (
value:Type ,
startTime:Time ,
timeConstant:number
) => this

setValueAtTime #

Schedules a parameter value change at the given time. Does this work? is this working. are you working?


//set the frequency to "G4" in exactly 1 second from now.
freq.setValueAtTime("G4", "+1");
setValueAtTime (
value:Type ,

The value to set the signal.

time:Time

The time when the change should occur.

) => this

setValueCurveAtTime #

Sets an array of arbitrary parameter values starting at the given time for the given duration.

setValueCurveAtTime (
values:Type [] ,
startTime:Time ,
duration:Time ,
scaling?:undefined | number

If the values in the curve should be scaled by some value

) => this

targetRampTo #

Start exponentially approaching the target value at the given time. Since it is an exponential approach it will continue approaching after the ramp duration. The rampTime is the time that it takes to reach over 99% of the way towards the value.


//exponentially ramp to the value 2 over 4 seconds.
signal.exponentialRampTo(2, 4);
targetRampTo (
value:Type ,

The value to ramp to.

rampTime:Time ,

the time that it takes thevalue to ramp from it's current value

startTime?:Time

When the ramp should start.

) => this