-
Breadboard Polyphonic Synth Tutorial
03/13/2019 at 21:44 • 0 commentsA couple of months ago, I pitched an idea to Hackspace Magazine: I would write a tutorial on how to create a miniature, breadboard-friendly version of the PolyMod synth. They said yes and allowed me to split the tutorial across two issues. Part one was published a couple of weeks ago, and part two should be out before long. Here's the link to the issue containing part one - there is a free downloadable PDF of the whole magazine, although I encourage you to buy a copy if you can! https://hackspace.raspberrypi.org/issues/16
This was a fun and worthwhile diversion, partly because I wanted to provide an easier way to get started building a PolyMod-style synth, but also because taking the PolyMod concept back to basics was a useful intellectual exercise, forcing me to concentrate more on my code.
I started by building an unwieldy three-breadboard design, before refining it down to two breadboards. This design included 16 patch sockets (oscillators, filter, LFO, amplifier, envelope, etc), an octave's worth of tactile buttons, two potentiometers, and a MIDI input. I was really pleased with how much I'd been able to squeeze in, but since the tutorial was in two parts, I also needed an even simpler (but still functional) design that builders could end up with at the end of part one.
I wasn't sure whether it was possible, but with some cosy chip placement, I was able to get a design working on a single breadboard with 8 patch sockets (oscillators, LFO, filter, amplifier) and two potentiometers. The synth wasn't able to do much other than make annoying siren noises or filter sweeps, but it was technically a semi-modular synth on a single breadboard, which was cool.
While the concept of the breadboard synth was based on the PolyMod, there were a few differences. Firstly, I didn't want to get into connecting and disconnecting virtual connections in the code, because it's a relatively undocumented feature and not hugely easy to explain. Instead, I did something a bit controversial and connected every single output to every single input simultaneously, via mixers, and just turned the mixer channels on and off to match the physical connections (see tutorial for more details).
Connecting everything to everything else in this way doesn't scale very nicely, and therefore isn't really practical for the main PolyMod project, but it does have an advantage: since all the connections are going through mixers, it's possible to connect multiple outputs to a single input. Inspired by this, I'm going to try and write a more advanced virtual connection class for PolyMod 2, which will allow automatic mixing of input sources - this will have interesting uses for CV inputs, and obvious benefits for audio inputs.
Keep an eye out for the next issue of Hackspace, which will hopefully feature part two of this tutorial, and let me know if you get stuck building the synth.
-
HackChat and new project
01/23/2019 at 14:04 • 0 commentsHello followers of the PolyMod project! Just wanted to let you know that I'll be doing a live HackChat (AMA) today (Jan 23rd) at noon PST / 3PM EST / 8PM GMT. Looking forward to answering some questions and maybe getting a few ideas from the community about what to do next with this project. Here's the link: https://hackaday.io/event/163214-open-source-synthesizers-hack-chat
Also, in case anyone is interested, I've started a new project for "PolyMod 2", the successor to this synth. It's still in the early stages but it's where I'll be posting updates from now on: https://hackaday.io/project/162812-polymod-2-modular-digital-synthesizer
-
PolyMod 2.0: a rambling list of ideas
12/13/2018 at 14:20 • 0 commentsIt's a few weeks now since I finished the PolyMod prototype, and my head is now clear enough to think about what comes next. Here's a list of things that I'm imagining will feature in version two:
- Easier to build
- Use PCB's rather than stripboard
- Design a 3D-printable case and 3D-printable module faceplates (while retaining the option of making it out of wood if that's your thing)
- A bigger/better/extensible library of modules
- A publicly editable database of modules, with version numbers, descriptions, graphical previews, etc
- An online (open source) tool to generate custom Teensy code with your personal selection of modules included
- Adding these features will move this project slightly closer to the appeal of modular synths, in that there could end up being a large and diverse variety of quirky modules to choose from
- A display and menu system
- This is controversial . There was something really appealing about the fact that the first version didn't have a menu system - having to navigate through a maze of sub-menus is one of the worst things about modern synths like the MicroKorg, but... there are some really cool features I could add if I had a simple menu system, such as:
- Saving/retrieving patches, something that you can't do on a regular modular synth
- Changing the "identity" of a given physical module without having to resolder anything - you could use the menu to let the system know that module #13, for example, is no longer a low-pass filter but is instead an eight-step sequencer
- Maybe onboard audio recording? That would be pretty sweet, and within the Teensy's capabilities
- I promise that you won't HAVE to use the menu system unless you're trying to alter a module's identity, which I think is a fair compromise. I realise I'm talking to myself now
- External audio inputs would be pretty sweet
- Better module design
- Separating the design of the physical modules (many of which are similar or identical) from the design of the faceplates/front panels (which vary hugely), making it much easier to try out different modules by simply switching out the front panels (or even just relabelling them)
- Allow double/triple width designs for more complex modules
- LEDs!
- A less fiddly way of mounting the modules (currently easy to be off by one pin, causing a short circuit)
- DIP switches to give modules custom ID numbers
- A MIDI input instead of a built in keyboard (probably)
- The keyboard part of the previous project was a stupid idea - it was loads of work for something that works much worse than a normal keyboard
- Doing away with a traditional keyboard will make the synth super compact
- I might do a simplified keyboard instead
- Future-proofing / modular design
- If possible, I would like to design the new system so that it can be upgraded to Teensy 4.0 or a different processor in the future
- It would be nice if the system's main "brain" was properly separated from the part where you plug modules in. Ideally, I would like an endlessly extensible system, where you could connect an unlimited number of modules, perhaps in blocks of 8 or 16. Maybe this is something for the more distant future
- A more sensible form factor? Maybe something that could somehow integrate with Eurorack would be cool
- Maybe use cheaper patch cables/sockets
- It would be good to further bring down the cost of building the PolyMod
- The 3.5mm cables and sockets I used on the previous version have two possible connections (nominally signal and ground), which makes them overkill for this project, where I only need one connection. I could happily get away with just using breadboard jumper wires and female headers
- Using 3.5mm cables is also confusing because it falsely implies Eurorack compatibility
Okay, that's enough typing. I suspect this new iteration will be different enough that I should make a new Hackaday project for it, so stay tuned!
- Easier to build
-
The Next Stage: PCB
10/26/2018 at 13:45 • 0 commentsIt'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
10/22/2018 at 12:15 • 0 commentsOne 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
10/22/2018 at 07:25 • 0 commentsThis 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 on a modular synth forum is a good summary of how hard it is to do: https://www.muffwiggler.com/forum/viewtopic.php?t=54757
However, an interesting side effect of the way the PolyMod works is that polyphony was actually very easy to implement! When in polyphonic mode, the PolyMod simply creates four copies of each module instead of one, and then creates four virtual audio connections every time a single physical patch cable is connected.
I hope this long ramble has cleared up exactly why I made this synth. In conclusion:
- It's cheaper to build
- It may not be analogue, but it still sounds pretty cool for the price
- It's a polyphonic modular synth, which I don't think has really been done before
-
Lots of photos!
10/21/2018 at 13:01 • 0 commentsWell, 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
10/08/2018 at 13:50 • 0 commentsI'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
10/07/2018 at 22:29 • 0 commentsIt'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
10/06/2018 at 08:24 • 0 commentsIt'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