Sunday, October 01, 2017

Mixed-mode USB MIDI to CV

This is a simple mixed-mode USB to MIDI device. Mixed-mode because it supports both pitched and percussive sounds.

MIDI channels 1 - 4 are mapped as monophonic data to Pitch Control Voltage 1 - 4, Velocity Control Voltage 1 - 4 and Note Gate 1 - 4. These are suitable for controlling melodic synthesisers with pitch and velocity being mapped to different parameters, and the note gate triggering an envelope.

With MIDI channel 5, MIDI note 60 is mapped to Note Gate 5, MIDI note 62 is mapped to Note Gate 6, MIDI note 64 is mapped to Note Gate 7 and MIDI note 65 is mapped to Note Gate 8. These are suitable for triggering percussive sounds.

The range of the pitch output is approximately 5 octaves. Velocity is mapped to a voltage range of 0 - 5 volts. The note gate outputs are 0V for note off, and 5V for note on.

A set of four MCP4922 dual DAC chips are used. These provide 12-bit accuracy with a buffered output. A 100 ohm resistor is used between the DAC output and the CV output for pitch. A 1000 ohm resistor is used between the DAC output and the CV output for velocity. Each gate output pin is routed directly from the Teensy to the gate output socket via a 1000 ohm resistor.

The code works for Teensy 2.0 and 3.6, as well as other models. Simply adjust cs_offset (for chip select offset for the DACs) and gate_offset (for gate pin offset), and route the pin outputs accordingly.

More information about connecting an MCP4922 can be found here.

These are ideas I am still fleshing out. Once I am happy I will make a more in-depth tutorial, covering the setup and mapping in more detail.

In the meantime, download the code so far here: