next up previous contents index
Next: Linear and Curved Amplitude Up: Automation and voice management Previous: Automation and voice management   Contents   Index


Envelope Generators

An envelope generator (sometimes, and more justly, called a transient generator) makes an audio signal that smoothly rises and falls as if to control the loudness of a musical note as it rises and falls. (Envelope generators were first introduced in section 1.5.) Amplitude control by multiplication (figure 1.4 is the most direct, ordinary way to use an envelope generator, but there are many other uses.

Envelope generators have come in many forms over the years, but the simples and the perennial favorite is the ADSR envelope generator. ``ADSR" is an acronym for ``Attack, Decay, Sustain, Release", the four segments of the ADSR generator's output. The ADSR generator is controlled by a control stream called a ``trigger". Triggering the ADSR generator ``on" sets off its attack, decay, and sustain segments. Triggering it ``off" sets off the release segment. Figure 4.1 shows how this can appear in block diagrams.

Figure 4.1: ADSR envelope as a block diagram, showing the trigger input (a control stream) and the audio output.
\begin{figure}\psfig{file=figs/fig04.01.ps}\end{figure}

Figure 4.2 shows some possible outputs of an ADSR generator. In part (a) we assume that the ``on" and ``off" triggers are well enough separated that the sustain segment is reached before the ``off" trigger is received. There are five parameters controlling the ADSR generator. First, a level parameter sets the output value at the end of the attack segment (normally the highest value output by the ADSR generator.) Second, an attack parameter gives the time duration of the attack segment, and third, a decay gives the duration of the decay segment. Fourth, a sustain parameter gives the level of the sustain segment, as a fraction of the level parameter. Finally, the release parameter gives the duration of the release segment. These five values, together with the timing of the ``on" and ``off" triggers, fully determines the output of the ADSR generator. For example, the duration of the sustain portion is equal to the time between ``on" and ``off" triggers, minus the durations of the attack and decay segments.

Figure 4.2: ADSR envelope output: (a) with ``on" and ``off" triggers separated; (b), (c) with early ``off" trigger; (d), (e) re-attacked.
\begin{figure}\psfig{file=figs/fig04.02.ps}\end{figure}

Parts (b) and (c) of Figure 4.2 show the result of following an ``on" trigger quickly by an ``off" one: (b) during the release segment, and (c) even earlier, during the attack. The ADSR generator reacts to these situations by canceling whatever remains of the attack and decay segments and continuing straight to the release segment. Also, an ADSR generator may be retriggered ``on" before the release segment is finished or even during the attack, decay, or sustain segments. Part (d) of the figure shows a reattack during the sustain segment, and part (e), during the decay segment.

The classic use of an ADSR envelope is when using a voltage-control keyboard or a sequencer to make musical notes on a synthesizer. Depressing a key (for example) would generate an ``on" trigger and releasing it, an ``off" trigger. The ADSR generator could then control the amplitude of synthesis so that ``notes" would start and stop with the keys. In addition to amplitude, the ADSR generator can (and often is) made to control the timbre of the notes, which can then be made to evolve naturally over the course of each note.


next up previous contents index
Next: Linear and Curved Amplitude Up: Automation and voice management Previous: Automation and voice management   Contents   Index
Miller Puckette 2005-02-21