Another Polyphonic Synth Project with Teensy 4.1

whannah

Member
synth-main-small.png

A couple years ago I made teensy based synth, but it kinda sucked... I had soldered wires directly to potentiometer legs meant for a breadboard and the connections kept breaking. I also had numerous issues with the code that caused all sorts of glitches. I became increasingly frustrated with the issues, which killed my motivation to address the shortcomings, so I shelved it.

Fast forward to 6-months ago, I decided to revisit this and make something that I could actually use. I went with sliders instead of knobs and used a laser cutter to make the top and rear panels so that everything was perfectly spaced with readable labels. The labels on the panel are hard to read in pictures, so here's an image of the top and rear panel design:
2025_synth_control_panel_v2.png

Almost every single part was from stuff I already had, so the project was really "cheap". The wiring is so much more robust and organized. The code is also much more stable, and it sounds better! I only bought screws and special perf boards for the sliders. I also strived to make it as compact as possible. This obviously made the innards pretty cramped, which has made it tricky to open it up and fix things, but that's not a big deal.
synth-guts-small.png

I'm using a Teensy 4.1 and heavily relying on the teensy audio library for the oscillators and filters. The current version of the code can be found here:
https://bitbucket.org/whannah1/teensy-synth/src/main/synth-v2/

Here's a video to hear what it sounds like:

While I do feel that it is mostly "done", there are a few very minor things that I still need to polish in the code. I also might rebuild the housing entirely because I slapped it together with scrap and I think I can make it look a lot nicer, perhaps with a walnut box. The back panel also flexes when you plug in the cables, so I'll probably reinforce that. There's also a couple things I want to tweak on the top panel (like reversing the direction of the oscillator wave slider), and luckily I have plenty of backer board for that, so I can cut out several more versions basically for free.

Some nerdy design notes and things left to address:
  • Something I added in the later stages of development was a persistent "drift". To accomplish this I added a low-frequency sine wave oscillator to each oscillator and used random perturbations to set the amplitude, frequency, and phase of each drift oscillator. At first I tried adding a simple random offset to each oscillator, but it didn't really add much "character" to the sound. The nuanced, slowly evolving detuning works much better. It's barely noticeable in practice, but is still noticeable in a direct side-by-side comparison.

  • I'm particularly proud of the arpeggiator design. The tempo is only controlled by the tap tempo, which is perfect for how I use arps. I either want to periodically sync up to a live band or loosely match the tempo in an Ableton session, or just use an arbitrary tempo. I never care what the exact BPM is. Another aspect that keeps it simple is that the order of notes in the pattern is only controlled by the order you press the notes on the keyboard. So if you want it to go up, you have to press them in that order. If you want a random order, just mashed a chord and see what you get. Without any additional UI controls it feels easy to control, while simultaneously acting as a "happy accident machine".

  • The oscillator 2 detune slider was originally linear, so that the oscillator were perfectly in tune at the top, and osc 2 was an octave down at the bottom - but this turned out to be difficult to use. I ended up using exponential scaling (x^4), which made the slider MUCH more useful. The first top half of the slider now leads to a slight detune, essentially creating a chorus-type effect, and the bottom half allows you dial in either a 5th or a full octave down in a controlled way. I used a similar scaling for the envelope time sliders to make the initial range more usable.

  • The middle switch (4-pole vs 2-pole) actually is only half implemented - but the plan is to make the "filter drive" slider blend between low-pass and band-pass. I really love the sound of the ladder filter emulation though, so I'm not sure how much I'll use the 2-pole mode.

  • Speaking of the "filter drive" slider, I'm not sure how much I'll use it because it gives a big volume boost, but it does give a nice saturation. I might implement a compensating volume reduction so that the drive essentially just adds saturation without the boost.

  • The envelope update call is problematic - this is most noticeable if an adjustment is made during the release phase. You can try to increase the release time, but the envelope will just cut out. I've disabled the envelope update until a new note is triggered - but I think there must be a fancier way to adjust the envelopes on the fly while they active, but I think I'll have to modify the envelope code directly.

  • The glide feature only works in monophonic mode - but it would be fun to figure out how to make it work polyphonically. I'm not quite sure how to approach that problem though... maybe some day I'll get inspired to tackle that.
 
Back
Top