Digital Sound & Music: Concepts, Applications, & Science, Chapter 6, last updated 6/25/2013
Figure 6.64 Envelope block stripped down
While it incorporates signal rate objects, the envelope doesn’t actually involve the audio
signal. Its output is purely used for control. Then again, it's possible for the user to connect the
envelope block output to the audio signal path, but it probably won’t sound very good if it even
makes a sound at all. Let’s start with the inlet at the top. In order for an envelope to function
properly, it has to know when to start and when to stop. Typically it starts when someone
triggers a note, such as by playing a key on a keyboard, and releases when the key is let go.
Thinking back to MIDI and how MIDI keyboards work, we know that when a key is pressed, it
sends a Note On command accompanied by a velocity value of between 1 and 127. When the
key is released, it often sends a Note On command with a velocity value of zero. In our case, we
don’t really care what the value is between 1 and 127; we need to start the envelope regardless of
how hard the key is pressed.
This velocity value lends itself to being a good way to tell when to trigger and release an
envelope. It would be useful to condition the input to give us only the two cases we care about:
start and release. There are certainly multiple ways to implement this in MAX, but a simple
if…then object is an easy way to check this logic using one object. The if…then object checks if
Previous Page Next Page