Saturday, November 04, 2017

USB MIDI to Eight Gates and Sixteen CV Outs - Code, Schematics and PCB

This is a simple USB MIDI to eight gates and sixteen control voltage outputs. The gates are 0V for off and 5V for on. The control voltage outputs are 12-bit and 0V to 4.096V in range, with a four octave range for pitch. The gate outputs are via 1k resistors. The cv outputs are via 100 ohm resistors.



A MIDI control change message on channel 16 changes the mapping mode of the interface. Channel 16, control 110 and value 64 or above sets the mode to mode 0. Channel 16, control 111 and value 64 or above sets the mode to mode 1. Channel 16, control 112 and value 64 or above sets the mode to mode 2.

In mapping mode 0, gates 1 to 8 respond to note on and note off messages on MIDI channels 1 to 8. CV outputs 1 to 8 are determined by the pitch of note on messages on MIDI channels 1 to 8. CV outputs 9 to 16 are determined by the velocity of note on messages on MIDI channels 1 to 8.

In mapping mode 1, gates 1 to 8 respond to note on and note off messages on MIDI channels 1 to 8. CV outputs 1 to 8 are determined by the pitch of note on messages on MIDI channels 1 to 8. CV outputs 9 to 16 are determined by the control change message for controller 1 on MIDI channels 1 to 8.

In mapping mode 2, gates 1 to 8 respond to note on and note off messages on MIDI channels 1 to 8. CV outputs 1 to 16 are determined by the pitch bend value of pitch bend messages on MIDI channels 1 to 16. 



The code is for Arduino using the Teensyduino add-on. Download the code here: http://milkcrate.com.au/_other/downloads/arduino/usb_midi_8_gate_16_cv/usb_midi_8_gate_16_cv.ino




The schematic is shown below, making use of 1 Teensy LC microcontroller, 8 MCP4822 DACs, 2 CD4050 buffers, 26 resistors and 2 LEDs.

Download the schematic here: http://milkcrate.com.au/_other/downloads/arduino/usb_midi_8_gate_16_cv/usb_midi_8_gate_16_cv_interface.sch


The PCB layout is shown below, and features a basic layout with through-hole components.


Download the PCB here: http://milkcrate.com.au/_other/downloads/arduino/usb_midi_8_gate_16_cv/usb_midi_8_gate_16_cv_interface.brd

0 comments: