Full ADSR envelope generator with only opamp (LM741)
May 18, 2020 16:00 · 827 words · 4 minute read
Ok so it’s a little video to show you the envelope generator I’m working on. Currently, it’s connected to a function generator that is used as a VCO and VCA, to an amp, and the speakers and also a scope to see what’s going on the output. Here we have the two first opamps that shape the input signal and generate a positive and negative gate signal. Then we have the opamp that make the hysteresis, and act a little like a flip/flop, to detect the end of the attack phase. And then an opamp in follower configuration that transmit directly to the two pots, through two opposed diodes to create the attack and decay phases. Then well it’s done.
01:24 - Another follower to have to have a good ouput impedance, and here just a little circuit to shape the signal for my function generator. So here we have the sustain level decay, attack, and release. Let’s try! So we can ear the attack that shows in first, then the decay. And that stop on the sustain level. At last the release delay. So if we try to add more decay. Here, it take more time to arrive to the sustain level. On the contrary if I lower the decay it will stop directly at the end of the attack.
We can also change 02:45 - the sustain level, here I lower it. And like that we can make keys that are actives only on edges. And we can push it to the max too, to have only an attack et a release. Release which we can also lower it at the maximum. And we can see that the sound is immediately stopped. And finally the attack can be really slow, or really short. And so we arrive directly on the sustain level if we take a look at the scope Here, it jump directly to the sustain level, so if I lower a little the sustain, we have a lower level. And if I raise the attack we go up and down to the sustain. Well, I will show you quickly how this circuit works. First of all, the purpose of an envelope generator is, when it has an gate input (that’s it’s name) it will start by generating a slope with a specified duration, the attack.
04:55 - Once the signal reach the top, it will decrease by another specified period, the decay. Then it will stabilize to the sustain level, and when we release the gate, yet another slope to go down to the zero level, of specified duration: release. So my circuit: at first it’s two opamp to shape the input signal. It generate a positive and a negative output, which are used later in the circuit. We start with an hysteresis that act like a flip/flop.
05:48 - So as we can see at each rising edge of the GATE, the flip/flop will be reseted by forcing 15V on the input hence, it will output 15V (if OUT is low enough). So yay 15V, it goes through the diode. Here, because we are forcing 15V the sustain potentiometer is overwritten. And we have 15V here. /IN is at logical zero so the transistor is blocked, hence we have 15V here. As it’s 15V, it goes through this diode. And it can’t go here, as this diode is blocking. So it goes through the diode, to the attack resistance, to charge the capacitor and raise the voltage, like here, in exponential charge. Once OUT reaches the max level it’s detected by by the hysteresis circuit which will flip. Hence we will have -15V here, the diode will be blocked, and this time that’s the sustain voltage that will be used. This transistor is still blocked, so here we have the sustain voltage.
And because 07:32 - the OUT voltage is greater than the sustain voltage (by definition because here OUT is greater than sustain). So the current will go through this diode instead. This transistor is closed, as IN is at a logic 1. So this time it goes through the decay resistance. And it will discharge until it reaches the sustain voltage. Once we release the gate, we have this time this transistor that close, forcing to 0 the input here. This transistor become open, preventing the current to flow back and discharge the capacitor. This transistor became closed, and will charge the capacitor through the release resistor, doing the last step. An other interesting point of this circuit is that if we take the envelope signal just here at the output of the follower, as shown, we don’t have no more a slow rise, and fall made by the capacitor. But instead, directly straight edges, that keep the attack and sustain levels.
09:08 - So it output something like that. So it can be interesting for some stuff I guess. We can still define the attack and sustain level. .