Analytic pluck synthesis
Geraint Luff originalNo feedback, no wavetables, no aliasing: synthesising a plucked-string sound using a family of directly-computable band-limited impulses.
Background
This article assumes you're familiar with Fourier analysis, complex phase and aliasing.
Here's something cool I found: a family of band-limited impulses where each frequency decays exponentially as we increase the shape parameter:
When used as an impulse train, this means we can synthesise a plucked-string sound with no aliasing, no detuning/phase issues, and no delay-buffers. Let's look at how that works:
Plucked strings
The key property which makes an instrument sound "plucked" is exponential decay. To sound natural, each harmonic decays at a different rate (usually faster for higher harmonics):
A common method for synthesising decaying harmonics like this is Karplus-Strong, which tunes a feedback-delay loop to the period of our virtual resonator/string, and sends an impulse through it to make it go "ding":
A big challenge with Karplus-Strong is choosing the delay to put inside the loop, because the ideal delay has some conflicting requirements:
- support fractional delays (because most notes won't have whole-sample wavelengths)
- have a very flat amplitude response (otherwise long notes will decay faster than intended)
- be linear phase (otherwise some frequencies are delayed longer than others, so harmonics can end up out of tune)
- support small delay times (for high notes)
Balancing these goals is tricky - on the other hand the overall structure is simple and intuitive, and you can get quite creative with the decay filter.
But we're not here for Karplus-Strong, let's try something different!
The exponential-frequency click
Here's a neat family of pulse signals:
They're interesting because their Fourier transforms decay exponentially, with both increasing frequency
Impulse train
If you repeat an impulse at regular intervals, you get a periodic signal (i.e. a note) with a timbre/spectrum derived from the impulse:
So, what happens if we repeat our pulses, but increasing
Awesome - except we clearly have some DC offset, because our pulses all have DC offset. What can we do about that?
90° phase shift
Even-symmetric impulses often have problems with DC offset - but if you shift the phase of each frequency by 90 degrees, you get an odd-symmetric impulse. There's a neat equation for this variant as well:
The spectrum still decays exponentially in
The amplitude of every frequency is preserved (aside from the DC offset). Let's see what that looks like:
Aliasing
These impulses are cool, but they contain frequencies way above Nyquist. That means we get aliasing, particularly for smaller
We can see the harmonics we want slowly decaying at the top - but with higher harmonics aliased down in between them.
Band-limited variant
What would be great is a band-limited version of the these impulses. We want them to have the same exponential shape as before up to Nyquist, and then suddenly disappear, like this:
It turns out there's a computable time-domain solution for this:
The equation's a bit messier than our previous version, and not quite as simple to evaluate. Unlike the non-bandlimited version, this is defined and bounded for all real
Let's see what happens when we create a note from these, with linearly-increasing
If we use our new band-limited impulses to plot the spectrum where we previously saw the aliasing, improvements are pretty clear:
Conclusion
So there you have it! Perfectly-pitched alias-free string-plucks.
I couldn't find this mentioned anywhere else, so (following the naming convention of BLIT, BLEP and BLAMP) I've been calling this family of impulses BLEX (Band-Limited EXponential).
Because it's analytically generating the impulses,
Computing the band-limited impulse seems tricky. You have
But I think it's fun! I haven't put this in a synth yet, but maybe someone will find it useful. 🙂