Posted by & filed under Envelope Generators, Projects, Synth DIY.

A CEM 3312 / SSM 2056 clone using cheap PIC microprocessors

This page describes a cheap clone of the CEM 3312 and SSM 2056 voltage-controlled envelope generator chips. Both of these chips include voltage control of A, D, S and R, but both include other inputs too.

The CEM 3312 chip has a input which controls the final envelope output level. This is very handy as a voltage-controlled “envelope depth” when feeding the envelope to a filter, for instance.

The SSM 2056 chip includes a TIME input which shortens the overall time of the A, D and R stages of the envelope. Although this was partly intended as a trim for polyphonic systems, the datasheet for this device suggests that this could be fed the keyboard control voltage in a synthesizer to mimic the way natural percussion instruments typically become less resonant as the pitch gets higher.

I managed to include both of these inputs on my VCADSR. At 0V the TIME CV has no effect, and at 5V the envelope is quickened considerably.

Full details are in the datasheet below, but the envelope times range from 1mS through to 10Secs, in 4 even decades, and all control voltages run from 0-5V.

Finally, there is a digital input which selects either a ‘traditional’ exponential envelope shape, or a early-digital-era linear envelope. After this, I had to stop because I ran out of IO pins on the PIC!

Typical ADSR output

Typical ADSR output

Pinout Diagram

VCADSR pinout

More details

Update: Current Version 7B

I’ve reworked the PWM filter to use a two-stage 4th order Bessel filter. This improves the performance and reduces digital noise on the output. I hadn’t studied filters much before, and the existing design I chose to use originally was a Chebyshev filter which has a steeper rolloff, but not such good high frequency performance. For this application, the rolloff isn’t so important, but high frequency performance definitely is.

Other changes since the previous version 7 include a TRIGGER input, so that the envelope now has both GATE and TRIGGER. It can easily be wired for GATE-only operation if TRIGGER is not required, so nothing is lost.

I also altered the TIME_CV so that it is now unipolar and only shortens the envelope. It runs from 0-5V. This is more like the original SSM2056.

    Related Products

  • VCADSR Envelope Generator 7B

    The VCADSR 7B is a fully voltage-controlled ADSR envelope generator chip. In addition to 0-5V CV control of Attack, Decay, Sustain, and Release, it also includes CV control of output level and includes an overall Time CV for modulation of the envelope time. Download Electric Druid VCADSR 7B Datasheet The datasheet includes example circuit diagrams, example waveforms, and the chip pinout diagram. There are further details on the VCADSR 7B project page.  ...

    More Info Buy Now

21 Responses to “Voltage Controlled ADSR Envelope Generator (VC ADSR 7B)”

  1. Tim

    Hi Tom,

    Just a question on the two-stage 4th order Bessel filte 1khz bessel filter . If i want to fed it with 12v instead of 15v which resistors should change?
    I would like to use the envelope in a 12v system.

    Cheers

    Tim

    Reply
    • Tom Wiltshire

      For a +/-12V supply instead of a +/-15V, you can use the circuit as-is. The op-amps won’t mind. The only sensitive part is the PIC, and its supply comes via voltage regulator anyway. So no problem – go for it!

      Running a +5V supply is a completely different kettle of fish. For a start, it’s a change from a bipolar supply to a unipolar one, so for audio signals, you’ve got a lot of biasing to do. At least for the envelope, we don’t have to worry about that immediately, although you probably will have to when you feed the envelope to a VCA.
      One problem to deal with is that the PIC’s output runs from very close to 0V to very close to 5V. When the op-amps are on much larger supplies, this is no problem, but if the op-amp is on the same 5V supply, the PICs input will make the op-amp clip at the power rails. You might be able to avoid this with a specific low voltage rail-to-rail output op-amp. Microchip make various – makes sense, since many people need something that works well with a PIC.

      Microchip Op-amps

      An alternative solution is to use a passive filter. There’s an example on Page 6 of the LoopEnv datasheet.

      HTH,
      Tom

      Reply
  2. juan carlos rey (whoandcar)

    Hi, thanks for such a brilliant project.
    I am plannig to use it to directly “chop” the wave analog voltage and then insert the result in the Bessel filter, saving the VCA.
    As my sinth goes only to C6 (2093 Hz) I think that the sampling rate is high enough.
    Your opinion?

    Reply
    • Tom Wiltshire

      Interesting idea! If you’re going that route, you’ll have to tweak the filter’s cutoff, which was set around 1KHz, IIRC. The other point to make is that (unless your synth only plays sine waves) although the highest note might be 2093Hz, the harmonics of whatever waveform you’re playing probably go much higher. 10KHz would only be the 5th harmonic of such a note. In such a case, a sample rate of 19.5KHz is getting pretty borderline.
      So, I think you need to experiment with the filter to get the right balance between VCA smoothing and high frequency loss. It’s worth a try to see what happens.

      Reply
  3. graham moore

    I’m just about to build this excellent looking project, just a small correction the Sequential Pro one actually uses CEM3310 for its envelopes.

    Reply
    • Tom Wiltshire

      Ah, I claimed CEM3312, did I? My mistake. The CEM3312 is a slightly more sophisticated chip which also includes a “Peak CV” to control envelope depth. The CEM3310 is just the voltage-controlled envelope without the depth control. Makes sense to use the simpler chip for a non-programmable instrument like the Pro-One, where the “envelope depth” control is just a pot on the front panel.

      Reply
  4. Johan Lundstrom

    If I want to use this circuit as a CEM3310 replacement; Is there any simple way to convert the CV inputs for Attack, Decay, and Release, that are 0V to -5V according to the CEM3310 datasheet?

    Reply
    • Tom Wiltshire

      The easiest way would be to flip the 3310’s time CVs with a unity-gain inverting op-amp. That’d get them into the 0-5V range the VCADSR requires. But it’d need one op-amp per CV, plus the VCADSR chip, and its PWM filtering, so it’s going to be a “daughter board” solution, not a plugin replacement.

      HTH,
      Tom

      Reply
      • Johan Lundstrom

        Thanks for your reply! Can I just use something like a TL084? Will I need resistors, or just feedback to the positive input for each CV? Is it possible to connect the fourth TL084 OP-amp with a resistor to +15V and use it as a voltage follower to supply power for the PIC?

        Reply
        • Tom Wiltshire

          You’ll need two resistors (say 10K) and one op-amp for each CV. There are three that need inverting (Attack, Decay and Release), so that will use three op-amps on your TL084. It’d be the standard configuration like this:
          Inverting op-amp configuration
          Is it possible to use a TL084 to provide 5V for the PIC? I don’t know for sure, I’ve never tried it. It would depend on the amount of current it draws. I suspect it would probably work. If you had a voltage divider of 47K and 100K from ground to 15V, you’d have close enough to 5V at the 47K/100K junction. If you attach the last op-amp to that as a voltage follower, it might work as your 5V supply. Let me know how it goes if you try it!

          Tom

          Reply
  5. Erick

    Hello!
    I’m trying the GATE only operation but I’m having problems with figuring out what type of signal would be the one entering through GATE.
    I was trying to do it with a square signal of 2V peak and frequency around 20khz.
    I would appreciate your assistance a lot.
    Thanks

    Reply
    • Tom Wiltshire

      Hi Erick,

      The GATE signal needs to be 0-5V digital pulses. It represents when a key is pressed down, so 20KHz is much too fast – no-one can press a key 20,000 times a second! The absolute minimum envelope times are 1msec for Attack, Decay, and Release, so the shortest possible envelope will be around 3milliseconds. That means gate inputs faster than 300Hz won’t really work at all. In practice, a few 10s of Hz would be a better upper limit.
      I hope this gets you running!
      Tom

      Reply
  6. dakota melin

    I have a couple roland synths with broken IR3R01 envelope chips and I’ve despaired of finding enough replacements…. is it possible to replace them with this relatively easily? The CV ranges appear the same but I’m wondering about the shape … I’d likely have to replace all of them i suppose?

    -dk

    Reply
  7. colin

    Hi Tom,
    For modular system builds, do you recommend protecting inputs from voltages higher than +5? Would using 5v zener at each input suffice?
    Many thanks for your great docs.
    C

    Reply
  8. Jim Wyatt-Lees

    Hi Tom,

    dumb question time! Am I right in assuming that gate and trigger inputs can be used simultaneously as in my old SH 09?

    Thanks

    JIm

    Reply
    • Tom Wiltshire

      Yes, they can. If you’ve only got Gate available, you should tie the two inputs together. The VCADSR starts the envelope when the TRIGGER goes high, and goes to the Release stage when the GATE goes low. So it doesn’t work with nothing connected to TRIGGER. It’d be a bad idea to leave the pin floating anyway, so it’s kind of a moot point…

      T.

      Reply
  9. Stephen

    Hi there,
    Could you please let us know the details on how to build a replacement for IR3R01 using the VCADSR Envelope Generator 7B chip ?

    Thank you

    Reply
    • Tom Wiltshire

      Hi Stephen,
      Thanks for your comment. It’s not immediately straight-forward, but I’ve been asked about this on a few occasions, so I’ll give it some thought and see if I can put an article together about it at some point. The biggest problem is that the VCADSR needs a filter after it to turn the PWM output back into an analog envelope.

      Regards,
      Tom

      Reply

Leave a Reply

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