Post

MIDI to CV converter: Part 1

MIDI to CV converter: Part 1

Since the end of the last year I’ve been more into electronic music: noot only listening but trying to understand and maybe produce it as well in some capacity. I’ve always been interested in electronics, so to combine these two hobbies I’ve been building this DIY modular synth kit from Erica Synths.

One issue with this kit is that I can’t really connect it to my computer or any other gear because it uses analog CV signals, but I need digital MIDI to connect it to a computer.

MIDI to CV

Solution is to build a thing that reads digital MIDI signals and converts them into analog CV values. The idea is pretty simple: you use an Arduino to read MIDI, which is just a serial protocol at a rate of 31.25 kbit/s, parse the messages and convert them to CV values for a specific output.

Specifically I’m interested in the following:

  • Trigger - when a note key is pressed, send a short CV value of 5V to trigger output.
  • Notes - when a note key is pressed, send a value of the note to the note output (1V per octave).
  • Gate - send a high signal (5V) to the gate output during the time a note key is pressed.
  • Clock - for synchronizing the gear, for every clock message send a short CV value of 5V to * clock* output.

Other things that can be useful, but are not currently in the main scope are:

  • Pitch bend - most MIDI keyboards have a Pitch Wheel which can be used to modify the pitch of the notes playing.
  • Velocity - most MIDI keyboards can detect how hard the key was struck.
  • CC - bunch of different parameters that can be read from a MIDI controller, depending on what controller you are using.

Outputs are standard 3.5mm audio sockets that I can easily connect to the modular synth using TS Audio cables.

Components

To build the converter I need the following components:

  • MIDI input
  • Analog/digital outputs
  • A platform to connect them

Platform

I chose Arduino Nano Every since I had one lying around, it is powerful enough and it has everything I need: it can read serial protocol for MIDI input and it can output digital signals that I need for the analog output. Arduino has a function called analogWrite , but it’s actually just outputting a PWM signal since Arduino doesn’t have a built in DAC. Plus it doesn’t take up as much room as a bigger Arduino would.

MIDI input

In theory MIDI is just a serial protocol which the Arduino Nano Every talks very well, but you need to isolate the input to prevent ground loops. For this you can use a simple optocoupler based circuit between your MIDI input and Arduino.

Digital outputs

Gate, trigger and clock have two discrete values, so I can use the digital outputs of the Arduino to trigger those.

Analog outputs

Note (with pitch bend, velocity and CC) output needs more than 2 levels so a digital output is not enough: I need an analog output, so I need to add a DAC. Digital to analog conversion is basically just outputting different levels of a reference voltage based on the resolution of the DAC. For example if you have an 8-bit DAC and reference voltage of 12V you can output 256 different levels from 0-12. For pitch bend I think you would need something with a higher resolution like 12-bit, but I have some 8-bit DAC’s, and I’m thinking that since I only need about 88 levels to output all the note values I need then maybe it is enough? Let’s see.

Buffering

All the outputs need to be buffered with opamps. Think of it like adding a boundary between the converter and anything that is connected to the outputs: instead of current running from your Arduino outputs (might not be that powerful) to the input of the connected device, the opamp will provider the current while maintaining the voltage level of the output.

Conclusion

There are a bunch of already made projects out there. One that I’ve been using for ideas is this MIDI 2 CV converter.

To be continued: will add a link to “Part 2, the actual build” here when it is out.

This post is licensed under CC BY 4.0 by the author.