Envelope generators—ADSR video

Let me know how you like this one!

This entry was posted in Envelope Generators, Synthesizers, Video. Bookmark the permalink.

6 Responses to Envelope generators—ADSR video

  1. Nice demonstration. Have you ever seen such curve shape controls on an analogue envelope generator? I was motivated by one of your previous posts to work out how the circuit for such a control might work, and it turns out to be surprisingly simple. I can post a schematic if you are interested.

    • Nigel Redmon says:

      I don’t know of any, Chris. It would be interesting to see. I suppose that the easiest part would be the attack, at least to the point that the supply voltage will allow, without doing something more sophisticated. BTW, something I didn’t mention in the video is that in hardware synths, even if the release is allowed to decay to a perfect exponential, it’s still going to be a truncated exponential, effectively, in practical synths, because the VCA will be biased off just a bit to ensure it’s not leaking.

      • See http://www.chris-j.co.uk/miscfiles/envelopeshape.png

        This isn’t a complete envelope generator, just the current source (for attack) and sinks (for decay and release) that charge and discharge the timing capacitor. Just the attack source is connected to the capacitor in the schematic; in reality all three would need to be connected to the capacitor in sequence – perhaps with analogue switches, and a couple of flip-flops to control which phase the envelope was in.

        The basic idea in the typical envelope circuit is that in (for example) the release stage of an envelope, a capacitor discharges through a (variable) resistor to ground. This resistor can be thought of as a voltage-controlled current sink. By using a standard voltage-controlled current sink (U6, Q5, R9) and with the pot (R7,R8) turned so that the non-inverting input of U6 is receiving the envelope output, we would get exactly the same behaviour, and an exponential release. However, with the pot (R7,R8) turned so that U6 receives the sustain level voltage, we get a constant current sink, and a linear release. Intermediate values give the initial segment of an exponential decay — one that tends to the voltage -V_sustain*R7/R8. (Note that this could well be below the negative rail). The decay phase works similarly.

        The attack phase is slightly trickier. Because the curvature of the attack phase is of the opposite sign, we need to reference the current sink against the maximum envelope voltage and vary the low side of the timing pot (which requires the buffer U3). In addition, since we require a current source for the attack phase, a current mirror (the matched PNP pair Q2, Q3) is required to convert a voltage-controlled current sink (U1,Q1,R1) into a voltage-controlled current source.

        I haven’t wired this up into a real circuit; it may be that getting the desired wide range of attack/decay times and glitch-free output is less easy with this schematic than traditional exponential-only circuits. Nonetheless, it seems striking how similar the analogue computations done here using op-amps are to their software equivalents.

  2. Alfonso says:

    Hi Nigel! Thanks for this great video. Is there any source code (javscript or java i guess) for the ADSR applet in the video?
    I’m trying to figure out how to make variable curve slope for Decay and Release. For Attack i just did something like
    0<=x<=AttackTime;
    y = (x/AttackTime)^(2^(slope)).
    This way when slope=0 the segment is linear.
    But i can't figure out the math for Decay and Release.
    thanks!
    a.

  3. Tom says:

    Hey Nigel,

    many many thanks for these articles and for sharing your knowledge, so helpful!

Leave a Reply

Your email address will not be published. Required fields are marked *