Skip to content

Why you may get high frequency distortion from some wavetables

EvilDragon edited this page Apr 21, 2024 · 9 revisions

When using some of the wavetables in Generated factory wavetables folder and playing low notes you will notice some very high frequency distortion popping in. You may end up putting it into an analyzer and seeing something like this:

Showing HF Noise

For a complete discussion of this problem, check out this GitHub issue. But this distortion is a purposeful artifact of how Surge's Wavetable oscillator works with small wavetable frame sizes.

As @kurasu said of the issue:

“It's a feature, not a bug”

What that oscillator is doing is essentially simulating a variable-rate D/A converter running at the rate of the original wavetable. The convolute method is generating a band-limited impulse with a sub-sample time localization precision, which is then integrated to provide the stepped function.

This means that it basically doesn't produce any inharmonic aliasing (which makes stuff sound messy). But it does produce harmonic aliasing, i.e. the waveform spectrum will continue indefinitely as opposed to other interpolation methods. It's similar to very early pre-interpolation samplers that had a dedicated D/A converter per-voice (and analog filters) instead. But yeah, it's not the right choice if you want a triangle wave without any additional overtones.

So these overtones are a fundamental part of Surge's sound. But with small frame size wavetables and playing low pitches, the noise becomes overwhelming.

We decided not to change the Wavetable oscillator. Changing the sound of every patch which uses it just because of this low frequency edge case, after the careful work to deal with the wavetable spectrum, would be a poor choice. So, since Surge 1.6.2 release, for small frame size wavetables we have been adding higher resolution versions on an as-needed basis.

This means if you use "Sine FM 2x" wavetable and you don't want the associated harmonic distortion (for instance, if you were using a bass sound) you could use the "Sine FM 2x HQ" wavetable instead.

If you find other wavetables among the factory set that showcase this harmonic aliasing when playing low pitches, please open a GitHub issue and we'll take a peek!