home / code / contact / GnuPG Key / Keys transition statement

Teensy MIDI controller


I recently discovered, and been playing with VCV Rack. This software is just awesome.

I knew about modular synthesizers because a friend of mine (dj and musician) told me about it some years ago, but I never really got it. With vcv rack you can understand how modular synthesis works, play with it and learn a thing or two about music in general and analog signals. It is pretty fun. Not to mention that real hardware modular is extremely expensive and with this software option you can add as many modules as your CPU can handle before start “glitching”.

One thing I do not like about software synths is the “abstraction”. I mean, you are point and click, so the experience is poor really, so I thought to make a device to control some of the parameters of the patches (that’s modular jargon for a particular modular setup).

Such devices do exist, they are called MIDI controllers, but I did not want to spend much money on this, as I know nothing about music and they are not super cheap.

They send MIDI commands, which is the industry standard for digital music communication. In this case over USB instead of the traditional serial over midi DIN cable.

There are some easy ways to make such a device. Some Arduino compatible development boards out there (like the Teensy, LC in my case) can act as a USB MIDI device and programming them to do basic stuff is really easy.

So, I got a Teensy LC (the cheapest I could find), 8 potentiometers and 4 buttons and connected them together. With a bit of code I had a MIDI device sending MIDI CC (control) commands to the computer. Then I just had to configure the MIDI-CC core module on vcvrack, and start patching!

This device is not limited to vcvrack. It can be used with any software that accepts midi commands.

The midi channel can be changed modifying this line on the code

#define MIDI_CHANNEL 2

Same for the control commands on the pots and buttons:

static const uint8_t potCC[NUM_POTS] = {1, 2, 3, 4, 5, 6, 7, 8};
static const uint8_t btnCC[NUM_BUTTONS] = {11, 12, 13, 14};

The mode of the buttons can be one of momentary, latch or trigger and can also be adjusted here:


Now I can pair real pots and buttons with some of my patch parameters and play with it. Here’s an example (yeah, I’m definitely not a musician)

I also designed a case for it using FreeCAD and printed it on my 3D printer. The end result is not bad at all. I’ll upload some pictures when I have the time here

The only problem with all this is that is highly addictive …

Let’s see how it goes.

Here you have more references for Teensy USB MIDI and VCV Rack “howto’s” (1 and 2)

Have fun !

$Id: teensy-midi-controller.md,v 1.3 2019/03/25 19:15:00 paco Exp $