Sunday, December 31, 2017

USB MIDI to Gates and Sync




This project is useful for controlling drums in a modular system from a DAW such as Ableton Live, as well as sequencer synchronisation via MIDI.


The Teensy maps MIDI notes to six gate outputs, and MIDI clock to a reset output and sync output. Pitches C, D, E, F, G and A on any channel will turn the corresponding gate on with a velocity above zero, or off with a velocity of zero. The MIDI octave or channel number doesn't matter.

When the DAW sends MIDI clock to the Teensy, a start or continue message will generate a short pulse at the reset output. This allows any analog sequencers to be reset at the same time as the DAW transport starts.

A button connected to the Teensy sets the division of the clock output. The initial value is sixteenth notes. Pressing the button will change this to eighths, then quarters, then 24 pulses per quarter note (i.e. native MIDI clock sync), and then off. Pressing the button will then revert back to sixteenths.

Teensy pins 0 - 5 are connected to gate outputs 1 - 6. Teensy pins 6 and 7 are connected to reset and clock. All outputs are via a 1K resistor and a 1N4148 diode.



The Teensy LC and 3.x will output 3.3v, which seems to fine for many modular applications. If the standard 5V is required, a Teensy 2.0 can be used, or a non-inverting buffer before the resistor on each output. The code can be expanded in terms of sync options and number of gates. 




Download the code here: http://milkcrate.com.au/_other/downloads/arduino/USB_Gate_and_Sync.ino

0 comments: