Module Envelope

type t = {
  1. attack : float;
  2. decay : float;
  3. sustain : float;
  4. release : float;
}
val percussive : attack:float -> decay:float -> t
val level : t -> held:float -> float -> float
val duration : t -> held:float -> float
val apply : t -> held:float -> Signal.t -> Signal.t
type curve =
  1. | Linear
  2. | Exponential
type stage =
  1. | Idle
  2. | Attack
  3. | Decay
  4. | Sustain
  5. | Release
type running
val start : unit -> running
val gate_on : running -> unit
val gate_off : running -> unit
val fill : curve -> t -> running -> Signal.t -> unit
val stage : running -> stage
val current : running -> float