No matching definitions.

signal/envelope

src/signal/envelope.tur
defstruct

ADSRParams

(defstruct ADSRParams :copy [attack :float decay :float sustain :float release :float])

parameters for an ADSR envelope.

defn

adsr-fixed

(adsr-fixed [params : ADSRParams gate-duration :float])

piecewise-linear ADSR computed analytically for a single note.

paramsADSRParams controlling shape
gate-durationhow long the gate stays on in seconds (float64)

A Signal Function: sig -> (fn [t] envelope-value).

((adsr-fixed (make-struct ADSRParams 0.01 0.1 0.7 0.3) 0.5) (constant 0.0))
defn

adsr-gen

(adsr-gen [params : ADSRParams])

one-shot ADSR with a unit (1.0s) gate duration.

paramsADSRParams controlling envelope shape

A Signal Function returning the ADSR amplitude at time t.

((adsr-gen (make-struct ADSRParams 0.01 0.1 0.7 0.2)) (constant 0.0))
Internal definitions
__adsr_fixed_sample-- compute ADSR envelope value at time t.