This project is a digital, polyphonic, modular synthesizer. Like a standard modular synth, my design consists of a number of removable modules, which are responsible for different elements of the sound (oscillator, filter, amplifier, etc), and which can be patched together to create unique sounds.
However, while a standard modular synth is analogue throughout, my design is entirely digital. Instead of each module containing the analogue circuitry to generate or process an audio signal, the modules in my synth simply detect connections between each other and pass this data back to a Teensy 3.6 which is running a dynamically generated software synth. Besides being a relatively inexpensive route into modular synthesis, this alternative design approach also allows users to easily create polyphonic patches (harmonies/chords), something that is difficult to do in an analogue modular system.
Here's a video of me explaining how the synth is designed to be used:
And here's a piece of music I made to demonstrate the synth's capabilities:
How it works:
The synth consists of a Teensy 3.6 with a Teensy Audio Adapter, running a sketch which I have written myself. The sketch uses the extensive Teensy audio library to generate the audio, but in such a way that the functions of the audio library are abstracted into "modules" which have a physical counterpart
When the synth is powered on, the Teensy scans each of its seven module sockets. Each type of module has a unique ID number, which the Teensy can read from a hard-wired multiplexer on the module. The Teensy then knows which modules are in which slots
For each module detected, the Teensy's sketch creates a virtual equivalent of the module, effectively generating a custom software synthesizer
The Teensy sends a signal to each patch socket in turn (up to eight per module), and each time it sends a signal to a new socket, it also reads from each patch socket in turn, to see which sockets are connected to each other
When a new connection is detected, it is replicated in the Teensy's sketch. When a connection is broken, that connection is also removed in the sketch
If an output is connected to an output, or an input to an input, a red warning LED is flashed until the situation is rectified
If there is a complete signal path, with audio flowing from a module's output to the master module, audio is generated
The Teensy also continually cycled through each module's potentiometers, to check their current readings and pass this data on to each module's software counterpart
When a key on the musical keyboard is pressed or released, this data is received by the Teensy and converted to a virtual "control voltage" signal, which can be connected to any of the modules to generate melodies
The Teensy continually monitors the "mono/poly" toggle switch. When in "mono" (monophonic) mode, there is one virtual module for each physical module, and the synth can only play one note at a time. When in "poly" (polyphonic) mode, four virtual copies of each module are created, allowing for chords and harmonies to be played
The synth's code/firmware can be updated via the USB socket on the back. This makes it relatively easy to design and add new modules
This project is confusing to explain to people. Even quite technical people. Even quite technical musical people. It has layers of potential misunderstanding, like an onion which turns out to have a potato in the middle.
First, you have to explain what a modular synthesizer is. A modular synthesizer is a collection of modules which each perform a single function, either to generate an electrical signal or to alter one. The user decides how the electrical signals are routed by "patching" different modules together with audio cables. Modules conform to a standard size and voltage range, and hence can be obtained from a huge variety of manufacturers before being installed alongside each other in a single case. Here is an image of a typical modular synthesizer (image credit Nina Richards https://commons.wikimedia.org/wiki/File:Doepfer_A-100.jpg):
Modular synthesizers have experienced a renaissance in the past few years, as people are attracted to the amount of control and invention available when compared to a regular synthesizer. The other main selling point is the analogue nature of the sound - there is a feeling that using analogue oscillators, filters, and other components gives an inherent warmth to the audio.
However, it is wryly acknowledged among modular synth users that it is a very expensive way to make sounds, particularly when compared to software synthesizers. A full modular system with a keyboard is likely to cost £2000+, while extra modules can cost anything from £50 to £500+ each.
These prices put modular synthesizers out of range of younger and poorer musicians, which is a shame. There are software equivalents, such as the excellent open source project VCV Rack, but they lack the tactile interactivity of a physical synth.
This brings us to my project, the PolyMod. It is functionally almost identical to an analogue modular synthesizer. You still install individual modules in a case and patch them together to make a sound. However, rather than using an analogue signal chain, the PolyMod is basically a software synthesizer with a physical form. Here's how it works:
The PolyMod consists of a Teensy 3.6 (basically a tiny computer) and a series of modules. Each module in the PolyMod is simply a collection of sockets and potentiometers, with no audio circuitry whatsoever. When the synth is turned on, the computer scans each module to see what type it is (oscillator, filter, amplifier, etc). If the computer detects an oscillator module, for instance, it creates a virtual oscillator module in a software synthesizer.
The computer then continually listens for connections between the modules' sockets. If a patch cable is connected between the oscillator's square wave output and the synth's master stage, for instance, the software synth will also create this connection, and a square wave will be heard. If the user removes the patch cable, the software synth will delete the connection and the sound will cease.
Performing the synthesis in this way means that I was able to build a working modular synthesizer (including eight modules) for about £150. What's even more exciting is that the modules themselves only require about £4 of components each.
In a way, this is comparing apples with oranges. The appeal for a lot of serious modular synth users is, after all, the pure analogue sound, whereas the PolyMod produces all its audio digitally. However, I think the audio quality is certainly good enough to be of interest to people who couldn't afford an analogue modular setup. What's more, there is one rather exciting feature that the PolyMod has, which can't be replicated on an analogue modular synth... polyphony!
Analogue modular systems are geared towards playing one note at a time. Playing chords or harmonies (more than one note at once) is technically possible, but requires a lot of modules and an awful lot of patch cables - this discussion...
Well, rather excitingly, I was one of the winners of the musical instrument category! This means I'm now doing a last-minute scramble to make sure my project is fully documented ready for the finals deadline. Accordingly, here are lots of photos of my synthesizer, inside and out.
This is the synth with all its modules in place, ready to play, viewed from a few different angles:
There are two sockets on the back: a standard 1/4" audio output jack, and a USB power input, which can also be used to upload new code to the Teensy.
This is what the synth looks like it with no modules in it. Note the metal threaded inserts at the top and bottom, which allow the modules to be securely screwed in place, and the slotted wooden section just below the white circuit board, which helps to align the modules.
Here is a close-up of the 12-pin module headers. This circuit board is mounted on nylon standoffs.
Here is a typical module (this one is a filter) with three knobs and six sockets.
Viewed from another angle, you can see how the second row of sockets is mounted using nylon standoffs.
I took a photo of two modules side by side to demonstrate that there is almost no difference in circuitry between different modules. The only thing that really changes is the layout of the knobs and sockets.
Back inside the synth now, this photo shows the back of the master module, which has a monophonic/polyphonic toggle switch, a volume control and a couple of LEDs. The unusual L-shaped board was a compromise to allow the Teensy to sit below the master module - I will change this in the future.
And here's a photo of the main circuit board, which is basically just a Teensy (with an audio board) and four 4051 multiplexer/demultiplexer ICs. The overwhelming number of wires (which mainly communicate with the modules) is a weakness of the design. I hope to solve this in my next prototype, which is very likely to use a proper PCB rather than stripboard!
Finally, here's a look at how the keyboard mechanism works. Again, it's a bunch of multiplexer chips (I promise I do sometimes use other chips, this project just happened to need loads of the same one!). There is a tactile button under each key, and the keys themselves were borrowed from an old toy keyboard and secured with machine screws.
I've made another, less musically interesting video where I demonstrate the basic functionality of the synthesizer. EDIT: I've since made a better demonstration video here for the finals: https://youtu.be/ALa5z5EOo8k
I'm really happy with how this whole project turned out. I wasn't sure whether the Teensy would be powerful enough for polyphonic synthesis of this complexity, but it worked brilliantly. I also worried that latency would be an issue, but I've managed to iron out any problems and latency is currently imperceptible.
I have a few ideas for future improvements, such as adding a save feature for patches, and adding onboard audio recording, but mainly I just want to keep designing and adding modules and experimenting with the synth to see what kind of sounds I can get out of it!
It's Saturday, 9 AM, two days until the deadline. Oxford is grey and murky. I'm psyching myself up for the final push, watching the Battlebots final while I wait for the clock to tick round to a reasonable hour to use power tools on a weekend.
Over the past couple of weeks, I've battled against my limited woodworking skills to build a plywood case for my synth, upcycled from an old bookcase I found abandoned on my street. Here's what it looks like at the moment:
The modules are now supported by an angled shelf, and (once I have built front panels for them) will be held in place by thumb screws, screwed into threaded inserts both above and below.
The keyboard is now also in place. There was no real need for a keyboard for this project, and most people would have simply added a MIDI input instead, but I wanted a standalone instrument that I could play with minimal setup, so I looked for ways to include a keyboard. I settled on repurposing the plastic keys from a cheap toy keyboard, positioning each key over a tactile button and routing the 32 keys through four multiplexers to reduce the number of Teensy pins required. I could have gone further and reduced the keys to just one pin, but I was doing okay for pin availability and was also worried about latency, so settled for four.
I've also added USB and audio jacks on the back of the synth. Top tip: whenever possible, avoid square holes. Maybe there's a good way to cut square holes in a way that isn't messy and/or slow, but I certainly haven't found it yet.
Anyway, here's my ambitious plan for the final weekend of the project:
Drill holes in the module front panels to accommodate the sockets and potentiometers
Assemble the modules and test each one
Add a toggle switch to choose between monophonic and polyphonic modes, and adjust the code accordingly
Cut remaining wooden parts: main front panel, keyboard circuit cover panel, angled panel beneath the modules
Attach the remaining wooden parts
Spend some time playing the synth, adjust the code if required
Plan composition video (some ideas already, excited about this!)
Record composition video, edit and upload
Update/create Fritzing diagrams
Draw exploded diagram (or similar) of project
Do super-detailed write-up of project on Hackaday
If I have time, disassemble and reassemble project on camera for time lapse video
This project involves code, electronics, and (if you want to build a case) woodwork. As well as the items listed in the bill of materials (in the "files" section of this project), here are the tools you'll need before you get started:
For the electronics: soldering equipment, stripboard track cutter, wire cutters, wire strippers, crimping tool (optional - you could buy pre-crimped cables)
For building the wooden case: hand saw and/or circular saw, drill, screwdriver, hex keys
N.B. The instructions listed here should be sufficient for you to recreate my prototype synth. However, there are likely to be features that you feel are unnecessary or that you would like to implement differently, so I would recommend only using these instructions as a guide for you to create a synth that is suited to your own needs. Don't be afraid to diverge from my design decisions!
Assemble the main circuit board
Position the components and wires according to the illustration below. Solder the components then cut the tracks. Make sure to use headers rather than soldering the Teensy directly to the stripboard, and don't add the Teensy just yet.
You'll notice that most of the module headers are not connected in the diagram - there are so many wires that it would be confusing to show on the illustration, and I'm not very good at schematics! Basically there are four wires for each module socket that need to be wired to the appropriate channel on each of the 4051 chips. You can see in the illustration that socket 7 has been fully wired up already. To wire up socket 6:
Pin 3: wire this to channel 6 of the first 4051 chip
Pin 4: wire this to channel 6 of the fourth 4051 chip
Pin 5: wire this to channel 6 of the third 4051 chip
Pin 12: wire this to channel 6 of the second 4051 chip
You'll need to refer to a diagram of the 4051 chip to see which channel is on which pin. Once you've wired up channel 6, wire up the other sockets in the same way (i.e. the wires from socket 5 go to channel 5 of the various 4051 chips).
Here's a photo of how the module sockets are supposed to look, in case that helps!
Solder stackable (extra long) headers to the Teensy, such that it is has male pins protruding below and female headers on top. Solder male headers to the Teensy audio board, such that its pins protrude below, and push the audio board's pins into the Teensy's female headers, making sure the pin numbers are aligned.
Test the Teensy before connecting it to the main circuit board by uploading some test sketches from the Arduino IDE. Try "Basics/Blink" to test the Teensy itself and "Audio/Synthesis/PlaySynthMusic" to test the audio board (music should play through the headphone socket).
Next, carefully push the Teensy into the appropriate female headers on the main circuit board and check it still works. If it cuts out or you can't upload sketches any more, disconnect the cable and check your soldering.