AudioParam Class
A parameter of an AudioNode (https://webaudio.github.io/web-audio-api/#AudioParam): its value can be set directly, automated with events scheduled on the timeline of the context, and modulated by the outputs of nodes connected to it (summed with the intrinsic value).
public sealed class AudioParamProperties
| Name | Description |
|---|---|
| AutomationRate | Gets or sets the automation rate (a-rate: computed for each sample frame; k-rate: once per render quantum). |
| DefaultValue | Gets the initial value of the parameter. |
| MaxValue | Gets the maximum of the nominal range. |
| MinValue | Gets the minimum of the nominal range. |
| Value | Gets or sets the value of the parameter: the intrinsic value at the start of the current render quantum, clamped to the nominal range. Setting it schedules a change of the value at the current time of the context. |
AutomationRate
AudioParam.csGets or sets the automation rate (a-rate: computed for each sample frame; k-rate: once per render quantum).
public AutomationRate AutomationRate { get; set; }Property value
Exceptions
DomException- The rate of the parameter cannot be changed (an
InvalidStateError).
See also
DefaultValue
AudioParam.csGets the initial value of the parameter.
public float DefaultValue { get; }MaxValue
AudioParam.csGets the maximum of the nominal range.
public float MaxValue { get; }MinValue
AudioParam.csGets the minimum of the nominal range.
public float MinValue { get; }Value
AudioParam.csGets or sets the value of the parameter: the intrinsic value at the start of the current render quantum, clamped to the nominal range. Setting it schedules a change of the value at the current time of the context.
public float Value { get; set; }Methods
| Name | Description |
|---|---|
| CancelAndHoldAtTime(double) | Cancels the events after a time, and holds the value the automation has at that time. |
| CancelScheduledValues(double) | Cancels the events at or after a time. |
| ExponentialRampToValueAtTime(float, double) | Schedules an exponential ramp from the previous event to a value at a time. |
| LinearRampToValueAtTime(float, double) | Schedules a linear ramp from the previous event to a value at a time. |
| SetTargetAtTime(float, double, float) | Schedules an exponential approach to a target value from a time. |
| SetValueAtTime(float, double) | Schedules a change of the value at a time. |
| SetValueCurveAtTime(IReadOnlyList<float>, double, double) | Schedules a curve of values, linearly interpolated, from a time for a duration. |
CancelAndHoldAtTime(double)
AudioParam.csCancels the events after a time, and holds the value the automation has at that time.
public AudioParam CancelAndHoldAtTime(double cancelTime)CancelScheduledValues(double)
AudioParam.csCancels the events at or after a time.
public AudioParam CancelScheduledValues(double cancelTime)ExponentialRampToValueAtTime(float, double)
AudioParam.csSchedules an exponential ramp from the previous event to a value at a time.
public AudioParam ExponentialRampToValueAtTime(float value, double endTime)Parameters
Returns
See also
LinearRampToValueAtTime(float, double)
AudioParam.csSchedules a linear ramp from the previous event to a value at a time.
public AudioParam LinearRampToValueAtTime(float value, double endTime)Parameters
Returns
See also
SetTargetAtTime(float, double, float)
AudioParam.csSchedules an exponential approach to a target value from a time.
public AudioParam SetTargetAtTime(float target, double startTime, float timeConstant)Parameters
Returns
See also
SetValueAtTime(float, double)
AudioParam.csSchedules a change of the value at a time.
public AudioParam SetValueAtTime(float value, double startTime)Parameters
Returns
See also
SetValueCurveAtTime(IReadOnlyList<float>, double, double)
AudioParam.csSchedules a curve of values, linearly interpolated, from a time for a duration.
public AudioParam SetValueCurveAtTime(IReadOnlyList<float> values, double startTime, double duration)