[sdiy] Digital accumulator VCO core?

Brian Willoughby brianw at audiobanshee.com
Fri Feb 12 22:29:55 CET 2021


On Feb 12, 2021, at 11:02, Gordonjcp wrote:
> On Fri, Feb 12, 2021 at 11:12:34AM +0000, 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.
>> 
>> 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.
> 
> That doesn't actually work.
> 
> If you generate a step, you generate aliasing and it's already down in your desired audio spectrum.  You'd need to run at some small number of MHz sampling rate, filter, and then decimate to 96kHz.  If you generate a naive sawtooth at 96kHz it'll alias like crazy in the low hundreds of Hz.

Gordon is correct. The aliased harmonics are always there.

In fact, the only reason it even seems to work at sample rates in the MHz is because the aliased harmonics get quieter and quieter. The higher the sample rate, the quieter the aliased harmonics.

For square and sawtooth, the amplitude of each harmonic is 1/N, where N is the harmonic number. Sawtooth has all harmonics, and square only has odd harmonics. So, the 3rd harmonic is only 1/3 as loud as the fundamental, and the 5th harmonics is only 1/5 as loud.

Triangle has weaker harmonics, and only the odd ones. They're 1/(N*N), so the 3rd harmonic is 1/9 as loud as the fundamental, and the 5th harmonic is 1/25 as loud.

You might think that being 96 dB down (1/65536) or even 144 dB down (1/16777216) would be quiet enough, but it's actually possible for the human hearing system to perceive sounds that are below the quantization noise floor (this is how those 24-bit mastered CDs work, even though they're quantized at 16 bits). At some point, though, the really high harmonics are so quiet that they're masked by other sounds, and the fact that their proper frequency is aliased to an inharmonic frequency is no longer a concern.

Brian Willoughby





More information about the Synth-diy mailing list