4 Operator FM Synth w/ Teensy 3.2

Status
Not open for further replies.

warblingwombats

New member
Hey all, I've been looking for a new Teensy synth project to start, and since I liked my 2 operator 'complex oscillator' I built with a teensy I've decided to try some tests to see if I can get a 4 operator FM synth working. One thing I'm really interested in is the possibility of changing FM algorithms like the Yamaha DX7 but simplifying a few things. So, is it possible to change the AudioConnection variables in Void loops or are they static once declared at the top? I'd really like to have different modes for FM algorithms using the same 4 sine wave/ sine_fm objects so I can easily modify parameters with a minimal amount of potentiometers. If this isn't possible, does anyone have suggestions for workarounds? The only other way I can think is to create each algorithm and set the inactive algorithms to 0 gain but I'm worried with the amount of algorithms that I'll run out of memory. Thanks for the help!
 
I'm worried with the amount of algorithms that I'll run out of memory.

You'll probably hit CPU usage problems long before running short on memory. The modulated waveform synth code uses very little memory. Usually memory issues come up when you use lots of effects like reverb, chorus and delay. Just synthesizing waveforms takes very little memory.

The waveform synth provides both frequency and phase modulation. Modulating phase is a linear operation which avoids the overhead of computing exponential scaling (think "volt per octave") on every sample, so if you've concerned about running so many, try to use phase modulation if you can.

The audio library provides functions to monitor the current and worst case memory and CPU usage as your system runs. Don't spend a huge amount of time worrying about what memory usage *might* be. Experiment and use those functions. Then you will know what it actually is.

If you run short on resources as you scale up to many voices, you can always step up to Teensy 4.0.
 
FWIW: I just got around to playing with your code in this post.
You can get it to generate audio by turning on waveformMod1
Code:
  waveformMod1.begin(0.5, 55,WAVEFORM_SAWTOOTH);
in setup().

Pete
 
Oh yeah, I got that project working a while ago. It ended up being kinda cool but lately I've been feeling like I could do a lot more with the FM/ waveshaping possibilities that Teensy audio library has. That's why I started this thread, to see if my new idea was feasible.
 
Status
Not open for further replies.
Back
Top