# Simple amplitude modulation of a square wave oscillator

I'm in the process of creating a classwide project for an introduction to op-amp and transistors. My goal is to create a 49 keys synth that every students can contribute a small part, run test plan and follow standard layout procedure.

I want to implement a simple attack release envelope right after the oscillator output to give more depth of sound and create a variety of circuits.

From a mathematical perspective, it is easy to understand. You multiply the normalized enveloppe (0-100%) to the actual oscillator signal.

For now, it was easy to get a RC circuits generating the AR signal required. However, I'm currently stuck in the combination of the AR and the oscillator.

Bellow is my high level bloc diagram of one key

I came across different solutions and they mostly played around voltage controlled amplifiers and voltage controlled resistors. The few circuits that I came accross were too complicated for the students (given that the circuit will be repeated 49 times and that even for do once it was rather complex) or simply created the AR waveform, but didn't show how to combine it with the input signal.

I therefore seek help in finding a quick and dirty solution to merge an AR enveloppe with my oscillator. It might be really rough, really imperfect, but keep in mind that it is a mean to get students interested and to tackle a large scale project and learn various techniques along the way.

Edit: rough schematic base on Jonk comment

simulate this circuit – Schematic created using CircuitLab

I didn't calculate any of the values yet. The idea: detect the envelope of the square wave and compare it to 1v if the square wave is present the comparator will trigger...otherwise the line will read 0v (the key button will not let the oscillating signal through). I feed this to a RC network that is different depending on charge or discharge. Finally I get to my VCA.

The problem is: the VCA can't go bellow Av=1 (non inverting configuration in the application note) and I would probably need a range of Av = 0 to 1. I could scale it down afterward (example Av is 1 to 100) and then I put it into a 1/100 divider so that the range become 0.01 to 1. If you have further ideas, don't hesitate to comment bellow.

• The ADSR doesn’t sit behind every key output, it sits behind the mixed sum of all the keys and hence there is only one circuit and not a multitude. – Andy aka May 10 at 17:15
• So, you are saying that by superposition, each note (read here frequency) will get it's own ADSR effect all induced by a single ADSR circuit? If that is the case, then indeed it changes a lot of things in my design! – Simon Marcoux May 10 at 19:31
• However on a pedagogic level, I will also want this circuit with a single note too. The reason is that each student couldwork alone if I don't want them to do a huge ''team project'' and simply do a single note with AR (ADSR is too complex of a circuit for them). – Simon Marcoux May 10 at 19:34
• @SimonMarcoux AP-6603 discusses variable gain using JFETs. Perhaps the control voltage for attack (and release) could come from two RC pairs? Just wondering out loud. – jonk May 10 at 20:29
• Or simply one RC pair directly driving the JFET using the negative rail of the op-amp to provide the negative voltage. I could use a comparator to provide the charging voltage and then pull it down to provide the discharge path or something like that. Most of those circuit bits are within the range of what they can plug or understand. Students calculation level is rather low, but they can still put together circuit slightly above their comprehension range. I'll try to work on a schematic tonight once the kiddos are gone to bed. – Simon Marcoux May 10 at 22:54