[sdiy] Wavetable Design Update

Dave Manley dlmanley at sonic.net
Sat Feb 5 21:02:31 CET 2011


On 2/5/2011 5:42 AM, ASSI wrote:
> On Saturday 05 February 2011, Tom Wiltshire wrote:
>> There's something I'm not getting here. You say there isn't enough
>> resolution at the top end, but a quick calculation for the highest MIDI
>> note frequency gives a reasonable result:
>
> Matt needs 256x that frequency to feed the synchronous counters for the
> waveform generator.  Just doing squarewaves at the note frequency is a bit
> boring, isn't it?

Here's some output from the spread sheet I did the other day:

Midi    Counter Freq            Note Freq       20 MHz  Note Freq       Cents
#                                               Divisor w/Int Divisor   Error

72      133,952.289369          523.251130      149.307 524.329         3.562
73      141,917.506991          554.365262      140.927 558.036         11.424

Up to Midi#72 the error is less than 10 cents, but at the top end the error is huge:

126     3,030,994.309379        11,839.821521   6.598   13,020.833      164.596 (-102.254 with round)
127     3,211,226.610000        12,543.853945   6.228   13,020.833      64.604

So, integer divide doesn't work for high frequencies.

However above note 72 you could reduce the depth of the wave table by
two by using a 128x clock instead of a 265x clock, and telling
the CPLD counter to increment by 2.  This gets you up to Midi #84
Applying the same trick again gets up to Midi #96, etc...

Just noticed I should have used ROUND instead of INT.  Now
 >10 cent error doesn't happen until Midi#84.  Reducing the
table depth pushes it up to #96, #108, etc..

Might sound ok?  How bad would the upper notes sound with reduced
wavetable depth?  What's a good tool to generate audio files
to test this?


-Dave



More information about the Synth-diy mailing list