Title: Teensy MIDI controller
Author: paco
Date: 2019-03-16
Type: article
I recently discovered, and been playing with [VCV Rack][1]. 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][2], 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][3], 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][4] 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:
uint8_t btnMode[NUM_BUTTONS] = {MOMENTARY, TRIGGER, TRIGGER, LATCH};
Now I can pair real pots and buttons with some of my patch parameters
and play with it. Here's an [example][5] (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][6]
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][7] and VCV Rack
"howto's" ([1][8] and [2][9])
Have fun !
[1]: https://vcvrack.com/
[2]: https://en.wikipedia.org/wiki/MIDI
[3]: https://www.pjrc.com/teensy/
[4]: https://git.e1e0.net/midi_controller/log.html
[5]: https://e1e0.net/files/vcvrack_test.mp3
[6]: https://e1e0.net/files/midi_controller_pictures/
[7]: https://www.pjrc.com/teensy/td_midi.html
[8]: https://www.youtube.com/channel/UCuWKHSHTHMV_nVSeNH4gYAg
[9]: https://www.youtube.com/channel/UCnZEv3hADF9ELOIwUNu6RVg