Hear a Sustained NoteLet's queue separate portions of an envelope for the attack and release portion of a sustaining note.
This applet has two buttons.
The "Attack" button queues the beginning of the envelope.
The "Release" button queues the ending of the envelope.
- Hit the "Attack" button. Notice that the amplitude rises then holds steady at a high level..
- Hit the "Release" button. Notice that the sound dies away.
Here is the source code for this program.