PolyMod: modular digital synthesizer

A customisable digital synthesizer. Works like an analogue modular synthesizer but cheaper, and with the ability to play many notes at once.

Similar projects worth following
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 (along with potentiometer readings) back to a Teensy microcontroller 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 (where more than one note can be played at once), something that is difficult to do in an analogue modular system.

How The Synth Is Used:

  • Choose which modules you would like to use (oscillator, filter, amplifier, etc)
  • Push each module into a free module socket and secure it in place with thumb screws (no tools required)
  • Plug in a standard USB power supply
  • Connect the synth to an amplifier
  • Experiment with making sounds by connecting the modules to each other with patch cables - for instance, connect the oscillator to the main output to hear a basic tone
  • If you accidentally connect an output to an output, or an input to an input, the red LED will flash to let you know (but the synth will not be harmed!)
  • To switch between traditional monophonic mode (one note at a time) and polyphonic mode, flick the mono/poly switch - this will create four virtual copies of each module, allowing you to play chords (unlike on a traditional modular synthesizer)

How The Synth Is Constructed:

  • Plywood case, cut with circular saw / hand saw and joined with screws
  • Plastic toy keyboard keys mounted on a stripboard circuit, with each key aligned over a tactile button - the stripboard is mounted to the case using nylon standoffs, and connected to the main circuit board
  • Main circuit board mounted on a 45-degree angled piece of plywood, using nylon standoffs
  • Threaded inserts are screwed into the wood at the top and bottom of the module section, to accommodate the module mounting screws (thumb screws)
  • Each module consists of a stripboard circuit, several sockets and several potentiometers, with a 3mm wooden front panel. The front panels have 4mm mounting holes at the top and bottom, to keep the modules secure
  • The "master module" is a wider module with extra features, such as LEDs and a mode toggle switch, and is mounted permanently on the right hand side of the synth's front
  • Larger 3mm wooden panels are used to cover the exposed circuitry below the modules
  • Audio and power sockets are mounted in the back of the synth, and connected to the main circuit board

How The Synth 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...
Read more »

  • 1 × Teensy 3.6 Plus stackable header pins
  • 1 × Teensy audio board Plus stackable header pins
  • 8 × Angled male pin headers (12 pin) For connecting the modules to the main board
  • 12 × Female pin headers (12 pin) For connecting the modules and also the Teensy
  • 13 × Stripboard (various sizes) More details to come

View all 19 components

  • Basic Demonstration Video

    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. (Prize judges please note, this is not my official entry video!)

    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 Finished! Demo Video

    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:

  • The Final Stretch

    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

  • Video Demo

    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.

  • Lesson Learned / Steady Progress

    Matt Bradshaw09/05/2018 at 17:18 0 comments

    A couple of days ago I learned a lesson about not cutting corners. I hadn't been bothering to use chip holders/sockets for the numerous multiplexer chips in the synth, reasoning that they have seemed fairly immune to damage in previous projects, and that I didn't have enough chip holders to hand anyway. After spending a few hours crafting my second module, I plugged it in and started testing. It worked to an extent, but was glitchy. After lots of confused troubleshooting, I eventually surmised that one of the chips was faulty. Not being particularly great at soldering/desoldering, this ended up being a bit of a pain. Luckily in this case I was able to sort the problem out using a slightly dirty hack, but all subsequent modules now feature chip holders. Here's a spot-the-difference photo:

    In other news, I'm getting quicker and better at making the modules, which all feature a pretty similar design. I have also made some progress with repurposing the toy keyboard - more details soon.

  • Taking Shape

    Matt Bradshaw09/02/2018 at 02:50 0 comments

    The main circuit board is now largely built and working. It contains the Teensy and its audio add-on board, four shift registers to facilitate communication with the modules, and eight 12-pin female headers for the modules to connect to. Each module also contains four shift registers, as well as a number of sockets and potentiometers.

    In total, the main circuit can handle up to 64 potentiometers (eight per module) and 64 sockets (again, eight per module). The Teensy also receives an eight-bit ID code from each module, so that it knows which module is mounted in which slot.

    The wiring and soldering has been tedious but successful, with the only mistakes coming when I attempted to watch YouTube videos at the same time. It would make a lot of sense to use printed circuit boards rather than stripboard for this project in future, but the constantly evolving nature of the design means stripboard is still the most suitable method for this version. Also, I've never made a printed circuit board before, and it looks complicated...

    The only unforeseen issue so far was that the Teensy didn't fit underneath the modules, so I had to move it to a separate circuit board. There is a "master" module in the synth, which always needs to be present, so I moved that to sit permanently at the far end and cut away part of its circuit board so that it could fit next to the Teensy. This still left me with room for seven removable modules.

    As well as the main circuit board, I've now built three modules: the "master" module (containing the main output stage and future access to things like the keyboard notes), an oscillator, and a white noise source. These are all working fine, and the focus is now on creating lots more modules as quickly as possible. Here are some of the modules I want to try to have done by the Hackaday Prize deadline:

    • Master (done)
    • Noise / sample and hold (done)
    • Oscillator (done)
    • Amplifier
    • Low-frequency oscillator
    • Envelope generator
    • Resonant filter
    • Mixer
    • Bit-crusher / distortion
    • Delay / reverb
    • Wavetable oscillator

    The synth is already producing some distractingly interesting sounds - I'll post a video soon.

  • Breadboarding

    Matt Bradshaw08/23/2018 at 22:00 0 comments

    I've made a pretty decent start on the synth now. Here's a video of how it looked/sounded on the breadboard, with the jumper wires acting as modular synth patch cables, connecting three sounds in turn to the main output:

    I started by constructing a breadboard circuit which detects connections between different points of the circuit in real time. In this simplified version, there are eight possible connection points, and the Teensy sketch can print a message when a connection is made or broken. Doing this directly with the pins of a Teensy or Arduino would be relatively simple, but I knew that I would need more pins than were available. I ended up using a 4051 multiplexer chip to transmit an "on" signal to each pin in turn, and another 4051 to listen for this "on" signal for each pin in turn. It means I end up with an ungainly for-loop, and it also means that the final project will use around fifty(!) of these chips, but the chips are cheap in bulk and I haven't figured out a better way yet.

    After getting the simplified breadboard circuit to detect connections, I started on the code for the synthesizer audio generation. I wrote classes to represent all of the concepts in the synth: sockets, controls, patch cables, modules, etc. I hadn't done much class-based stuff in the Arduino IDE before, so I spent a while learning about how to extend classes - each module (filter, oscillator, amplifier, etc) is its own class, extended from a basic "module" class. Here's an example of me extending my "Module" class to make a low-frequency oscillator (LFO) class, using audio objects from the Teensy audio library.

    #ifndef LFO_h
    #define LFO_h
    #include "Arduino.h"
    #include "Module.h"
    #include <Audio.h>
    class LFO : public Module {
        AudioSynthWaveform _saw;
        AudioSynthWaveform _inverseSaw;
        AudioSynthWaveform _sine;
        AudioSynthWaveform _triangle;
        AudioSynthWaveform _square;

     I tested the modules, and they sounded good, so the next step is to figure out the physical design of a robust, removable module.

  • The Genesis

    Matt Bradshaw08/21/2018 at 21:12 0 comments

    Some notes on the project that preceded this one.

    Earlier this year I finished a digital semi-modular synthesizer and took it to Maker Faire UK. It was unwieldy and inelegant, being a beige MDF box filled with precariously wired breadboards, connected via an Arduino Mega to a laptop which was running a hacked-together soft-synth in Chrome because that was the only way I knew to make a bunch of components talk to a customisable synthesizer.

    There's an in-depth video of this project here:

    Despite its impracticality, this synth did make some cool noises and successfully demonstrated the concept of using a bunch of multiplexer chips to detect connections between sockets and sending that data to a digital synth. At the end of the video, I mused that a more advanced iteration of the project might be truly modular (containing removable/swappable modules). I was also keen to somehow contain the sound generation inside the instrument itself rather than relying on a tethered laptop: ideally I just wanted a power input and an audio output.

    I began investigating the practicalities of on-board sound generation. I had previously completed a big project (a retro synth-guitar hybrid) using a Teensy with an audio board/shield, and was very impressed with its synthesis capabilities, but my earlier research had led me to conclude that dynamically changing the routing between elements such as oscillators, amplifiers, filters etc was beyond the scope of the Teensy audio library. Happily, some further digging revealed this to be false: once I had got my head around pointers and references in the Arduino IDE (something I hadn't had to bother with before), it turned out to be totally possible. Suddenly, a DIY digital modular synthesizer appeared to be feasible.

    I promise that the next build log will attempt to approach the present tense.

View all 8 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates