ADSR using vline~

The [vline~] Pd object is well suited to use as an ADSR envelope generator. This patch uses the ADSR to modulate the amplitude of a [phasor~] object signal generator, but can be used to affect other attributes of a sound source as well. The first four sliders in the patch control the attack, decay, sustain, and release times. These sliders use a percentage of the segment length, thus the segment length slider must be in a non zero position in order for the ADSR sliders to register any amount of time. The attack level slider controls the maximum level at which the attack rises. The sustain level slider is pretty self explanatory. And the note volume acts as a master volume affecting all segments. The basic operation inside [pd adsr] is divided into three parts: calculate the ADSR times, load these times into [pack] objects, and feed these lists to the [vline~] object. The volume control in this case is controlled by the [*~] signal multiply object which multiplies the sound signal by the envelope signal.

Link to Pd patch



Filed under Pure Data

4 responses to “ADSR using vline~

  1. jong

    useful patch, thanks!

  2. Hi! This is a really great patch. I’m trying to use this in combination with my midi keyboard. The only thing I’m struggling with is that I don’t want to trigger the release until I actually let go of the key on the keyboard… I think I have to change segment_length into something else, but I don’t know what to replace it with. Help please?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s