[sdiy] Polybleps and arbitrary waveforms

Olivier Gillet ol.gillet at gmail.com
Wed Mar 30 13:09:54 CEST 2016

> If we integrate the wavetables, the size of the numeric representation required for the samples goes up. Significantly. A 16-bit number (for example) instead become the sum of many thousands of 16-bit numbers. That requires perhaps a 32-bit number. Is that right? Or is this done with floats?

Yes, you need a larger word size as the order increases. You can try
scaling the data to make it fit your target word size, at the risk of
altering the shape during playback.

With "typical" waveforms which already have more low frequency content
than high-frequency content, you don't really have to go further than
N = 2 - at this level your integrated wavetables are already almost
indistinguishable from sine waves.

> The problem is the large storage, which seems to offset the benefits quite a bit, at least on chips with limited memory.

If you want aliasing-free playback without implementing proper
band-limited resampling on the playback side (which is very costly), a
possible alternative is to use mipmapping - you pre-compute
band-limited variants of each wave for higher octaves. This doubles
the CPU cost during playback (since you need to do the crossfade
between octaves), and more than doubles the storage space (you can
reduce the table size for the higher octaves, but not too much because
whatever interpolation scheme you use will reintroduce aliasing).

More information about the Synth-diy mailing list