Envelopes in PD

Temporal envelopes are an essential building block of sound synthesis algorithms. They are introduced in the Control Section of the CMB content:


The ADSR envelope is the most widely used temporal envelope. The PD help files contain an example, which can serve as a starting point for an ADSR object. It can also be downloaded here: ADSR


Open the example or download the patch and store the object in your working directory.

Once stored, the object can be used in custom patches to control arbitrary parameters. The following example controls the gain of a sine wave oscillator with an ADSR envelope. The adsr object has six inlets:

  • 1: the trigger

  • 2: the peak value

  • 3: the attack time (ms)

  • 4: the decay time (ms)

  • 5: the sustain amount (0...100%)

  • 6: the release time (ms)

The delay object emulates a 555 ms key press. The only outlet is an audio rate signal with the envelope:



Add a second ADSR with individual parameters to control the pitch of the tone.