Module Audio.Param

Audio parameters.

module Automation_rate : sig ... end

Automation rate enumeration.

type descriptor

The type for AudioParamDescriptor objects.

val descriptor : ?⁠automation_rate:Automation_rate.t -> ?⁠min_value:float -> ?⁠max_value:float -> ?⁠default_value:float -> Jstr.t -> descriptor

create name is an audio parameter descriptor with given properties.

type t

The type for AudioParam objects.

val value : t -> float

value p is the value of p.

val set_value : t -> float -> unit

set_value p v sets the value of p to v.

val automation_rate : t -> Automation_rate.t

automation_rate p is the automation rate of p.

val set_automation_rate : t -> Automation_rate.t -> unit

set_automation_rate p r sets the automation_rate of p to r.

val default_value : t -> float

default_value p is the default value of p.

val min_value : t -> float

min_value p is the minimal value of p.

val max_value : t -> float

max_value p is the maximal value of p.

val set_value_at_time : t -> value:float -> time:float -> unit

set_value_at_time p ~value ~time sets p's value to value at time time.

val linear_ramp_to_value_at_time : t -> value:float -> end_time:float -> unit

linear_ramp_to_value_at_time p ~value ~end_time sets p's value to value at time end_time by linearly changing it starting from the previous event.

val exponential_ramp_to_value_at_time : t -> value:float -> end_time:float -> unit

exponential_ramp_to_value_at_time p ~value ~time sets p's value to value at time end_time by exponentially changing it starting from the previous event.

val set_target_at_time : t -> target:float -> start_time:float -> decay_rate:float -> unit

set_target_at_time p ~value ~time ~decay_rate transition p's value towards value at time time.

val set_value_curve_at_time : t -> Brr.Tarray.float32 -> start_time:float -> dur_s:float -> unit

set_value_curve_at_time p vs ~start_time ~dur_s transitions p's values through vs during dur_s seconds starting at time start_time.

val cancel_scheduled_values : t -> time:float -> unit

cancel_scheduled_value p ~time cancels scheduled changes to p.

val cancel_and_hold_at_time : t -> time:float -> unit

cancel_and_hold_at_time p ~time cancels scheduled changes to p and holds the value at the given time.