ADSR Envelope Generator
High quality envelopes
A high-spec mains-operated synthesizer module designed by David Strange
The ADSR generator is designed as a stand alone piece of equipment with the versatility to interface with most of the synthesizers that have access through a patch panel to their VCA's and VCF's. The trigger input may be anything from four to 10 volts and not only that — the output envelope can be scaled between 3.5 to 10 volts, positive or negative going. It is possible using the generator to obtain the following contours:
Attack and decay (AD)
Attack, sustain and release (ASR)
Attack, decay and release (ADR)
Attack, decay, sustain and release (ADSR)
The characteristics are each variable over a wide range and are controlled by one switch and four potentiometers.
The simplest contour available is shown in Fig 1. At the start of the sound the volume rises fairly sharply with time, but soon reaches a peak, and the sound then immediately starts to die away. Usually the decay will last many tens of times longer than the attack.
An example of AD occurs when a piano note is struck and held — the note is there immediately, but dies away over many seconds. All percussive instruments behave in this way, eg, bells, cymbals, glockenspiels, gongs, etc. The attack and decay times of those instruments are fixed; not so with a synthesized sound, where using the envelope generator's attack and decay times can produce infinite sounds — almost the sound of backward tape if the attack is made long and the decay short. When applied to a VCF the same contour can produce staccato sounds.
The ASR contour also shown is typified by a note such as that from a pipe organ, woodwind instrument or bowed violin. The note builds up fairly rapidly but instead of decaying away immediately after the peak, remains constant whilst the energy input is maintained (air in the case of the pipe organ, setting up a standing wave). When the energy input is removed the note decays fairly rapidly.
ADR is a variation on the attack decay contour, but here the decay is allowed to continue for a shorter period of time, not because of the steepness of its slope, but because a steeper release slope is imposed some way down the decay. Fig 2 shows this variant. A piano may achieve this type of note envelope if the key is struck and then released before the note has died away. The felt damper coming into contact with the string increases the decay rate. When applied to the VCA this will definably produce 'fantasy' sounds, but the full ADSR contour can probably be more creatively applied to a VCF.
The notes produced by a trumpet for instance are characterised by a fast build up of harmonics at the start of the note, and once the note is holding the harmonics reduce. The note is more mellow during this period of steady state — then at the end it reduces fairly rapidly. A low pass mode VCF controlled by the contour of Fig 2 will mimic the trumpet effect.
The theory of operation is best described briefly by referring to Fig 3. G1 and G2 are both electronic switches and they are logic controlled, although this is not shown. Normally G1 is closed and G2 is open, but when a voltage is applied to A1, G1 opens and G2 closes so that Ct can be charged through the switch, the attack resistor and D2. After Ct has charged G2 opens again and G1 closes so that the charge on Ct can be removed via D3, the decay resistor, through G1 to 0V (if the output of A2 is at 0V). However, when a sustain voltage is on A2 the charge on C2 will be held at the set voltage until the voltage on A1 is removed. Ct can then fully discharge through D1 and the release resistor to the output of A1 which is at 0V.
Referring to Fig 4, the circuit has two functions, AD and ADSR, and these are selected by SW1 — we shall consider ADSR first. In this mode the keyed potential is applied to A1 of IC3, but its output cannot be used to charge C2, the charging capacitor, until G2 has closed. This happens when the base of Q1 is taken high and Q1 turns on taking the input to the monostable, made up of two NAND gates, low. The output of the monostable when triggered remains low for a short period of time.
On the leading edge of the monostable pulse the state of the toggle, made up of the remaining two NAND gates from the IC1 package, changes turning on G2 and turning off G1. The output voltage from A1 then charges C2 via R11, VR2 and D2. A4 is a voltage follower buffer with an input resistance of many millions of ohms to ensure the voltage drain on C2 is consistent with control settings and not affected by output amplifiers.
The voltage on the output of A4 is an exact low resistance reflection of the voltage on its input and so this is fed to the output amplifiers, which we shall come to, and A3. A3 is a voltage comparator and as the voltage on the capacitor C2 reaches the voltage on the non-inverting input of A3 its output goes low reversing the state of the toggle. G1 is turned on and G2 turned off isolating A1 from R11, VR2 and D2 so that no more charge can be added to C2.
The output of A2, another voltage follower and A1 now have a bearing on what will happen hext. Assuming A1 output is still high D1 will be reversed biased and so no charge will be taken from C2, therefore the only drain path is through D3, VR3 and R13 to the output of A2. If there is a sustain voltage derived from VR5 on the output of A2 the voltage will only drain down until D3 becomes reversed biased. The voltage set by the sustain control will be held until the voltage on the output of A1 disappears and the release begins via the path of D1, VR1 and R9. R10 ensures that some leakage from C2 to 0V occurs to counter any reverse leakage of diodes when no input is keyed.
To reiterate, the whole ADSR sequence starts at the beginning of a keyed input with the preset attack and decay — the sustain is held whilst the key is held and release occurs when the key is released.
IC4 is a variable gain differential amplifier whose purpose is to scale the output, using preset VR7, to suit any particular synthesizer and also, by the voltage derived from preset VR6, remove any offset voltage from the envelope. IC4 inverts the envelope and so, to obtain a positive going envelope, inverting amplifier IC5 is applied as a unity gain amplifier.
With SW1 in the AD position the envelope generator will trigger when keyed but otherwise will be independent of key release. VR5 needs to be set at 0V.
Briefly, when keyed, G1 opens and G2 closes as before. After the voltage on C2 compares with the voltage on the noninverting input of A3, G1 closes and G2 opens decaying the voltage on C2 to the output of A2. The change in states of G1 and G2 is independent of everything except voltage, and because the charging voltage from A1 is now fixed, key release time during the envelope duration is inconsequential.
For clarity the power supply and its connections to the IC's is shown as part of Fig 4. TR1 is an isolating transformer with two secondary 12V windings. The centre tap is taken to 0V and the open ends of the windings to full wave rectifier BR1. The raw DC is then smoothed by C3 on the positive rail and C4 on the negative rail to supply IC4 and IC5. IC1 and IC2 supplies must not exceed 18V, therefore ZD1 and ZD2 through R26 and R27 respectively set and stabilise their supply to 16V. IC3 is connected to the same stabilised section of the supply for convenience along with any potential dividers deriving reference voltages. C5 and C6 apply a degree of extra smoothing to the stabilised supply.
A printed circuit board has been designed for this project and the component overlay on the PCB is shown in Fig 5.
Start the construction by inserting all the printed circuit pins and then insert the IC holders. It is best to solder only two pins to each of the IC holders at first, then examine the component side to ensure the socket is seated properly. Complete soldering of the sockets can then be accomplished leaving both hands free.
A good frame of reference should now have emerged when referring to the component overlay for the insertion of all other components. Leave insertion of control potentiometers until last if PCB mounting types are used as these may make loading of other components difficult. If PC mounting potentiometers are not available pins should be inserted into the board and flying leads attached.
Ensure that you have inserted all the components in their correct positions and orientations and also check for solder links that may accidentally be bridging tracks.
A box should be chosen for the project especially as a mains supply is involved. A plastic type is probably best because it is easy to machine and has the added advantage of being insulating.
Do not forget to make provision for strain relief on the mains cable where it enters the enclosure to prevent the live cable being accidentally tugged free.
Pay particular attention to all the mains wiring you carry out inside the box. Keep the wires as short and as tidy as possible and place a plastic sleeve over any tags and wires carrying mains voltages. Do not allow low voltage wires to become entangled with those carrying mains.
Before inserting the IC's into their sockets apply mains to the unit and ensure the power supply is functioning correctly by measuring the positive and negative rails relative to 0V (see Fig 4). If the voltages are correct switch off and insert IC's.
It is now necessary to scale the output appropriate to your particular requirements, remove any standing offset voltage and set the maximum sustain level.
Starting with the sustain level, VR5 should be adjusted fully clockwise so that VR4 the preset can be used to set the maximum sustain level voltage to match that of the attack peak. This can be done relatively easily using a DC voltmeter to monitor the output voltage from SK3 whilst triggering the generator which should be switched to the ADSR mode. Adjust VR4 until the decay trough just disappears. Long time constants should be used to avoid meter ballistics being significant to the measurements.
The offset voltage on the output can next be removed and to do this the keying voltage should be taken to zero. When the output of the generator has fully decayed, VR6 should be adjusted to give zero volts on the meter. A more sensitive range may be selected on the meter to complete the adjustment.
Scaling can be accomplished by holding the sustain and adjusting VR7 to obtain an output suitable for your synthesizer. After scaling the offset voltage must be checked and adjusted again if necessary.
Feature by David Strange
Previous article in this issue:
Next article in this issue:
mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.
If you value this resource, you can support this project - it really helps!