[sdiy] Flangelicious noises - some queries about NCO jitter and resampling and similar
Sarah Thompson
plodger at gmail.com
Thu Jan 23 12:59:18 CET 2020
Have you done any math on whether noise shaping could help? I mean,
specifically, rather than just adding random jitter, using a jitter pattern
intended to push the sidebands outside of the audio band?
On Thu, Jan 23, 2020 at 12:52 PM Tom Wiltshire <tom at electricdruid.net>
wrote:
> Hi all,
>
> When I designed the original “Flangelicious” flanger effect, I used a PIC
> 12F1501 to generate a modulated biphase clock suitable for driving a BBD
> directly. This single chip replaced an LFO and VCO circuit and simplified
> the flanger design significantly. The modulated clock runs from 25KHz to
> 500KHz ( a 20:1 range, not bad for a flanger, although not as good as the
> best analog flangers) and gives delay times from 20msec to 1msec with a
> typical 1024-stage BBD.
>
> https://electricdruid.net/flangelicious-a-super-dooper-flanger/
>
> However, this wasn’t entirely without costs, and I’m now aiming to improve
> the design.
>
> The original design uses the PIC’s NCO for the BBD clock. This is a 24-bit
> phase accumulator with a maximum 20-bit frequency increment. The clock can
> run at a maximum of 16 MHz. The final clock frequency is half the NCO
> frequency since it is fed through a further hardware module. This
> “Complementary Waveform Generator” is able to generate the biphase
> waveforms, and can even include a deadband gap between the two phases (very
> handy!).
>
> The LFO runs at a 25KHz sample rate and modifies the NCO frequency
> increment at this rate. The NCO will only accept the new increment when the
> current cycle has ended (the freq inc is double-buffered). This leads to an
> uncertain “resampling” period of the LFO output by the NCO clock. This
> isn’t so bad when the NCO output is high, since the NCO will be updated at
> close to 500KHz (2usecs max), but when the modulation wave sweeps low, the
> clock output is getting close to 25KHz and the “update discrepancy” between
> two rates of near 25KHz could be significant (40usecs max).
>
> 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.
>
> The sonic effect of these various effects is odd bird-like chirps or
> “watery” noises in the background.
>
> 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.
>
> I’ve done some initial investigations. Increasing the NCO clock should
> help, since it decreases the jitter (a single clock cycle becomes shorter)
> but unless you also increase the NCO length, the frequency resolution gets
> worse (so with a 16MHz clock, I get frequencies every 15Hz, but with a
> 32MHz clock that step is every 30Hz). Small frequency steps are important
> since we want the modulation to be smooth. So what you win in one place,
> you lose in another.
>
> Another thing I’ve tried is to add dithering to the NCO phase accumulator
> to break up the jitter cycles. This seems to work, sort-of, but replaces
> toned noise with hiss. It’s not a huge improvement.
>
> Does anyone have any ideas about how I might reduce the problems in this
> design? I see various issues:
>
> 1) Resampling of the LFO output by the NCO reset
> 2) Frequency stepping caused by the NCO minimum frequency step
> 3) Jitter cycles caused by the NCO
>
> Any ideas appreciated. I’d like to do a “version two”, but it’s only worth
> it if I can squeeze a little better performance out of it.
>
> Thanks,
> Tom
>
> ==================
> Electric Druid
> Synth & Stompbox DIY
> ==================
>
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
>
--
[s]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20200123/fd758e8e/attachment.htm>
More information about the Synth-diy
mailing list