e1e0.net

sources for e1e0 website
git clone https://git.e1e0.net/e1e0.net.git
Log | Files | Refs

teensy-midi-controller.md (3340B)


      1 Title: Teensy MIDI controller
      2 Author: paco
      3 Date: 2019-03-16
      4 Type: article
      5 
      6 I recently discovered, and been  playing with [VCV Rack][1]. This software
      7 is just awesome.
      8 
      9 I  knew about  modular synthesizers  because a  friend of  mine (dj  and
     10 musician) told me  about it some years  ago, but I never  really got it.
     11 With vcv rack you can understand  how modular synthesis works, play with
     12 it and learn a  thing or two about music in  general and analog signals.
     13 It is pretty fun. Not to mention that real hardware modular is extremely
     14 expensive and with  this software option you can add  as many modules as
     15 your CPU can handle before start "glitching".
     16 
     17 One thing  I do not like  about software synths is  the "abstraction". I
     18 mean, you are  point and click, so  the experience is poor  really, so I
     19 thought  to make  a device  to  control some  of the  parameters of  the
     20 patches (that's modular jargon for a particular modular setup).
     21 
     22 Such devices do  exist, they are called MIDI controllers,  but I did not
     23 want to spend much money on this, as I know nothing about music and they
     24 are not super cheap.
     25 
     26 They send MIDI  [commands][2], which is the industry  standard for digital
     27 music communication.  In this case  over USB instead of  the traditional
     28 serial over midi DIN cable.
     29 
     30 There are some easy ways to  make such a device. Some Arduino compatible
     31 development boards out there (like the [Teensy][3], LC in my case) can act
     32 as a USB  MIDI device and programming  them to do basic  stuff is really
     33 easy.
     34 
     35 So, I got a Teensy LC (the  cheapest I could find), 8 potentiometers and
     36 4 buttons  and connected them  together. With a bit  of [code][4] I  had a
     37 MIDI device sending  MIDI CC (control) commands to the  computer. Then I
     38 just had  to configure  the MIDI-CC  core module  on vcvrack,  and start
     39 patching!
     40 
     41 This device is not limited to vcvrack.  It can be used with any software
     42 that accepts midi commands.
     43 
     44 The midi channel can be changed modifying this line on the code
     45 
     46     #define MIDI_CHANNEL 2
     47 
     48 Same for the control commands on the pots and buttons:
     49 
     50     static const uint8_t potCC[NUM_POTS] = {1, 2, 3, 4, 5, 6, 7, 8};
     51     static const uint8_t btnCC[NUM_BUTTONS] = {11, 12, 13, 14};
     52 
     53 The mode of  the buttons can be  one of momentary, latch  or trigger and
     54 can also be adjusted here:
     55 
     56     uint8_t btnMode[NUM_BUTTONS] = {MOMENTARY, TRIGGER, TRIGGER, LATCH};
     57 
     58 Now I can  pair real pots and  buttons with some of  my patch parameters
     59 and  play with  it. Here's  an [example][5]  (yeah, I'm  definitely not  a
     60 musician)
     61 
     62 I also  designed a case  for it  using FreeCAD and  printed it on  my 3D
     63 printer. The  end result is  not bad at  all. I'll upload  some pictures
     64 when I have the time [here][6]
     65 
     66 The only problem with all this is that is highly addictive ...
     67 
     68 Let's see how it goes.
     69 
     70 Here you have more references for [Teensy USB MIDI][7] and VCV Rack
     71 "howto's" ([1][8] and [2][9])
     72 
     73 Have fun !
     74 
     75 [1]:  https://vcvrack.com/
     76 [2]:  https://en.wikipedia.org/wiki/MIDI
     77 [3]:  https://www.pjrc.com/teensy/
     78 [4]:  https://git.e1e0.net/midi_controller/log.html
     79 [5]:  https://e1e0.net/files/vcvrack_test.mp3
     80 [6]:  https://e1e0.net/files/midi_controller_pictures/
     81 [7]:  https://www.pjrc.com/teensy/td_midi.html
     82 [8]:  https://www.youtube.com/channel/UCuWKHSHTHMV_nVSeNH4gYAg
     83 [9]:  https://www.youtube.com/channel/UCnZEv3hADF9ELOIwUNu6RVg