[sdiy] BLEP, PolyBLEP, aliasing, etc

Andrew Simper andy at cytomic.com
Fri Feb 19 02:42:32 CET 2021

Thanks for your posts Richie, great stuff. A few

On Fri, 19 Feb 2021 at 03:13, Richie Burnett <rburnett at richieburnett.co.uk>

> If by "real-world" you mean after it's come out of a DAC, then it
> shouldn't
> sound any different to running a real analogue sawtooth (with a decent low
> noise-floor) through the same high-gain analogue wave shaper or wave
> folder.

For the digitally generated and analog osc to match you would need to
somehow bandlimit the analog osc. You could record the analog oscillator
(ADC) then play it back out your DAC to band-limit it, just like your
directly generated band-limited digital osc, then both the analog and
digital oscillators would sound the same through further analog non-linear
processing. Depending on your ADC / DAC your analog synth recording will
have ringing caused by the band-limiting, and possibly pre-ringing, so you
may need to match the direct digital band-limiting to whatever your sound
card bandlimiting is doing.

> It's when you apply non-linear processing on the waveform in the digital
> domain that things quickly head in the wrong direction again aliasing
> wise.

things *can* quickly head in the wrong direction *if you don't take care*.

> I don't see a reason why it would create aliasing if it's an analogue
> process acting on a properly reconstructed analogue waveform.  But it
> would
> be interesting to try it out.

Yes, it won't create aliasing, but it can change the sound/tone of the end
result. For example with pre ringing different non-linear processors can
sound different. Here is an example from a Tube Screamer, where a small
amount of pre-ringing from the linear phase bandlimiting filter can change
the overall tone of the distortion by introducing a small peak.

lightblue=highpass that gets clipped by diodes
green=output of drive op-amp
lightbrown=output of eq op-amp
red=final output

linear phase with peak indicated by arrow:

minimum phase:

The BLEP16 one used step corrections made from integrating a lowpass FIR
> filter designed using Parks-McClellan (Remez), that modified 8 points
> before
> and 8 points after each discontinuity in the sawtooth.  All the examples I
> posted were generated when I was playing about with this stuff back in the
> mid 90s.  I did some comparisons with MinBLEP at the time and didn't
> notice
> anything different in the sound.  Like-for-like design parameters led to
> perceptually comparable results using either method, although there should
> be subtle differences to the phases of some of the upper harmonics.  All I
> can say is that it didn't sound any different.

And as always with Remez be careful about the energy pushed to the edges
away from the centre of the FIR - which is "un-analog" in nature.

At the time I was convinced that MinBLEP was the way to go because it
> minimised pre-ringing and *removed* the need for look-ahead.  The latter
> was
> a common belief at the time, and i didn't have a firm DSP/engineering
> background at that time in my life to debunk it.  Now I know that the
> minimum-phase reconstruction of the band-limited impulse (and the
> subsequent
> band-limited step) doesn't remove the look-ahead, it just reduces it
> considerably.  The group delay at DC is still finite, so you still need a
> small delay buffer to mix in the BLEPs.  25 years later my current feeling
> is that the more complex maths involving the minimum-phase reconstruction
> isn't worth the additional hassle.  The reduced look-ahead might give
> better
> results for certain special cases like two oscillators cross-modulating
> each
> other but I'm not convinced at this time.

I agree that it's best to stick with linear phase, and then if you want to
lower the latency for inter oscillator modulation then oversampling and
using a shorter FIR is a better approach since you will need to contain the
extra harmonics anyway. I've only ever used linear phase blep in products.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20210219/2257759e/attachment.htm>

More information about the Synth-diy mailing list