[sdiy] Digital accumulator VCO core?

Brian Willoughby brianw at audiobanshee.com
Sat Feb 13 07:40:26 CET 2021

On Feb 12, 2021, at 03:12, Mike Bryant wrote:
>> p.s. While you're experimenting with this digital accumulator (I can't wait to hear what results you get), I'm toying  around with ways to get continuous frequency control out of digital oscillators. I want to do this without using software BLEP and other > tricks that consume a lot of processing power. That's because I want to get frequency out of the discrete realm and into the continuous realm. I don't know that it will *sound* better, but that doesn't stop me from wanting to try...
> Surely once you get to a 32 bit accumulator then its way beyond any discrete step your ear can determine.  Any perceived difference would thus be in the realm of those people who claim to be able to hear the difference between decent op-amps or low-noise transistors.

It depends.

Are you talking about pitch or amplitude?

If you're talking about pitch, there's an infinite difference between continuous frequency changes and stepped changes, no matter how small the steps. There's also a lot of aliasing possible when doing any sort of sample rate conversion. Apart from synthesizing sine waves from scratch, every other digital technique will alias if you try to change the pitch within a fixed sample rate system.

If you're talking about amplitude, 32-bit float is basically equivalent to 24-bit fixed point samples, and it's very easy to hear correlated quantization noise. In this area, DSP chips use 56-bit accumulator registers instead of 32-bit registers, and some DSP architectures go up to 80-bit registers. Even with those large accumulators, they still use dithering ahead of the DAC to avoid correlated quantization noise.

It seems like there are a lot of people who prefer analog over digital, vinyl over CD, etc. Whether they actually could tell without prior knowledge of the label is the real question.

> I'm also not sure why people use BLEP or other techniques - just use the accumulators to create a perfect sawtooth, square, triangle or indeed noise, and then put it through a simple digital filter before the DAC to get rid of anything that could alias.   If you run at 96kHz sampling this becomes pretty trivial in computational terms - a few shift rights or multiplies and some adds.

One important reason to use MinBLEP is to produce hard sync in a digital synthesizer. See that paper that I mentioned earlier today.

But, you're right, synthesis of free running oscillators (not sync) can easily be additive. To recreate the TR-808 cymbal, with its hex bank of square wave oscillators at inharmonic frequency rations, I simply calculated the longest sample buffer necessary to capture full sine wave periods for all the harmonics of every square wave oscillator, and then summed them all together at startup. The result is a completely unaliased "sample" of the analog circuit.

As others have pointed out, though, no amount of "digital filter before the DAC" is sufficient. You have to avoid synthesizing the aliased frequencies in the first place. Once they're aliased, they're not filterable. The good news is that if you're building subtractive synth waves with an additive engine, you can simply stop adding harmonics before you reach Nyquist, and then you've no problem.

Brian Willoughby

More information about the Synth-diy mailing list