[sdiy] More Xilinx 3E board comments
Eric Brombaugh
ebrombaugh at earthlink.net
Thu Jun 8 23:39:32 CEST 2006
Magnus Danielson wrote:
> From: James Patchell <patchell at cox.net>
>
>> For instance...You could easily build up a bank of 512 NCO sawtooth
>> oscilators...and it would barely be a hicup...with a sample rate of
>> 97656.25hz @ clk=50MHz...
>>
> Actually, you could go 36 bit for free, since those blockrams is really 36 bit
> x 512. Running a 36-bit DDS at 50 MHz is trivial. However, you really consume
> 2 blockrams if you want to go to 512 oscillators. You need to store the
> increments somewhere. Still, keeping down at 50 MHz makes is yawn.
>
I've been doing a lot of work with audio-frequency NCOs over the last
few months (see my DVCO project page at
http://kbadc.synth.net/dvco.html) and I can confidently say that using
the NCO phase output as a sawtooth wave will work well only up to about
2kHz unless your sample rate is extremely high. Beyond that, aliasing of
the higher-order harmonics of the sawtooth are a serious problem. I've
got some samples on the site of a 20Hz-20kHz sweep of sawtooth and
square at a ~60kHz sample rate that illustrate this.
Although I was working mostly at 192kHz sample rates recently, I did
some simulations to analyze this and even with a 1.5MHz sample rate the
sawtooth still sounds nasty. The higher harmonics fall off at 1/n, so
they're not down more than about 45dB when they bounce off of Nyquist
and come screaming back down on you. Square waves are just as bad. Using
lowpass filters to cut the harmonics helps a little, but not enough for
a really clean sound.
Fortunately, triangle waves are fairly nice, and sine waves are very
well behaved because neither of them have the sharp edges found in the
saw and square. Sharp edges are very sensitive to phase jitter at the
sample rate. Both triangles and sines are simple to implement in
software and hardware: For triangles, just use the top two bits of the
NCO phase to mirror and invert the lower-order phase bits. For
sinewaves, use the triangle values to address a linear->sine lookup
table in block RAM. Block RAM limits you to a maximum of 4096
points/wave, but you can do interesting interpolation stuff to increase
the apparent phase resolution.
There's a reason why so much research has been expended on generating
bandwidth-limited classical synth waveforms. The easy solutions don't
sound good and the ones that sound good take a lot of resources.
Eric
PS - I can't wait until after DAFX'06 when Antti's paper on oscillators
goes up in the proceedings (Assuming that's where he's getting
published). I've dug up a lot of material on this topic, but I'd really
like to see his overview of the current technology.
More information about the Synth-diy
mailing list