I’m very pleased to announce that StringTheory, a Eurorack version of this project, is available to buy both as a DIY kit and as a fully assembled module. Please visit makesynthsnotwar.com for more information.
As you’ll know if you’re one of the tiny proportion of humans that actually read this blog, I’ve been doing a lot with Arduino micro-controllers to build modules and MIDI gadgets. Whilst Googling around for ideas and how-to-do articles, I came across a fantastic Arduino-based string synth project by Jan Ostman, beautifully demonstrated here by a builder of the project:
The sound of this fits perfectly with the feel of the music that I make, so I set out to make one for myself.
First of all, as always, the specification. I wanted to make this as a module rather than a complete keyboard-and-synth, so there would need to be some changes to the original source code:
- Make it work with my MIDI rig. Although there is MIDI-handling code in the original source, it’s effectively in “OMNI” mode (that is, it receives on all channels). I’d want it to work with a specific MIDI channel.
- Allow the MIDI channel to be set without having to change the source code. I opted for this method of setting the channel with a 4-way DIP switch, described by Notes and Volts.
- Because I try to be a tidy developer, tear out any redundant code to do with reading the keyboard.
- Change the pin configuration for the CV inputs so that I could build this with just an ATMega328 chip rather than a whole Nano (the Nano has 2 more “virtual” analog pins that the ATMega package)
- Add some CV inputs (because this is a module, after all)
- Add some simple output protection to the Gate output
I applied the usual approach and bread-boarded using an Arduino Nano, making code changes as necessary. The code was pretty straightforward to modify, it just required some careful tracing of where globals and variables were being used, and a bit of common-sense when applying the Arduino MIDI library so that I didn’t end up trying to re-use interrupts (fortunately, the compiler kind of spots this and gives an “already-defined” error).
The circuit design was also fairly straightforward – a simple Arduino-without-an-actual-Arduino circuit built around an ATMega328 chip. Power supply would be drawn from my MIDI and 5V distribution board and all that was needed on the MIDI input side was the usual optocoupler and supporting resistors. For the CV inputs I would have to restrict the voltage to 5V (or thereabouts), else risk frying the ATMega, but this was easily achieved with a voltage clamp design that I found on Doepfer’s DIY page.
The stripboard design was easy (very few components) and I designed a tiny stripboard for the CV voltage clamps that would solder straight to the relevant potentiometers on the panel. The panel was built in the usual way (but turned out oddly wonky this time – must have gone wrong somewhere in my process for this one, but I can live with it for now).
The build was easy – just an evening with the soldering iron and an hour on the metalwork.
Overall, this was an easy and cheap build – and the results are fabulous, especially when you add a filter with an ADSR envelope triggered by the gate output. You can hear the finished module in use in this piece. Full credit to Jan for a great piece of programming here!
One last word from me – if you do build this project PLEASE ENSURE THAT YOU VISIT JAN’S WEBSITE AND DONATE $3 TO HIM – although I’ve modified the source code, it absolutely belongs to him.
Flipped stripboard layout
My panel design and cutting guide are available below as 600dpi PDF files. Note that I’ve not included holes for mounting hardware in the cutting guide as these can vary from system to system, depending on your mount/rails/bit of timber of choice. Note also that I use M4 PCB standoffs – you might want to cut the 4mm holes to a different diameter, depending on your standoff of choice.
Panel Cutting Guide