Introduction: DAW2CV MIDI Interface
These are fantastic days to be a synth enthusiast. More and more synthesizer manufacturers are releasing old glories at affordable prices thanks to the "analog GAS" and we all can realize the dream to posses devices that would otherwise be unachievable at a reasonable price (Korg MS20 mini, Behringer Model D, etc).
By the way, we are in 2019 and, despite manufacturers efforts, features required in an up-to-date setup are sometimes missing. MIDI automation of parameter change (filters cutoff, VCA level etc.) are some of those functions lacking in most analog synthesizer.
Here is a potential solution: a super-easy, super-cheap interface that can receive up to 7 different MIDI control change messages over USB and translate them in as many analog control voltages (CV).
Step 1: Hardware and Wiring
The working principle is simple: Arduino receives USB Control Change (CC) MIDI messages from the DAW, converts those MIDI events into pulse width modulated output voltages that are then filtered by the simplest possible low pass filter: the RC filter.
The hardware needed for this project is:
- 1x Arduino Leonardo (or any other ATmega32u4 based Arduino board)
- 1x double sided perfoboard 50 x 70 mm
- 7x 0.1uF poly capacitor (104)
- 7x 1K ohm resistors
- 7x mono jack female connectors
- 1x ABS box (pictured is a 100x100x50 mm box)
- 40x pinheaders, male-male
Being that Arduino Leonardo has 7 PWM outputs, this interface can handle up to 7 separate control change MIDI messages and translate them into 0 - 5V analog outputs.
Attached is the wiring for one of the filters.
Step 2: Software
You are in the need for the arduino IDE and MIDIUSB library by Gary Grewal in order to compile and upload the sketch. The latest version of the library is 1.0.4 at the date of today.
If you are unfamiliar with the arduino IDE, start here.
To upload the library follow THIS tutorial.
The sketch (attached) monitors the MIDI control change messages incoming from USB and then modifies the output voltages of PWM pins accordingly. Default MIDI channel is "1" but you can set it at your will by modifying the sketch MIDI_RECEIVE_CHANNEL value and then upload.
In particular, these are the Control Change input message coming from DAW via USB -> Arduino output Pin corrispondences:
CC#19 -> Arduino Pin 3
CC#20 -> Arduino Pin 5
CC#21 -> Arduino Pin 6
CC#22 -> Arduino Pin 9
CC#23 -> Arduino Pin 10
CC#24 -> Arduino Pin 11
CC#25 -> Arduino Pin 13
Notice that the code modify (lowens) the PWM frequencies by acting on the microcontroller timers. This means that functions like delay(), millis() and libraries relying on those functions will not work anymore.
Without the PWM frequency modification, an RC filter like the one I posted would not be sufficient and an active filter should be adopted (i.e. a Sallen-Key low pass filter) to reduce incoming USB noise. Many thanks to Christo Kay for testing and suggesting me the increasing of PWM frequency as a smart solution for that!!