Skip to content
saugns v0.5.1. Add ADSR envelope to sweepable parameters.

Language changes:
 * Parameter envelopes. Implement ADSR envelope, add to every
   sweepable parameter. This uses list heading subparameters,
   under the new `.e` (envelope) subparameter which has a new
   sweepable secondary value (like that for value range `.r`,
   but for an envelope as a stage applied after, similarly).
   The envelope secondary value also accepts modulators in
   the list as does the long-form value range secondary value.
   - Add `a`, `d`, `s`, `r` subparameters within `.e[...]` --
     these can be used alongside the sweep subparameters.
     Also add `e` for further envelope-specific settings.
   - Add line selection `.l` sub-subparameter for each timed
     subparameter (`a`, `d`, and `r`), as well as `e` for
     setting all of them (overridden by the others if used
     at the same time) as in `e.lcos`.
   - Add 4 modes which can be toggled under `e`, default `ec`:
     `0` (off), `c` (clamp stage times to fit note duration,
     shortening stage trajectories without cutting them off),
     `l` (loop envelope instead of triggering when time set),
     `t` (truncate envelope trajectory if times are too long).
 * Remove long-deprecated sweep subparameter `r` (now `l`).
 * Phase distortion synthesis. Make the secondary parameter
   values default to the do-nothing values if not zero. Makes
   PD envelopes and value range modulation simpler to use.

Support an ADSR envelope for each of the parameters allowing
value ranges and sweeps (most). It triggers and runs anew with
each new time duration set to the main `t` parameter for the
generator the parameter belongs to. Each `;` for the generator
implicitly sets `t` and thus triggers the envelope.

For modulators, if time is implicit/indefinite (default `ti`)
then the envelopes for parameters trigger with the closest
carrier having its time set. Thus a single `;` for a carrier
can trigger envelopes for a nested structure of oscillators.

Prune example scripts, tweak some old ones adding envelopes.

Performance tweaks to phaseshaping code, replace floorf().