[sdiy] DCO Question

Tom Wiltshire tom at electricdruid.net
Sat Nov 4 00:02:25 CET 2017



> On 3 Nov 2017, at 20:06, Gordonjcp <gordonjcp at gjcp.net> wrote:
> 
> On Fri, Nov 03, 2017 at 03:04:40PM -0400, Ben Bradley wrote:
>> I forget where I read this, either the archives for SDIY or the
>> MUSIC-DSP list, but one way to do non-aliased waveforms with DDS and
>> wavetable lookup is (for each waveform) to have a separate wavetable
>> for every octave. The lowest octave(s) will use the full-bandwidth
>> wavetable, and the wavetables used in the higher octaves will be
>> bandlimited - the highest octave will be a sine wave, the second
>> highest also has the second harmonic of the original, the third
>> highest has the second, third and fourth harmonics, and so on. This
>> uses a lot more wavetable memory, but memory is a lot cheaper than it
> 
> That's mipmapping which is how stuff like the Ensoniq ESQ1 and Korg DW
> series do it.

Bonus points if you crossfade between one table and another avoid abrupt jumps in harmonic content and/or use interpolation (linear, or better for even more bonus points) to reduce table errors. Korg didn’t do any of this due to hardware limitations, and I dunno about Ensoniq, but I doubt it.

Since the lower tables use a lot more harmonics, they require more data points. Higher octave tables can be shorter to save memory since you’re probably only sampling a sine wave or a couple of sine waves. This can save a lot of memory but introduces extra complexities into the table addressing. The Korg DW8000 managed with only 8KB per waveform by using 2K, then 1K, then 512 bytes, then 256 bytes for the higher tables.

I’ve written code for this on dsPIC, and in some ways the amazing thing about it is how complex it finishes up being. I’d have thought that copying something from the 80’s on a modern chip would be quick and easy, but in fact it tends to turn out more complicated than expected. And I've tried it a few ways!

Still, it’s a simple technique, and with memory not being such a big deal these days, it’s easy to push it to the point at which it’s “easily good enough”. For this reason, it’s often used in software plug-in synths, where a few hundred kilobytes or more of memory per waveform is not an issue. For example, you can reduce the effect of the crossfades by introducing tables every half-octave instead of every octave. Again, this costs memory, but memory is cheap on some platforms.

Tom








More information about the Synth-diy mailing list