[sdiy] Flangelicious noises - some queries about NCO jitter and resampling and similar
Gordonjcp
gordonjcp at gjcp.net
Fri Jan 24 08:34:19 CET 2020
On Thu, Jan 23, 2020 at 11:51:34AM +0000, Tom Wiltshire wrote:
> Another potential source of error is the NCO jitter. Even without any LFO modulation, the NCO doesn’t produce a fixed frequency. Instead there is a certain amount of jitter, and this jitter is regular and can occur at audio rates.
I wonder if that's related to aliasing? If you generate a naïve
sawtooth at a lowish (like, sane audio rate) sample rate you'll get
aliasing. You can think of this in two ways - either the reset step
is "infinitely quick"* and therefore has infinite harmonics, some of
which have significant energy beyond Nyquist, or because the reset step
has to happen at an integer sample position, although the "real" reset
step happens somewhere in between.
Probably the simplest antialiasing technique that you can apply without
oversampling is the polyblep where you take the size of the "remainder"
of the sample where the step should go, and apply a function to it to
give you a correction factor which bends the top and bottom of the reset
step in a proportionate amount. If the step happens near the edge, not
much correction is applied but if it happens bang on in the middle of
the time between samples both the one in front and the one behind are
reduced to "smear" the step across the join.
This won't really help since you need to turn it back into a squarewave
again, but it might give you a better place to start dithering from.
( * An analogue sawtooth doesn't have an infinitely short reset time,
but from the frame of reference for us living in the real world where the
sample clock is derived from Planck's Constant it seems pretty instant.
So it goes for the people who live in Sampler World where Planck Time is
around 1/32000 seconds )
> There is now a newer chip available (the PIC 16F18313) which allows a 32MHz clock for the NCO. The NCO is still 24-bit, but the frequency increment is now 24-bit too, which enables higher frequency outputs.
Ditch the PICs and go for an ARM chip? Then you've got something like a
72MHz clock to play with and 32-bit registers.
--
Gordonjcp
More information about the Synth-diy
mailing list