[sdiy] square to sine
Richie Burnett
rburnett at richieburnett.co.uk
Thu Oct 11 00:14:14 CEST 2012
> On the other hand, why couldn't I simply AC-couple the square output to
> the
> integrator input? This might cause a rounding of the triangle apices, but
> I'm going to shape it into a sine anyway, so does it matter? Of course,
> this doesn't address the integrator offset, does it?
AC coupling the square wave to the integrator will result in some "LF droop"
on the portions of the square-wave that should otherwise be flat. Once
integrated this will degrade the linearity of the resulting triangle. If
you plan on wave-shaping the triangle into a sinewave then any triangle
asymmetry will directly cause sinewave asymmetry and increase THD.
> The other alternative is to use a lossy integrator...(thinking aloud)...?
A lossy integrator is really a 1st-order low-pass filter. So in theory it
is equivalent to the method you already described above.
You have a first-order high-pass filter followed by a pure integrator, _OR_
first-order low-pass filter in the form of a leaky integrator.
The zero at DC for the high-pass filter in the first case would cancel the
pole at DC for the integrator leaving just a single pole at the cutoff
frequency of the high-pass filter. This is the same thing as the single
pole that results from breaking a pure integrator's gain back to flat at
low-frequencies in the form of a lossy integrator. (The 1/s term for the
integrator effectively converts the 1st-order HPF into a 1st-order LPF.)
-Richie,
More information about the Synth-diy
mailing list