Wednesday, April 6, 2016

DIY Ribbon Controller - CV

In sharing my work on a MIDI-enabled ribbon controller, a couple of the good folks at Muff Wiggler wanted more.  They wanted to see a CV-enabled ribbon.  So, as I'm always ready for more hacking, today I present for your enjoyment: my home-brew CV ribbon controller.

Switching from MIDI to CV:  This CV-enabled ribbon builds directly upon my MIDI ribbon.  It uses literally the same ribbon, which I built (like everyone) using a $20 soft-pot sensor.  Like my MIDI ribbon, This CV ribbon also uses an Arduino to sense ribbon and to generate the commands for the synth.  The main thing that is different with the CV ribbon is that I needed to add a digital-to-analog converter (DAC) to generate the CV signals that'll drive my old synths.

The only difference between the MIDI ribbon and the CV ribbon is how the Arduino outputs its commands.  The MIDI ribbon uses an Arduino "MIDI Shield" to send the MIDI messages whereas the CV Ribbon uses a DAC to generate the CV voltages.

Using a DAC:  A DAC is a device for generating arbitrary analog voltage signals.  You send it commands (such from an Arduino) and its output jumps to the voltage level that you desire.  They're very handy devices for synth hacking.  My experience is with the MCP4922, which is a 2-output, 12-bit DAC.  After refreshing my memory using its datasheet, I decided to wire the DAC to the Arduino as shown in the schematic.

The ribbon (left)  is wired to the Arduino (left-center).  The Arduino is wired to the DAC (right-center).  The DAC is wired to the CV outputs (right).  Easy.

Wiring the DAC:  From this schematic, I used a solderless breadboard to wire up my DAC.  I chose to use an Arduino Micro because it easily fits into the breadboard (unlike an Arduino Uno).  Wiriting software for the Micro is the same as for the Uno, so it's a trivial swap.  The wiring diagram below (go Fritzing!) shows my plan for wiring the DAC to the Arduino.  I added the headphone jacks to make it easy to get the signal in from the ribbon and to get the CV signals out to the synth.  For breadboarding, I like using this jack with this breakout from Sparkfun.

My wiring plan for the Arduino Micro and the MCP4922 DAC.  Power is supplied from USB connection to the Arduino.

Real-World Wiring:  Of course, once real wires are involved, it never looks as pretty as the plan.  The picture below shows my actual breadboard with its actual wires.  All the connections are the same, but the routing is different.  Also, I moved where I put the headphone jacks: the ribbon input is the one on the bottom right and the two output jacks are dangling off the back (one is black, the other beige).  Note my use of the blue rubber band to keep the output jacks somewhat contained.

The real-world wiring is never as nice as the plan.

Pitch and Trigger CV Signals:  For this hack, I'm generating three signals to control my synth: a pitch CV, a trigger (a.k.a. gate) signal, and a filter CV.  The pitch CV controls the pitch of the synth.  It's a signal that can take any value between zero volts (a low pitched signal) and 5V (a high pitched signal).  The trigger signal, by contrast, is simply low (0V) or high (5V).  It tells the synth whether the note is "on" or "off".  Since it is just a LOW/HIGH signal, it is generated by one of the Arduino's digital pins, not the DAC.

Filter CV:  The last signal that the system generates -- the filter CV -- controls the cutoff frequency of the filter.  Like the pitch CV, it can be any value between 0-5V, and so I use the 2nd channel of the DAC to generate it.  I added this capability to the system (like I did with the MIDI version) so that the filter opens up a bit as you play higher notes.  This is the same kind of interaction you'd get with the keyboard if you had the "keyboard tracking" turned up about half-way.  Adding this behavior made the ribbon feel more natural and more engaging.

In response to the ribbon, the Arduino+DAC generates three signals: pitch CV, trigger CV, and filter. CV 

Arduino Software:  With the hardware assembled, and with my CV signals decided, I wrote the software for the Arduino.  I reused my software for the MIDI ribbon and simply added the functions to drive the MCP4922 DAC.  My code is available on my GitHub here.  Having both the MIDI and CV functionality in one program makes it more complicated to read, but it gets the job done.

The Korg Mono/Poly has good flexibility for interfacing to external gear.  Here, my circuit is creating CV signals that I'm injecting to control the filter cutoff ("VCF fcM IN", on the left), to control the gating of the note ("TRIG IN"), and to control the pitch of the note ("CV IN").

Putting it All Together:  With the software written, and with the CV signals injected into the correct locations on the back of the synth (see pic above), I was ready to get to the business of playing.  Of course, it didn't work the first time,but after some debugging (should the Trigger signal be set high or low on the Mono/Poly?), I got it to work pretty well.  Interestingly, I found myself playing the ribbon differently when attached to my Mono/Poly than when it was connected to my Prophet 6.  I think that it had something to do with the CV vs MIDI.  MIDI is designed for discrete pitch instruments (like keyboards).  I feel that the continuous pitch of a ribbon is just better suited to CV.

My old Mono/Poly, with the magnet-backed ribbon just above the keybed, and with my magnet-backed breadboard controller in the upper-left.

Next Steps:  Now that I have a DAC working, it opens all sorts of possibilities.  A DAC could be used to generate audio signals directly, not just CV signals.  By directly synthesizing its own audio, I could make the ribbon a stand-alone instrument.  Yes, using these electronics to create a wavetable ribbon synth could very, very interesting.


  1. Kickstarter? I'd go for a few of these....

  2. Good evening, please can I have your email address? Mine is Thank you for your time.

  3. i want to add ribbon controller with modulation + pitch for my yamaha psr e 423???? is it possible???? if possible how, please describe me the detail process am worst in electronics and i don't wanna ruin my keyboard

  4. Hello, I am slightly confused by the ribbon connection and code.
    I bought a couple arduino Pro Micros to do this with.
    But your schematic uses only two pins of the 3 on the rippon, doesnt say which it does use, but the code referenes 3 connections on the ribbon?
    Also the Pro Micro doesnt have the A5 connection, so is it as simple as changing any reference to A5 in the code to A6? (How many relevant references is there? I think I saw you on FB synth DIY so we could take it over there where I can post up the stripboard Ive used as well ;)

  5. Catching up with your adventures. Kudos on all the new work on the Polysix, it makes me want to get a Fatar, more Arduinos (I have a few which just arrived) and re-do all the work you did on mine. But first, I need to troubleshoot the KLM-367 board again (sigh).

    Let's go!


  6. Hey Chip; I'm a musician, but I know next to nothing about electrical engineering or programming. However, I don't really need a Midi capable controller; could I build a CV ribbon controller by simply soldering a soft-pot to a TRS connector? It feels too simple to me, but I've spent the last few hours trying to figure this out online and by dismantling a few expression pedals and the barrier of a lack of basic electrical knowledge is getting in the way.

    1. I'm in exactly the same boat and would love to know this (I have the impression the answer is "yes" but would love confirmation)

    2. I think what you're asking for is an all-analog ribbon. You can certainly wire the ribbon to the TRS connector, but you need something to apply a voltage across the ribbon via the TRS connector (say +5V to one end of the ribbon and ground to the other end of the ribbon). When you do that, you will certainly get a voltage out of the ribbon that is related to where you've touched the ribbon. Maybe that's all that your looking for, which would be cool.

      While that setup is a lot simpler than mine (yours has no software), you also would get no gate signal to tell your CV synth that you're touching the synth. In your case, once you stopped touching the ribbon, the voltage being output by your device would be poorly defined and would wander about (unless you also attached a pull-up or pull-down resistor, which is what I'd recommend).

      The ribbon is also not as linear as you might like, meaning it's tough to play the exact pitch that you want. Using the Arduino lets you figure out a calibration so that the response is nice and linear with position.

      Don't let my arguments *for* including the Arduino sway you, though. If you're not into Arduino, then you should hack using whatever tools that you do know how to use. Just go for it! Smell the solder!


    3. Thanks for your response, Chip! My interest in the Softpot would be as a controller mounted on the face of a midi-enabled bass guitar. The pitch tracking is great for that, it's an old Peavey Midibase which I use to trigger a Moog Minitau, but reaching for the knobs of the minitaur is awkward while playing so I came up with the idea of directly manipulating CV via softpots mounted under my thumb. The CV on the Moog is self powered, is it not?

    4. Heya Jon - I found something called the Synthrotek Riblet that might make experimentation easier for folks in our slightly more tech-challenged state :) :