Attack Decay Sustain Release
This lecture covers the ADSR (attack-decay-sustain-release) envelope, implemented using state machines.
Table of contents
Lecture 14: ADSR
What you’ll learn in this lecture
- The ADSR (attack-decay-sustain-release) envelope
- Implementation using state machines and line segments
- Class-based implementations
What you’ll make in this lecture
- ADSR envelope generator controlled by a button
- ADSR with linear or exponential segments
adsr: Template for implementing the ADSR based on the Ramp class covered Lecture 12, which generates individua line segments.
adsr-class: Container code for implementing the ADSR in its own self-contained class. The class definition is given in ADSR.h and your task is to fill in the code in ADSR.cpp. After that, two ADSR objects can be used in render.cpp to control amplitude and filter.
Running the examples in this course assumes that you have a Bela Starter Kit or Bela Mini Starter Kit.
- Solderless breadboard (Rapid, Adafruit)
- 1x pushbutton (Rapid, Adafruit)
- 1x 10k resistor (Rapid, Adafruit)
- Jumper wires (Rapid, Adafruit)