[sdiy] Idea - Triangle wave DCO core
Richie Burnett
rburnett at richieburnett.co.uk
Wed Mar 14 12:58:23 CET 2012
Olivier Gillet wrote:
> One option would
> be to have a single timer interrupt at a predefined rate (say 100kHz)
> and do all your toggling from there. The risk is that this will have
> the same aliasing problems as a digital oscillator, since transitions
> would be aligned to this fairly coarse grid.
If you're going to do this then you might as well just generate the triangle
wave itself digitally. It is easy to generate from a phase accumulator
going from -1 to +1, just by taking the modulus of the value. Naive sampled
triangle also has fairly low aliasing due to the high spectral roll-off of
the triangle wave. (You can then dispense with the analogue integrator and
the need to do a reciprocal calculation to set the timer period each
oscillator cycle.) You can also add hard-sync, FM etc directly on a
sample-by-sample basis as you please.
If you really want to build an analog/digital hybrid DCO, I think you might
be better off with a conventional saw-core DCO (analogue integrator
periodically reset by digital timer.) Then waveshape the sawtooth output to
triangle by folding one half over. That way you get both saw and triangle
outputs available, without any of the hassles of DC offsets or imperfectly
matched rise/fall times causing gradual integration towards one of the
rails.
-Richie,
More information about the Synth-diy
mailing list