Envelopes

Attach, Decay, Sustain, Release

This lecture explains envelopes: what they are, how to synthesise them and how to measure the envelopes of existing audio signals. It covers linear envelopes (ramps) and exponential envelopes. ADSR (attack-decay-sustain-release) envelopes will be covered in a later lecture.

Table of contents

  1. What you’ll learn in this lecture
  2. What you’ll make in this lecture
  3. Code examples
  4. Recommended parts
  5. Further reading

Lecture 12: Envelopes

What you’ll learn in this lecture

  • Linear and exponential envelopes
  • Generating ramps by counting samples
  • Finding the envelope of an audio signal

What you’ll make in this lecture

  • A ramp-controlled filter (several versions)
  • A simple percussion instrument
  • An envelope follower auto-wah effect

Code examples

Find the code examples here

ramp-filter: Template project providing a wavetable oscillator and filter. The task is to generate a linear envelope to change the cutoff frequency of the filter. Later in the lecture, analog controls are added.

ramp-filter-class: The same idea as ramp-filter but with the envelope moved into a class. The task is to implement Ramp.cpp.

percussion: A simple percussion instrument to be completed with an exponential envelope and a pushbutton attached to a digital instrument.

envelope-follower: Template for creating an auto-wah effect where the cutoff frequency of a resonant filter tracks the envelope of the incoming audio signal.

Running the examples in this course assumes that you have a Bela Starter Kit or Bela Mini Starter Kit. Note that the analog outputs are only available on the original Bela board, and not on Bela Mini.

This lecture also uses several electronic components:

Further reading

More information on calculating envelopes can be found in Chapter X of this textbook:

  • Joshua D. Reiss and Andrew McPherson, Audio Effects: Theory, Implementation and Application. Publisher link.