Close
0%
0%

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

polymod BOM.xlsx

Bill of materials to build a PolyMod synthesizer

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

Download

  • 1 × See BOM in files section

  • The Next Stage: PCB

    Matt Bradshaw10/26/2018 at 13:45 0 comments

    It's been a couple of days since the Hackaday Prize finals submission deadline. I told myself I'd let this project sit for a while, since it now works well, but as I looked at the other projects with their neat schematics and PCB layouts, I realised I wanted to push my synth to that level. I'm now learning to use KiCad and it's really fun. I'm sure it'll take me a while to get my head around the process, but it would be really cool to be able to produce a version of my synth that doesn't take hundreds of hours to make, so here goes...

    I've got a bunch of other commitments but I'm aiming to get a PCB version of my synth working by the end of the year.

  • Finals Video

    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:

  • Why I Made This

    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 »

  • Lots of photos!

    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.

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

View all 12 project logs

  • 1
    Preparation

    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!

  • 2
    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!

  • 3
    Add the Teensy

    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

Enjoy this project?

Share

Discussions

purbannavage wrote 10/18/2018 at 17:22 point

Wood...right up my ally. Nice job!

  Are you sure? yes | no

Matt Bradshaw wrote 10/21/2018 at 11:25 point

Thanks! Someone was throwing away a plywood bookcase on my street and I thought it'd make a nice synth :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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