PolyMod: modular digital synthesizer

By Matt Bradshaw

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.

All code for this project is open source! https://github.com/mattybrad/polymod

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

JPEG Image - 3.20 MB - 10/22/2018 at 12:51

Preview Download

JPEG Image - 2.89 MB - 10/22/2018 at 12:51

Preview Download

JPEG Image - 2.86 MB - 10/22/2018 at 12:51

Preview Download
Bill of materials to build a PolyMod synthesizer

Microsoft Office - OOXML - Spreadsheet - 13.88 kB - 10/22/2018 at 10:01

  • 1 × See BOM in files section
  • Matt Bradshaw01/23/2019 at 14:04 0 comments
  • Matt Bradshaw12/13/2018 at 14:20 0 comments
  • Matt Bradshaw10/26/2018 at 13:45 0 comments
  • Matt Bradshaw10/22/2018 at 12:15 0 comments

    One final update: since the requirements for the Hackaday Prize finals are a bit more stringent than the first round, I've made a new video which I hope explains the project a bit better:

  • Matt Bradshaw10/22/2018 at 07:25 0 comments

    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...

    Read more »
  • Matt Bradshaw10/21/2018 at 13:01 0 comments

    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.

  • Matt Bradshaw10/08/2018 at 13:50 0 comments

    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!

  • Matt Bradshaw10/07/2018 at 22:29 0 comments

    It's done! Very long weekend but the synth is finished (for now) and I've made a demo track, which you can watch below:

  • Matt Bradshaw10/06/2018 at 08:24 0 comments

    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
    • Sleep
  • Matt Bradshaw09/14/2018 at 14:27 0 comments

    Made a quick YouTube video of my progress so far. The instrument won't be able to make any "pleasant" sounds until I've got the keyboard working, but it's making some fun dirty weird sounds already:

    Next step is to start making the case. My first attempt at a case was too small, so I've redesigned it and am going to start making it next week.

View all 14 project logs

  • 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:

    Software: Arduino IDE and Teensyduino for uploading code to the Teensy https://www.pjrc.com/teensy/teensyduino.html

    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.

    If everything is good, you can upload the PolyMod sketch, which can be found on the PolyMod GitHub repo: https://github.com/mattybrad/polymod

View all 13 instructions

Alexander wrote 6 days ago

I have followed this project for a while, and I absolutely love it. It looks great, sounds great, and piques my love for synths. I play around with my Midibox every now and then but your project just sounds so... awesome! The idea of making a digital synth which connects like an analogue one is incredible. I want to play with it!

Are you sure? yes | no

Matt Bradshaw wrote 6 days ago

Thank you! Really happy you think it sounds good. I was in a synth store yesterday playing with some really nice Eurorack modules, and it inspired me to keep pushing on with this project. Keep an eye on my other project (PolyMod 2), where I'll hopefully be posting some exciting updates over the next few months :)

Are you sure? yes | no

Alexander wrote 6 days ago

That sounds amazing! I seriously need to sit down and build a synth, even if it's just a kit based on someone else's design (like yours). It's so satisfying after all that soldering to hear sounds coming out of your creation!

Are you sure? yes | no

Tillo wrote 01/25/2019 at 14:54

Just looked at it right now. Just as a pretty cheap and easy idea for face plates. Do it as PCBs, if ordering the PCBs the can easily added to the panelization, its pretty sturdy (1.6mm FR4) and can look amazing ;)

Are you sure? yes | no

eddydepoorter.23 wrote 01/21/2019 at 19:26

Amazing work !!! I've worked on something similar last summer but with switched jack sockets and sending messages to pure data for live patching of modules. Your solution is way clever !!!

Are you sure? yes | no

Stefano Garuti wrote 01/15/2019 at 12:39

Really really really great job! Wonderful documentation too! 

I Like a lot your plan for the 2.0 version too. 

Until today I focused on build MIDI controllers.. your project could be the spark that get my starts with audio generation too. Btw, Teensy is great! ;-)


Are you sure? yes | no

rafununu wrote 12/10/2018 at 15:02

Hi there, I'm not very familiar with Arduino (even if I developped a lot i the past... but in assembler) and looking at your code on github, in the .ino file, the ENVELOPE_MODULE is written twice (line 118), it must be the CRUSHER_MODULE I think. Congrats, your code is pleasantly readable and well structured. I like the idea of creating virtual analog modules in a digital environment. I'm gonna make something very similar but with a matrix, as on the EMS AKS.

Are you sure? yes | no

Matt Bradshaw wrote 12/10/2018 at 15:10

Hi, thanks for the nice comment :) Yes, that line does look a bit odd, but I can explain. That whole block of code (from line 108 to 119) is actually currently unused (note the if(false) statement). It was a section of code which allowed me to simulate modules in software before I had actually built them, and the two envelope modules were because I wanted to use one as an amplitude envelope and the other as a filter envelope. Hope that makes sense!

Are you sure? yes | no

Roger Labbett wrote 11/29/2018 at 14:49

This is a really inspiring project. I have been tinkering with the Teensy Audio Library for about a year with a view to building a synth.  Recently I have been juggling with the apparently conflicting requirements of creating a presentable and usable instrument that isn't just a breadboad rats nest while allowing for future expansion and experimentation.  I think you have solved my problem. Good luck with the competition!

Are you sure? yes | no

Roger Labbett wrote 12/16/2018 at 16:44

I have got the extra hardware I need on order and am hoping to make a start over the Christmas break if everything turns up in time.  I am a metalworker rather than a woodworker, so mine will be built in aluminium.

Are you sure? yes | no