The Shopping List: The heart of my MIDI-to-Trigger converter is an Arduino Uno ($30). To enable it to receive MIDI messages, I used a Sparkfun MIDI Shield ($20) that has the female MIDI connectors and the associated electronics to get the MIDI messages into the Arduino. Helpfully, the MIDI shield also includes two potentiometers and three push buttons. Very nice! To physically connect the MIDI shield to the Arduino, I also had to buy some stackable headers ($1.50). Finally, to get the trigger signals out of the Arduino and headed towards my synth, I chose to buy some 1/8" stereo audio jacks ($1 each), though any jacks will do (1/8" or 1/4" or whatever). I chose to include two audio jacks so that I can drive two arpeggiators at the same time (ie, both my Mono/Poly and my Polysix) because, if one arpeggiator is good, two must be even better!
|The components in my MIDI Clock to CV Trigger Converter.|
Assembling the Hardware: The MIDI shield comes as a kit that you need to solder together yourself, which is pretty direct and easy. After the shield was assembled, I then needed to attach my two audio jacks to convey the trigger signals out to my synths. Unfortunately, there are no solder holes on the Arduino or on the MIDI shield for attaching jacks or wires. So, I chose to solder some wires to the pins that connect the MIDI shield to the Arduino. Usually, this is not recommended approach, and you should be aware that it is a bit challenging to do (notice the tight space in the picture below) but it did work for me.
|A kludge. I'm soldering the wires to my audio jack to the pins on|
the MIDI Shield that will mate to the Arduino. Generally,
this is not recommended, but it works.
Once the wires are attached to the MIDI shield, then you just have to attach the jacks to the other end of the wires. As shown in the picture below, soldering to the jacks is much easier.
|Soldering the wires onto the audio jack. These don't carry audio.|
They carry the CV Trigger signals.
Finally, once all of the soldering is done, you simply mate the MIDI shield to the Arduino. The hardware is done!
|My fully-assembled device for converting MIDI Clock to CV Triggers.|
Writing the Basic Software: For the Arduino, I wrote some software that listens for the messages coming in from the MIDI port. MIDI is quite general (it's not just about keeping time) so my Arduino is programmed to ignore most of the traffic on the MIDI bus. It is listening solely for MIDI Beat Clock messages (ie, code 0xF8). The MIDI standard says that there should be 24 of these messages arriving for every quarter note. So, if I want a 16th note arpeggiation, and since a 16th note is a 1/4 of a quarter note, I programmed the Arduino to issue a trigger pulse after every 6 MIDI clock messages (because 24 * 1/4 = 6). To actually issue a "trigger pulse", the Arduino briefly raises (or lowers) one of its digital output pins. That's the trigger signal. That's all it takes!
Adding Fancy Features: Once I had the basic software working, I started adding features. First, because some arpeggiators like upward-pulses and other like downward-pulses, I wrote the software to do both. That's why I use stereo jacks for my outputs...the "left" channel is upward going while the "right" is downward going. The next feature that I added is a second set of trigger outputs to drive a second arpeggiator (hence my inclusion of the second audio jack). Then, to be adjust the speed of the arpeggiators relative to the MIDI clock (do I want 16th notes? 8th notes? whole notes?), I program the Arduino to read the two potentiometers and to set the MIDI clock divider (that number "6" discussed in the paragraph above) to make the triggers come faster or slower. This is pretty sweet.
Sharing My Software: I case anyone is interested, you can get the latest version of my MIDI-to-Trigger Arduino software at my GitHub, which is here. If you make improvements, send me a pull request!
Trying it Out: So, for my initial trials, I kept the setup simple. My Korg Kaossilator is going to be my drum machine. I'm going to have it drive the arpeggiator on my Mono/Poly. So, as shown in the figure below, I connected the Kaossilator's "MIDI Out" to the "MIDI In" on the Arduino MIDI-to-Trigger Converter. Then, I connected a cable from one of my converter's outputs to the "Arpeggiator Trig In" jack on the back of my Mono/Poly.
You can see the connections to my MIDI-to-Trigger converter in the photo below.
|Connections to my MIDI converter. The Kaossilator is coming in via the MIDI|
cable on the top left o the device. The Mono/Poly (off screen) arpeggiator
trigger is driven by the 3.5mm audio cable on the bottom of this picture.
As seen in the picture below, with all of these extra wires running around, the setup gets a little messy.
|Zooming out to see the whole setup. Wires everywhere!|
Once it was all connected together, I started some drum loops on the Kaossilator. Then I activated the arpeggiator on the Mono/Poly, I set it to "Latch", and then I locked in a few notes. And then nothing happened. After chasing down a couple of bugs in my software, I tried again. And then again. And eventually, I got it to work. The arpeggiator was stepping in sync with the Kaossilator. It was glorious. As shown in the video at the top of this post, I can change tempo and it all keeps going in sync. It's pretty fun.
Next Steps: The next steps are to run the arpeggiator on my Mono/Poly and the one on my Polysix at the same time. That'll be a really fun. Look for a follow-on post!