Synth Guitar (Summer of Sound Challenge)
I have designed and made a synthesizer-guitar hybrid instrument, which is played like a guitar but has the sound and functionality of a synthesizer. Here’s a video of it in action:
The guitar’s fretboard contains metal contacts in place of frets, which complete a circuit when the metal guitar strings are held down, therefore determining which chord or note will be played when the user strums the “strings”. To simulate the strumming/plucking action, there are six metal rods on the guitar’s body which, when contacted by the connected metal plectrum, complete a circuit and trigger the notes.
The computational work (reading the sensors and generating the audio) is done by a Teensy 3.6 microcontroller with a Teensy audio adapter board. This allowed me to write code for the project using the Arduino IDE, which I was already familiar with, whilst giving me more computing power than a regular Arduino.
The “cleverest” part of the code in this project was happily already in existence: the Teensy audio library is a great set of audio sources and processes such as oscillators, amplifiers, filters, and mixers. These building blocks can be connected together in a dedicated online GUI which generates Arduino code. For this project, I designed an audio system in the GUI consisting of six identical virtual monophonic synthesizers, one for each string of the guitar, then exported the resulting code into an Arduino sketch.
The main loop part of the code is optimised to run as quickly as possible, because the more times it can run per second, the lower the latency will be (the time between playing a note and hearing it). In each loop, the following things happen:
- The microcontroller reads each sensor on the fretboard to determine the user’s current finger positions.
- The microcontroller reads from each “string” on the body to determine whether the metal plectrum is in contact with them. If the plectrum has touched the string since the last loop, that string’s note is muted. If the plectrum has been released from the string since the last loop, that string’s note is sounded.
- The microcontroller reads each potentiometer and toggle switch, and adjusts any audio parameters accordingly.
Although the Teensy 3.6 has a lot of analog and digital input pins, it still wasn’t enough for my purposes, so I made extensive use of 4051 multiplexer/demultiplexer chips. There are several of these chips inside the neck of the guitar, connected to the metal fret sensors, as well as several inside the main body of the guitar, connected to the potentiometers.
I needed plenty of room inside the guitar for the circuitry, so I built the body as a hollow box with a removable top. The neck also needed to contain circuitry, and therefore is also hollow, although building such a long, hollow section caused issues with flexing, so I added a metal bracket to reinforce it. The body and neck of the guitar are mainly made from MDF, which I cut with a jigsaw. Once done, I sealed the MDF and spray-painted it black.
I’ve since used the synth-guitar at a couple of gigs and on an EP that my band recorded. It was a lot of work to make, so I’m going to take my time before designing a new version, but I do have some ideas for what to do next. I might base the next version around an existing guitar, rather than making the entire body myself, and although I tried hard to make this instrument easy to take apart and repair, I would go about this differently next time - there is too much circuitry inside too small a body. I would also like to have some proper PCBs made, rather than using stripboard. Overall, though, I’m really happy with how the project turned out, and how it sounds! And I would recommend people try the Teensy platform for experimenting with audio.
The build process is very involved, but if you would like to attempt making a similar instrument yourself, here is a list of parts I used to get you started:
- Teensy 3.6 microcontroller
- Teensy audio adapter
- Stripboard (various sizes)
- Hookup wire
- Ribbon cable
- Female crimp pins (Dupont)
- Crimp pin housings (various sizes)
- ~20 x 4051 multiplexer/demultiplexer chips
- ~30 x 10k potentiometers (plus knobs)
- 5 x mini toggle switches
- Illuminated arcade button (5V)
- 6 x standard 5mm LEDs
- Various resistors
- 6.35mm mono audio jack socket
- 2 x 3.5mm stereo audio jack sockets
- Panel-mount USB B to micro USB socket/cable
- Single-row male header pins
- Single-row female headers
- Extra-long single-row female headers (stackable)
- MDF sheet (6mm)
- Scrap wood
- MDF sealer to allow painting
- Spray paint
- Guitar strings or similar thin metal wire
- ~5m of 1mm/18awg tinned copper wire for segmented fret sensors
- Guitar tuning heads, or alternative method of tensioning six long wires
- Various bolts/nuts/screws
- Wood glue
In terms of tools, you'll need the following:
- Soldering equipment (iron, solder, desoldering braid, third hand, etc)
- Wire stripping tool
- Crimping tool
- Wire cutters
- Jigsaw / circular saw (I used a jigsaw but have acquired a circular saw since and it probably would have made things easier)
- Coping saw / junior hacksaw (for fiddly bits)
- Face mask (MDF has nasty dust when you cut it)
- A computer running the Arduino IDE to program the microcontroller
The code for this project can be found here: https://github.com/mattybrad/bjarkardottir/blob/master/arduino/bjorksdottir/bjorksdottir.ino