In the hut of the Baba Yaga, pt. 1: A homemade digital synthesizer

In the hut of the Baba Yaga, pt. 1: A homemade digital synthesizer

I became fascinated with analog and digital synthesizers during my first visit to Moogfest in 2016.

Prior to this festival, I’d often thought about the synthesizer as a visual staple of 80s music: It was a keyboard that immitated sounds with varying quality. The analog racks of Moog and Buchla instruments looked more like switchboards from early telephony. These consoles seemed so stuffed with sockets and switches that I reasoned there was no way a person could conceivably know what most of the hardware did.

During Moogfest, I was able to meet talented artists, engineers, programmers and enthusiasts, and I learned about all the forms that synthesizers can take. I learned about signals and voltage control, and how makers from all over the U.S. were applying creativity to synthesis and producing new sounds.

In the summer of 2018, during a break in my classes, I decided to embark on designing, building and programming a stand-alone digital synthesizer. I started calling it Baba Yaga, as a reference to Moog’s Mother 32 (the Baba portion) and as an homage to the Polivoks synthesizers that inspired much of the panel’s design. Logically, I viewed this project in two distinct halves: hardware and software. This post will cover the design of the hardware.

Lights and sounds and buttons and dials

I had a Raspberry Pi, v. 3 B+ from a previous project, and for the sake of convenience, I decided to use this as the synthesizer’s brain. The Pi has adequate power to run Pure Data or SuperCollider, and while the on-board sound card is a bit lackluster, many inexpensive USB sound cards would allow for improved audio, as well as input capabilities. An important consideration for me was that, as a largely software synth, this instrument could easily be expanded through additional connectivity–be it phsyical audio inputs or through Bluetooth, WiFi or ethernet.

A breadboard prototype of the synthesizer hardware with two digital I/O expanders.

The overall design was meant to imitate a small Eurorack modular with a few basic modules: three oscillators, ADSR, reverb, VCF, sequencer and mixer. This meant a combination of potentiometers, switches, instantaneous release buttons and LEDs. The first snag, however, is that the Rasbperry Pi has no analog inputs on its GPIO pins. To read an analog potentiometer, I would need an analog-to-digital converter.

To accommodate all the potentiometers I wanted, I would need about 40 analog inputs. To accomplish this, I used five MCP3008 chips, each with eight analog inputs. The chips interface via SPI connection, but the Pi only has limited pins for this. As a work around, I used a software SPI library in Python, giving each pin its own MOSI, MISO and CS pin from the Pi’s general-purpose GPIO pins. I daisy-chained all the CLK pins of the chips together.

The complete circuit assembled on a piece of perfboard.

Additionally, my project required more digital input and output pins than were remaining on the Raspberry Pi. For this, I purchased four MCP23017 chips, which interface with the Raspberry Pi’s I2C bus. These ICs have 16 pins that can be configured as inputs or outputs. So that multiple chips can be used, they use an addressing scheme, based on running the ground or 3.3V to three designated pins. As long as the address to each chip is unique, the SCL and SDA pins can be wired together and run to the corresponding pins on the Raspberry Pi. Again, a Python library makes using these chips quite simple.

The synthesizer’s front panel as it cycles through a test script.

 

The output of a simple test script for cycling through the analog to digital converter chips.

Once I begin assembling and testing the potentiometers, switches and buttons, I’ll have a greater sense of the performance of the code and hardware.