Sunday 8 January 2017

Analog Synths

Cameron was talking about analog synthesizers last week and he got me interested.


I refer, of course, to my colleague Cameron and not to the former 'Prime' Minister. Don't expect any political comment or porcine quips - that really would be beneath me...


There's quite a lot of common ground between me and analog synths: electronics, music, signal processing, some of the particular technologies of radio (modulation etc) - I could go on.

Despite this affinity, I realised when Cameron showed me some YouTube videos last week that, whilst I know all about the technology underpinning Analog Synthesizers, I've never actually played with them. So - you can guess the rest.

Yesterday I made a new mess on the bench...


The heart of the story is a Voltage Controlled Oscillator, which makes square- or triangular-waves, whose frequency is controlled by a voltage (hence the name). Now - we've done things not a million miles different than this before - but this is an audio project!

There's lots of circuits for audio fequency VCOs on the internet, but I wanted something which was not just a voltage controlled oscillator, but rather the particular sort of VCO used in a 'real' musical synthesizer. These have oscillators whose output frequency is proportional to an exponential function of the controlling input voltage (because then, the input voltage will be proportional to the musical 'note' produced, which is itself the logarithm of the frequency). These are usually called 'one Volt per octave' oscillators, because of one industry standard (used by Korg, Yamaha, etc) of using a voltage change of one volt to signal an octave change in frequency (a 2:1 frequency ratio).
 
I took as starting inspiration a circuit found on this page. Here's my resulting VCO...


As usual, I had to make various changes to accommodate the contents of my junk box (the linear to exponential converter stage is built on a TL074 and the VCO proper is an LM324). Plus, the final output was rather more than one octave per volt, so I've added some trimming, as seen. There's a potentiometer to manually tune the oscillator and two inputs for control voltages (CVs) - which are additive signals (i.e. you can transpose by adjusting the tune control).

I soon confirmed I could test the oscillator with the manual tune control and apply modulation input from an oscillator to get vibrato effects. Throughout all the experiments here, my old Heathkit AF Sig Gen was serving as the LFO and modulation source...


I don't have any analog synths or 1V/8ve gear, so I programmed an Arduino to make a simple sequencer.

You can't use the PWM output produced by the 'analogWrite()' function (at least you CAN use it, but you hear too much of the PWM frequency to make the approach useful), so I added an MCP4922 DAC (which I've played with many times before) to give steady DC control voltages and to increase the available resolution to 12 bits.

With the 12-bit resolution, you can easily construct a table of the codes required to put out five octaves of semitones...


from which a simple look-up allows you to sequence a loop of notes or a random pattern. I even added an analogRead() of another external voltage to control the speed of the sequencer. This sounds interesting when you control it with an LFO - especially when it is playing a random pattern. Funny how the 5V Analog Ref of the Arduino works so nicely with the CV scheme of the Analog Synth world.

The simple VCO tracks well over a middle octave and is very stable (particularly as I've not yet taken ANY steps to ensure temperature stability), but isn't going to knock Moog off its pedestal quite yet.

Flushed with the success of the VCO, I built a Voltage Controlled Filter, taking my lead from Outer Space and making the appropriate revisions to accommodate the contents of the junk box (most importantly to work in the beloved 2N3819)...


The filter allows you to make all the expected 'Wah-wah' type sounds and more, controlled manually or - more importantly - by external control voltages. These allow either continuous modulation (e.g. controlling the filter from a free-running oscillator) or can be triggered by the sequencer (e.g. I've set the sequencer to set a digital line LOW every time the root note of a sequence is played, which allows the filter to emphasize that note and - hence - the tonality of the sequence).

Here are images of the filter response (to a square wave generated by the VCO, set manually to 100 Hz) with varying settings of the filter 'cutoff', at full 'resonance'...


So, with only two simple analog circuits and a sequencer made from an Arduino, a DAC and a few lines of code, I've had quite a bit of fun. I guess the next step (if I can be bothered to make one) is going to involve a VCA, an envelope generator and a homebrew MIDI : CV converter.

Alternatively, I might just follow Chick Corea's advice and condemn these horrible pieces of electronics to where they belong and play a real instrument (even if my 'Hammond' is a clone)...


Or, I could even get back on the radio - let's see if that contest has finished yet...

...-.- de m0xpd

No comments:

Post a Comment