[sdiy] Reverse sawtooth / Wavetables

Tom Wiltshire tom at electricdruid.net
Mon Jan 24 16:24:56 CET 2011


On 24 Jan 2011, at 14:56, Tim Daugard wrote:

> From: "Tim Parkhurst" <tim.parkhurst at gmail.com>
> To: "Matthew Smith" <matt at smiffytech.com>
> 
>> To save some memory, have you thought of only keeping half the wave in
>> the lookup table, and inverting & offsetting it for the second half?
> 
> You can actually get away with 90 degrees of a sine wave table. 1/4 the space. It would eat more processor time and the code size MIGHT be worse than the table look up.

Unfortunately, that was my experience. I tried using half-wave tables when I was designing my DWGS oscillator. This allowed me to get 1024-point waveform tables into the RAM available. In the end, I dropped the halfwave table, reducing the waveform size to 512 points, and used the space I gained from taking out the halfwave logic to do a linear interp between waveform points. The gain in quality from the linterp far outweighed the loss from halving the table size.

Again, Hal Chamberlin has been there before me, and gives some figures on Pg 429 for table lookup noise:

Sine waveform, no interp:
	256 points:	42.99dB
	512 points:	49.03dB
	1024 points: 55.05dB

Complex waveform, no interp:
	256 points:	23.56dB
	512 points:	29.55dB
	1024 points: 35.41dB

Sine waveform, linear interp:
	256 points:	85.19dB
	512 points:	97.23dB
	1024 points: 109.28dB

Complex waveform, linear interp:
	256 points:	42.75dB
	512 points:	54.76dB
	1024 points: 66.82dB

This shows a clear benefit from putting the linear interpolation in, even if it means kicking the halfwave tables out.

T.


More information about the Synth-diy mailing list