[sdiy] tanh distortion in a filter
David G. Dixon
dixon at interchange.ubc.ca
Thu Apr 14 06:08:18 CEST 2011
> > (in "duh" mode himself) - you mean like using a sine function as a
> > transfer function for some signal path? as in a preamp
> that disorts
> > like a sine function from -pi/2 to
> > +pi/2?
>
> That's what I understood the first time, and I was thinking
> "that's going to be a very colourful preamp", and then I
> realized that by "sine shaper", David meant "any circuit
> which outputs a sine-like signal from a triangle" (or how to
> get a sine VCO from a triangle
> VCO...)
Well, actually, in a typical sine shaper (two-tranny or OTA variety) there
is a trimmer on the input signal. For a triangle input, this trimmer goes
from triangle through sine through to square. I've got to think that
somewhere within that range is some useful distortion...?
Based on a spreadsheet analysis I did this afternoon, one can minimize the
summ of square errors between a sine and A*tanh(B*tri), where "tri" is the
triangle amplitude, by finding the correct values of A and B. The correct
value of A simply ensures that the two waveforms share the same amplitude,
and does not affect the sinusoidality of the result. The resulting sine
approximation is a bit pointy at the top, just like the one you get from a
shaper. Hence, I'm assuming that is what the shaper is doing, and the
trimmer is essentially selecting the correct value of B.
I'm suggesting that "tri" be replaced by "signal" and that B is a panel pot
controlling the degree of tanh distortion.
More information about the Synth-diy
mailing list