Hopp til hovedinnhold

Ahh, synthesizers, the modern marvels of music creation. Loved or hated, but never ignored. What makes them tick? I’m on a journey to find out, building an analog synthesizer from scratch.

I’ve always been incredibly fascinated by synthesizers. Growing up in the 80s and early 90s, the first golden age of the synth, I used to play air synth when others played air guitar. My interest however, goes deeper than playing. I always wanted to know what made a synth do what it does, so what better way to find out than building one myself?

I started with very basic electronics years ago. I built my first midi controller in 2004, around the same time I started collecting synthesizers. I built a TB-303 and a TR-909 clone, and got into making modular synth modules, etching my own circuit boards and hand soldering everything. All the time though, I had a greater goal in mind. I wanted to build a full size, polyphonic keyboard synthesizer.

Machine Beats 909 clone
My first big project, the Machine Beats 909 clone


But what is a synthesizer?

A synthesizer is a general term describing a device that makes sound. It may be a physical instrument or it could be completely virtual, running as software on a computer. It can have an attached keyboard or it can be controlled by other means. It can make sounds tuned to a specific musical scale or just abstract sounds and noises. And finally, it may be digital, using some sort of computer or microcontroller to generate sound, it may be analog and use the flow of electricity through electronic components, or it can be a mix of digital and analog.

Child playing a way too expensive synthesizer
The most important feature of a synth is the color of the buttons, to appeal to toddlers

Building the beast

Every sub genre of synth has its dedicated following, and as with all fields where people are passionate about what they do, there is a lot of friendly fighting between the supporters of each type. Coming from an engineering background, I tend to think that whatever gets the job done without sacrificing the essentials is a good choice.

There are many directions to take a project like this, so I started with a list of requirements. When finished, my synth:

  • Plays notes, it can be used for playing melodies and chords. None of that droning nonsense
  • Is polyphonic, it can play multiple notes at the same time, because chords
  • Is multi-timbral, meaning that the same instrument can generate multiple different sounds at the same time
  • Has a keyboard and an extensive physical user interface where most of the functions are directly available, essentially “one knob - one function”.
  • Is computer controlled but generates the sounds using analog electronics, because nothing beats the sound of electrons flowing through a transistor.
  • Is physical, because where’s the fun in software, right? Right.
  • Is professionally built and looks smashing!
  • …and sounds great too. Let’s not forget that.

Now, those are some ambitious requirements. I’ll try to break them down a bit to show what is actually going on.

Analog circuits

At the heart of the synth sits the analog voice cards. I use electronic components - resistors, capacitors, op amps, transistors etc - to shape an electrical current into sound. In general, everything that touches the sound wave, from its source - oscillators that generate a pitched sound wave - through mixers and filters that shape the wave and remove or accentuate frequencies - is analog. I either design these circuits myself, or copy them from old synthesizer service manuals. I’ve spent countless hours studying the theory behind the circuits to be able to modify them.

Each voice card is capable of generating a single note at any time, so to get polyphony multiple voice cards are needed. I aim for 16 notes of polyphony, meaning every circuit has to be repeated 16 times.

Circuit diagram after simulation and breadboarding
Circuit diagram after simulation and breadboarding

My process of designing circuits usually begins with simulating the circuit in LT Spice, a free electronics simulator. I then breadboard the simulated circuit to see how it performs in real life, before entering the schematics into Eagle PCB*, a schematics capture and circuit board layout tool where I also design the circuit board. Finally, the circuit boards are produced and populated with parts by JLCPCB in China.

* I use Eagle as it was the only simple option available when I started designing circuits. Today I would have chosen to learn KiCad instead.

Layout of printed circuit board
Layout of printed circuit board

Finished PCB with factory soldered parts
Finished PCB with factory soldered parts

Control circuits

While the sound generating circuitry is analog, it needs something to control it. To be feasible, a polyphonic synthesizer uses digital control, and the easiest way to do this is to use microcontrollers.

When I started playing around with microcontrollers there was no Arduino, not a lot of available libraries to help out, and the microcontrollers were slow and 8 bit, running at 16MHz. Luckily the world has caught up, and now we can use the Teensy 4.x controllers and the full Arduino suite of tools and libraries. The Teensy is 32 bit, runs at 600MHz and can reach an effective throughput of around 1GHz.

Teensy 4.1 microcontroller
Teensy 4.1 microcontroller

In my system, I use one Teensy per voice card. It is responsible for generating 64 control voltages with a 12kHz refresh rate, and does this using a four channel 16 bit DAC that is time-multiplexed through 64 sample-and-hold circuits. The voltages control things like oscillator pitch, amplifier volumes, filter cutoff frequency and resonance and all kinds of modulation. Envelopes and LFOs are digitally generated, which to some analog purists is a death sin, but it simply opens up so many possibilities that I found it the only sane option.

I have not found the ultimate tools for doing microcontroller development yet. At the moment I do most of the coding in IntelliJ, simply because that’s the IDE that I know best, though it sucks as a C/C++ editor. I do compilation through the Teensyduino editor as it has a serial monitor where I can get feedback from the microcontroller. I know there are better options out there but I have not prioritized learning them yet.

UI

The synth needs a way for the user to control it, and one of the main motivations for making my own synth in the first place was to have a very hands-on interface. I have physical knobs and buttons for almost all functions, so no menu diving is needed to find controls.

As a synth needs to be able to store and recall various sounds - patches - we quickly run into a major issue with the UI. We need the knobs to reflect whatever setting that parameter currently has. If we use normal potentiometers, these will not be at the correct position when a patch is loaded. To solve this, I’m using a ring of LEDs around the potentiometer indicating its current position, and endless potentiometers that do not have defined start and stop positions.

Led ring prototype
LED ring prototype, will show potentiometer position

Getting a physical UI right is a hard task. At the same time the UI is the most expensive part of a synthesizer, so proper prototyping is essential. I’ve solved this by making a working UI as a web app. I use React-controlled SVGs for the front panel as that lets me use precise units, meaning what you see on screen is what you get on the panel. The web app communicates with the microcontrollers through WebMIDI.

Synthesizer control surface

Changing the layout of the web app is of course much simpler than rearranging a physical UI. It is however essential to make physical prototypes along the way to get a feel of the spacing and size of things. I’m lucky enough to have access to an Epilog laser cutter at the Bekk workshop, so I cut test panels from MDF. Also, playing around with different potentiometers and buttons to get the feel of everything juuust right is a lot of fun!

I've lost count of how many different knobs I've ordered and tested
I've lost count of how many different knobs I've ordered and tested

Physical design is mostly done in Fusion 360, and the final production will be partially on the Bekk CNC machine and partially using online services such as eMachineShop and Front Panel Designer/Schaeffer-AG

GUI

While the one knob - one function principle works great for most things, there are some that benefit from having a screen. I have included a high res 9 inch multitouch screen at the center of the UI. This lets us see the envelope shape, do advanced LFO and arpeggiator settings, route modulation in a modulation matrix, and of course do any kind of configuration as well as patch storage operations.

GUI for controlling detailed parameters

The GUI is a React app with a node backend, currently running on a Raspberry PI and communicating with the Teensy microcontrollers over SPI.

An added benefit of having the UI prototype as a web app is that I can develop the UI and the GUI at the same time, in the same app. The GUI on the synth then becomes a subset of the prototype app.

State of this madness

Where am I at right now? I have completed almost all research, and made physical circuit boards for most functions. Five new boards are sent to production this week, and I have everything hooked up on a huge breadboard.

Breadboarded circuit
Just need to superglue everything together and we're finished!

Before I design the final voice card I need to verify my architecture with people that actually play synths to see if my ideas make sense in the real world. Once that’s finished, I’ll start assembling multiple voice cards into a polyphonic synth, still with a virtual UI. Only then will I commit to the final layout and start producing the physical control surfaces.

My passion project

I’ve come to realize that my project is so huge that I will probably only do this once, which means I need to do it properly. It will take a long time to complete, and from the start I’ve talked about it as my ten year project. I’m now in my eight year and still going strong - and I’ve learned so much and had so much fun along the way!

To me, that is the essence of everything. The process and journey in itself is what’s important. The dream of building something great is inspiring, but without partial goals and small successes along the way it would be impossible to stay motivated.

So, will I manage to finish this within my original 10 year time frame? Probably not, especially not the control surfaces, and I’m a bit more stressed out by this than I’d like to admit. I will however definitely have a working, playable, polyphonic, multitimbral, analog-digital hybrid instrument, and that’s awesome!




PS: I love talking synth, especially hardware, so feel free to contact me. I have a blog documenting everything I do at http://atosynth.blogspot.com, and while it is written mostly to document things for myself it may be of some interest to other very nerdy people out there too!

Did you like the post?

Feel free to share it with friends and colleagues