80s sounds
The voice of an early-80s polysynth, built from parts, one circuit a lesson: an oscillator, a four-pole OTA filter, an envelope into an OTA amp, and an arpeggiator made from noise. Every note in the lessons is our own.

1The oscillator
A capacitor that an op-amp charges in a straight line, and a switch that empties it: U2 and C1 make the ramp, the comparator U3 closes S1 at 5 V and opens it again at 0.5 V. U4 makes the ramp ±5 V: a sawtooth. Its current comes from an exponential converter: U1 holds Rref's current through Q1, and Q2 copies it, doubled by every 18 mV at its base. Rv and Rg make each volt at voct 18 mV there: a volt an octave. A second comparator, U5, against the width pot P2, makes a pulse from the same ramp.
VCO3 adds a triangle: two op-amps and two diodes fold the saw's bottom half up. Ned builds it part by part in The oscillator, built from parts (opens in a new tab).
circuit VCO
setting tune: 50%
setting width: 50%, from 5% to 95%
setting output: 5 V
oversample 2x
in voct: from -5 V to -4.9166667 V
in fm: from 0 V to 1 V
out pulse
V1 vcc gnd 15V
V2 gnd vee 15V
V3 vh gnd 8.375V
V4 v5 gnd 5V
Rref vcc nref 1.2738M
Q1 nref gnd nexp 2N3904 simple
U1 gnd nref nexp opamp rails 15V
Q2 sum ncv nexp 2N3904 simple
Rv voct ncv 1k
Rfm fm ncv 1k
Rt tn ncv 33k
Rg ncv gnd 18.605
P1 vcc tn vee 100k tune
C1 ramp sum 10n
U2 gnd sum ramp opamp
S1 ramp sum gnd q on 10 off 10G at 5V
U3 ref ramp q comparator rails -10V 0.5V
Ra ref q 40k
Rb vh ref 30k
U4 ramp m out opamp
Rf out m 12.22k
Rs m v5 10k
P2 v5 pw lo 10k width
Rl lo gnd 1.111k
U5 pw ramp pulse comparator rails -5V 5V
end
2The four-pole OTA filter
Each stage is an OTA whose strength is the current through its Rk, into a capacitor, a follower after it and its output back to its minus input: one gentle pole. Four in a row cut 24 dB an octave. Rq brings the last stage's output back to the first: resonance, ringing at the cutoff and singing on its own past about 22k. Ned builds it in The four-pole OTA filter (opens in a new tab).
circuit Ota4
setting input: 6 V, from 0.6 V to 30 V
setting output: 6 V, from 0.6 V to 30 V
setting cutoff: 120k, from 2M to 6.8k
setting resonance: 1M, from 1M to 20k
V1 vcc gnd 15V
R1 in p1 100k
R2 p1 gnd 220
A1 p1 m1 c1 abc1 CA3080
Rf1 s1 m1 100k
Rq out m1 resonance
R3 m1 gnd 220
C1 c1 gnd 470p
U1 c1 s1 s1 opamp
R4 s1 p2 100k
R5 p2 gnd 220
A2 p2 m2 c2 abc2 CA3080
Rf2 s2 m2 100k
R6 m2 gnd 220
C2 c2 gnd 470p
U2 c2 s2 s2 opamp
R7 s2 p3 100k
R8 p3 gnd 220
A3 p3 m3 c3 abc3 CA3080
Rf3 s3 m3 100k
R9 m3 gnd 220
C3 c3 gnd 470p
U3 c3 s3 s3 opamp
R10 s3 p4 100k
R11 p4 gnd 220
A4 p4 m4 c4 abc4 CA3080
Rf4 out m4 100k
R12 m4 gnd 220
C4 c4 gnd 470p
U4 c4 out out opamp
Rk1 vcc abc1 cutoff
Rk2 vcc abc2 cutoff
Rk3 vcc abc3 cutoff
Rk4 vcc abc4 cutoff
end
module KeyTrack
in x
out y
y = (x - 60) * 0.0203
end
3Envelopes and VCAs
Press a key and the gate comparator U1 goes high; its first moment, through Cp, sets U3, which charges C1 through D1 and the attack resistor until it passes 10 V. Then S1 lets it fall through the decay resistor to the sustain pot's voltage. Let go, and it drains through the release resistor and D2. OtaAmp is one more OTA chip: the envelope's voltage is its bias, so the envelope is the volume. OutCap, two 1 µF capacitors into 6.8k (about 23 Hz each), keeps the slow drift a long envelope leaves, under 5 Hz, off the speakers. Ned builds them in Envelopes and VCAs (opens in a new tab).
circuit ADSR
setting attack: 10k, from 1k to 1M
setting decay: 100k, from 1k to 1M
setting sustain: 50%
setting release: 100k, from 1k to 1M
setting output: 10 V
in gate
V1 vcc gnd 15V
V2 gnd vee 15V
Rt1 vcc th 140k
Rt2 th gnd 10k
U1 gate th g comparator rails 0V 10V
U3 p env t comparator rails 0V 15V
Cp g p 1n
Rp p gnd 100k
Rb p vee 10M
Rf t p 50k
D1 t ka 1N4148
Ra ka env attack
S1 env kd g t at 5V
Rd kd sus decay
P1 g sus gnd 10k sustain
Rr env kr release
D2 kr g 1N4148
C1 env gnd 1u
U2 env out out opamp
end
circuit OtaAmp
setting input: 3 V, from 0.3 V to 300 V
setting output: 4 V, from 1 V to 30 V
in env: from 0 V to 10 V
R1 in p 100k
R2 p gnd 220
R3 m gnd 220
Rb env abc 47k
A1 p m o abc CA3080
RL o gnd 47k
U1 o out out opamp
end
circuit OutCap
setting input: 1 V
setting output: 1 V
C1 in a 1u
R1 a gnd 6.8k
U1 a b b opamp
C2 b c 1u
R2 c gnd 6.8k
U2 c out out opamp
end
4The arpeggiator from noise
No arpeggiator module: a transistor's avalanche noise (NoiseSource), a JFET sample and hold (SampleHold) a sixteenth clock ticks while a key is held, Spread to put the held voltage in the Quantiser's range, the Quantiser on a Chord progression's tones, and ToNote for the VCOs' voct. The same clock into the envelope's gate plucks every note. Ned builds it in The arpeggiator from noise (opens in a new tab).
voice = Voice(mode: Mono)
clock = LFO(shape: Square, sync: 1/16, retrigger: Bar)
clk = ClockGate()
bars = LFO(shape: Square, sync: "1 bar", retrigger: Bar)
barclk = Pulse5()
noise = NoiseSource()
sh = SampleHold()
spread = Spread()
chords = ChordProgression(key: E, steps: 6, root1: E, chord1: "Major 7", length1: 2, root2: A, chord2: "Major 7", length2: 2, root3: "C#", chord3: "Minor 7", length3: 2, root4: A, chord4: "Major 7", length4: 1, root5: B, chord5: "Sus 2", length5: 1, root6: E, chord6: "Major 7", length6: 1)
quant = Quantiser(mode: Chord, low: 64, high: 88)
note = ToNote()
clock -> clk -> sh.gate, quant.gate
voice.gate -> clk.g
noise -> sh -> spread -> quant
chords.tones -> quant.tones
bars -> barclk -> chords.step
quant.out -> note
Remember
- An oscillator is a capacitor charging and a switch that empties it; two transistors make each volt an octave.
- Four OTA stages in a row are a four-pole low-pass; the output back to the start is resonance.
- An envelope is a capacitor and its resistors; an OTA turns it into the volume; a circuit's volume needs Keep.
- Noise, a sample and hold and a quantiser make random notes, every one in the chord.