Volume Envelope
fun VolumeEnvelope(attack: () -> Float, decay: () -> Float, sustain: () -> Float, release: () -> Float, gate: () -> Boolean)
Composable for applying an ADSR envelope to the audio signal. Envelope parameters can be provided as lambdas for dynamic control.
Parameters
attack
Lambda returning the attack time in seconds.
decay
Lambda returning the decay time in seconds.
sustain
Lambda returning the sustain level. The value should be between 0.0 and 1.0.
release
Lambda returning the release time in seconds.
gate
Lambda returning the gate signal. true
triggers the attack/decay/sustain phases, false
triggers the release phase.
Composable for applying an ADSR envelope to the audio signal.
Parameters
attack
The attack time in seconds.
decay
The decay time in seconds.
sustain
The sustain level. The value should be between 0.0 and 1.0.
release
The release time in seconds.
gate
The gate signal. true
triggers the attack/decay/sustain phases, false
triggers the release phase.