Close

Breadboarding

A project log for 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.

matt-bradshawMatt Bradshaw 08/23/2018 at 22:000 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 {
  public:
    LFO();
  private:
    AudioSynthWaveform _saw;
    AudioSynthWaveform _inverseSaw;
    AudioSynthWaveform _sine;
    AudioSynthWaveform _triangle;
    AudioSynthWaveform _square;
};

#endif

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

Discussions