[sdiy] Digital 4 pole filter in an FPGA
Magnus Danielson
magnus at rubidium.dyndns.org
Tue Dec 9 22:02:05 CET 2008
Antti Huovilainen skrev:
> On Tue, 9 Dec 2008, Rainer Buchty wrote:
>
>> For me, it was amazing to see that whenever the attribute "warmth" comes
>> up, it is related to a tanh()-shaped compression function, no matter
>> whether it's tube-based distortion, analog tape saturation, or
>> distortion within the filter.
>
> Tanh has nothing to do with tubes.
Agreed...
> Quite asymmetric curves there (just
> to nitpick). For differential transistor circuits it can be derived
> directly from the transfer function (with only minor approximations).
To nitpick some more... the transistors do not display tanh curves
themselfs, they have exp responses. It is the result of a balanced
transistor pair that produces the tanh response. A tube-pair would
produce something similar if hooked up similar, which is not that
uncommmon actually. Quad-II amps and HP200CD oscillators spring to mind.
When the transitor has the classical NP-relation
I = I_s * [ exp (qV/kT) - 1 ]
the tube has a similar behaviour
I = k * (E_k + my * E_g)^3/2
The diffrential forms look kind of similar...
However, there exist many tube circuits that are not balanced, and then the
> In
> tape saturation it's probably not strictly correct but the shape is
> smooth and distortion increases gradually so it largely does the job.
It is fairly smooth, but fine-grained it is not... hence the need for
bias signal and also the noise.
>> For any FPGA implementation the question therefore is how to get tanh()
>> as cheap as possible. Maybe just shaping the upper 8 bits of the
>
> Use a small lookup table with linear interpolation. You only need one
> side since it's symmetric and I assume bit operations are dirt cheap in
> FPGA (abs and neg).
Sounds reasnoble. Another approach is to use a lookup table to provide a
multiplicative term for the signal. Could potentially provide good
quality for a smaller table.
Cheers,
Magnus
More information about the Synth-diy
mailing list