soundscrape

A programmatic framework for modular synthesis:
Scheme in the front, C in the back!
< | ^ | > | :>

Overview

Envelopes are used to give sounds dynamic character and to cause them to end. They are defined as discretely sampled functions. Each transition between levels occurs within a specified time, and can be interpolated either linearly, exponentially, or as sine segments.

Common kinds of envelope can be made with the linen, triangle, sine, and perc convenience functions, all of which have the envelope: prefix.

Some kinds of envelope, like adsr and asr, have a sustain portion. You can indicate the index of this level when creating an envelope.

To use an envelope in a synthesis network, use the enveloptor unit generator. See its help for more information.

Usage

<envelope>
[Class]

A class representing an envelope. Has class variables :levels, :times, :curvature, and :sustain. The envelope is described by levels and transition times given in times. As the first element of levels is the starting level, levels is one element longer than times. curvature can be either linear, exponential, or sine. If sustain is positive, it is interpreted as the index into levels of the sustain phase.

Note that an exponential curvature will be worthless if one of the end points of the envelope is 0.

envelope:adsr attack decay sustain release level curve
[Function]

Makes an ADSR envelope. attack, decay, and release are the times (in seconds) of the phases. level is the post-attack height, which will decay to a factor of sustain. The sustain phase is between the delay and release, and responds to a trigger on the enveloptor. Lastly, curve specifies the curvature of the transitions.

envelope:asr attack release level curve
[Function]

Makes an ASR envelope. attack and release are the times (in seconds) of the phases. level is the post-attack height, which will sustain until the trigger is released. curve specifies the curvature of the transitions.

envelope:sine duration level
[Function]

Makes a envelope shaped like the first quarter of a sine wave. The envelope will last duration seconds and peak at level in the middle.

envelope:trapezoid attack sustain release level curve
[Function]

Makes a trapezoidal envelope. attack, sustain, and release are all times (in seconds), and level is the height of the sustain portion of the envelope. curve specifies the curvature of the attack and release phases.

envelope:triangle duration level
[Function]

Makes a triangular envelope, lasting duration seconds and peaking at level in the middle.

< | ^ | > | :>