# [sdiy] Digital accumulator VCO core?

Richie Burnett rburnett at richieburnett.co.uk
Fri Feb 12 12:56:00 CET 2021

```> 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...

I'm not sure what you mean here?  Generating a perfect mathematical ramp for
the sawtooth using an accumulator?  Or are you meaning generate a sawtooth
through the process of additive synthesis?

>...and then put it through a simple digital filter before the DAC to get
>rid of anything that could alias.

If you are generating a mathematical ramp with reset (like what you get from
the phase-accumulator in an NCO) then this has an infinite spectrum, and
those frequency components that "could alias", have *already* aliased.  They
are baked into the signal as soon as you synthesise it using such a basic
method.  You can't just filter them out before feeding the signal to the
DAC!  In practice you need to synthesise a waveform that is mathematically
not a trivial ramp, but instead is the shape of a sawtooth that is
band-limited.  This is what BLIT, BLEP, minBLEP, Poly-BLEP all do to various
degrees and in different ways.

> If you run at 96kHz sampling this becomes pretty trivial in computational
> terms - a few shift rights or multiplies and some adds.

If you generate an "A" at 3.52 kHz, you can only include the harmonics up to
the 13th harmonic (45.76 kHz) if you don't want anything to alias.  If you
don't mind harmonics aliasing in the ultra-sound region where you can't hear
them you could include all the harmonics up to the 21st harmonic (73.92
kHz).  The the next harmonic is the 22nd that would be at 77.44 kHz but
would alias back to 18.56 kHz and be audible with a 96 kHz sample rate.  In
practice you'd probably stop at the 5th harmonic (17.6 kHz) with additive
synthesis because anything over 20kHz is inaudible anyway.

Regardless of whether your synthesis is via additive, wavetable or a simple
phase accumulator you still need to curtail the otherwise infinite spectrum
of the basic waveforms (sawtooth, Triangle, Square, Pulse, etc) in order to
prevent aliasing.

-Richie,

--
This email has been checked for viruses by AVG.
https://www.avg.com

```