GetDunne Wiki

Notes from the desk of Shane Dunne, software development consultant

User Tools

Site Tools


sarah

This is an old revision of the document!


SARAH: FFT-based synthesizer plugin

SARAH is an improved and expanded version of VanillaJuce which uses the new DSP classes provided in JUCE 5.1 to address the problem of oscillator aliasing. It works by using juce::dsp::FFT to transform mathematically-perfect oscillator waveforms, zeroing out unwanted high-frequency harmonics, and reverse-transforming to produce perfectly band-limited wave tables. Just for fun (and because I wanted to know if it was even possible without killing the CPU), it also implements simulated low-pass filtering in the frequency domain.

Because of the use of the Harmonic Analysis, via the Fast Fourier Transform, and because Fourier himself was French, and because the really great name Harmor was already taken, and because there's a fabulous singer-songwriter in my hometown whose name is Sarah Harmer, I decided to use the name SARAH, and let it stand for synthèse à rapide analyse harmonique, or “synthesis by fast harmonic analysis”.

You can find the SARAH source-code (published under the GPL 3.0 license) on GitHub at https://github.com/getdunne/SARAH.

Basic signal flow

Click on the following diagram for a larger image.

The two oscillators OSC1 and OSC2 are the same in terms of how they are controlled. In addition to the “waveform”, “pitch” and “detune” settings (not shown), each has one control-input for pitch and one for harmonic shaping. The pitch-control signal is the sum of the Pitch LFO output plus that oscillator’s Pitch EG output. The shaping signal is the sum of the shape LFO output plus that oscillator’s Shape EG output scaled by the “envelope amount” setting. There is only one Pitch LFO and only one Shape LFO, which affect both oscillators; all other modules are duplicated.

The OSC1 and OSC2 outputs are mixed according to the “Blend” setting. The mixed output is scaled by the sum of the Amp EG output, plus the “Master volume” setting, and split out evenly (no panning) to the Left and Right audio outputs.

(More to come…)

sarah.1504640448.txt.gz · Last modified: 2017/09/05 19:40 by shane