exsertus
The ramblings of an IT Professional, Long Distance Runner, Creative, and Maker of Stuff.
Modular Synthesizer Project
Part 2 - MIDI To CV

Sooner rather than later I'd need to be able to trigger the modular synth from Logic or an external source, so figured I best bite the bullet as this required a bigger mixture of hardware and software and complexity.
Working on the basis that MIDI is pretty universal, it was clear that a MIDI (Musical Instrument Digital Interface) to CV (Control Voltage) convertor was required. In short this module takes MIDI data (serial bytes) interprets them and converts them into a series of either gate signals (on/off) or control voltage signals (0-10v).

I decided that this was one of those "it needs to be a micro-controller" projects, as doing this with pure TTL (Transistor Transistor Logic) would be a real chore. The ATMega328 was the natural choice, given that I've used Arduinos and ATTiny chips for previous projects. Furthermore, since we are dealing with serial data (MIDI), the demands for accurate timing would require a proper hardware UART (Universal Asynchronous Receiver /Transmitter), which suit the ATMega328 nicely.
The basic circuit is based around this Arduino tutorial and simply augmented with details from Larry McGovern's repo.
Rear viewRear view
The circuit is based around 4x core IC's:
With the ATMega328 it was pretty simple to find a circuit and some MIDI libs to start reading MIDI data streams and acting on them, particularly with gate outputs. However, for CV outputs, this required a bit more thought as the ATMega168 doesn't have a native DAC (Digital Analogue Convertor). A bit of research and trawling the 'net, I landed on using a SPI (Serial Peripheral Interface) based DAC - the MPC4922. This provides 2x CV outputs; one for note CV (pitch), the other for note velocity. The later being useful for accenting notes with filter modulation.
The only other catch is that so far we are talking 5v logic level voltage, and in order to achieve 1v/octave across 88 notes, this would mean 0-7.33v range. This is where the op-amp comes in. In hindsight, I should have also used a 2x gain on velocity to get a 0-10v range which is typical of CV output.
This module's thirsty fascia courtesy of Beavertown Gamma Ray.
Panel viewPanel view

I used Larry McGovern's repo for the basis of this with a couple of differences:
The result is pretty effective as a mono-channel, mono-phonic MIDI to CV convertor. Doesn't really need to be much else than that to be honest. I've recorded parts 2 and 3 together.

More posts in this series: