Sunday, January 13, 2019

Secret Handshake - DIY USB MIDI Host Module for Eurorack

The Teensy 3.6 can act as a USB host. This includes support for class-compliant USB MIDI devices, as well as other types of USB devices. 

The strength of this is to be able to use USB MIDI controllers without the need for a laptop or similar device, and can interface with Eurorack. 

I've made a simple Eurorack module that acts as a USB MIDI host, and has two inputs that can be either gate or CV signals, 4 gate outputs and 2 CV outputs. 

All of the relevant files can be found here:

This includes an example for Launchpad Mini, PS4 controller, NanoKontrol 2. 

Different USB MIDI devices have different Arduino sketches written for them as firmware. Each USB device has different controls, functions and mappings, and so the flexibility of having a USB Host module is weighed against needing to program each device.

I will be adding and updating this project in the coming weeks. My plan is to make a new PCB with buffered outputs, voltage scaling, and busses for IO expansion.

Here are demonstrations for NanoKontrol 2, PS4 controller and Launchpad Mini.

Monday, December 31, 2018

Chromatic Drum Gate Sync

This Teensy-based project has 12 gate outputs that are set using note messages over USB MIDI.

Each note in the scale (C, C#, D, D# etc) corresponds to a gate output labelled G1 - G12, and will set high from a note on message and low from a note off message.

If a USB MIDI clock sync is sent, Gate 12 will output a short trigger upon sequencer START or CONTINUE. Gate 11 will output a sync signal at a rate of 12PPQN. Gate 10 will output a sync signal at a rate of 16th notes. Gate 9 will output a sync signal at a rate of 8th notes.

Download the code (.ino), schematic (.sch) and board (.brd) files here:

Wednesday, December 26, 2018

little-scale: Realistic Expectations (2018)

Thursday, December 06, 2018

Teensy 3.6 as Standalone Mediator Between USB MIDI and Eurorack

USB MIDI controllers (such as Launchpad Mini Mk II for example) are common and often quite low in cost.

To interface such a controller with a Eurorack synth system, often a host computer and a MIDI to CV interface might be used. The host computer would take USB MIDI data from the MIDI controller, perhaps store and manipulate that data in some way (e.g. a sequence), using a MIDI to CV converter to then control a Eurorack synth system.

It would be useful to use USB MIDI controllers with Eurorack synth systems without needing a computer and MIDI to CV interface in between the two.

Teensy 3.6 is a great microcontroller that can be programmed using the Arduino IDE. A very useful feature of the Teensy 3.6 is the USB host port.

Using the USB host port, the Teensy 3.6 can act as a host device for a USB MIDI controller. This means that a computer is not required to interpret the USB MIDI messages from a USB MIDI controller.

The Teensy can receive MIDI data sent over USB from the MIDI controller (e.g. faders, knobs, buttons) and can also send MIDI data back to the MIDI controller over USB (e.g. LEDs for buttons, displays).

At the same time, the Teensy can send and receive voltages to and from a Eurorack system. This includes control voltages, gates, triggers and clock signals as both inputs and outputs.

By programming the Teensy, a relationship between USB MIDI data from the controller and the voltages to and from a Eurorack system can be set up.

Example - Launchpad Mini Mk II as Eurorack Sequencer
In this example, the Launchpad and Teensy are working together as a simple Eurorack gate sequencer. This example can be built on extensively, but serves to illustrate the point of USB MIDI host mediation.

Hardware Setup
The USB host port on the Teensy 3.6 needs to have header pins soldered for accessibility, so that the header pins stick up out of the Teensy.

A USB host cable is connected between the USB host post on the Teensy and a USB MIDI device, in this case a Launchpad Mini Mk II.

The desired input and output connections are then connected to the Teensy. In this simple example, the Teensy will provide six gate outputs via six Eurorack-style 3.5mm sockets.

Teensy 3.6 digital pins 0 - 5 are connected via 1k resistors to the signal connection of the 3.5mm sockets. Teensy 3.6 ground is connected to the ground connection of the 3.5mm sockets.

If more complexity was required, additional outputs, inputs, buttons and pots could be connected to the Teensy to extend this example beyond the six gates.

The six gate outputs are connected to gate inputs in a Eurorack system, which in the demo video is triggering some Erica Synths, Make Noise and Doepfer modules.

Software Setup
The Arduino code can be downloaded here. The Teensyduino extension should be installed, the board should be set to Teensy 3.6 and the USB mode to Serial. The code is not very concise, but is hopefully easy enough to read.

The code takes button inputs from the Launchpad Mini Mk II grid and stores these button presses in an array which holds the pattern. The Teensy also controls the LED lights on the Launchpad, and has an indicator as to which step is currently playing.

Each row represents a trigger output. Each column represents a step.

Pressing a button in the grid once will make sure it plays each loop of eight steps. Pressing a button a second time will play that gate every odd loop. Pressing a button a third time will play that gate every even loop. Pressing a button a fourth time will turn that stop off completely.

The const int interval_time, which defaults to 90, sets the speed of the sequencer.

Obviously, this simple example can be greatly expanded on. The next step in this project is to build a generic PCB with perhaps 8 gate outputs, 4 CV outputs, 4 gate inputs, and two buttons and two pots, and then start writing code to adapt a number of USB MIDI controllers to Eurorack.

Tuesday, November 27, 2018

Poly to Mono Max Patch

This patch will distribute a single channel of MIDI data to two or more MIDI channels based on polyphonic note order. Options include channel offset, number of voices, sending a C4 to all outputs. Pitch bend is also sent.

Download here: