[sdiy] tanh distortion in a filter

Tom Wiltshire tom at electricdruid.net
Thu Aug 11 13:19:46 CEST 2011


Can I just ask if there's anything particularly special about tanh in this situation?

It seems to me that you could use pretty much any sigmoid function. This would alter the character of the distortion slightly (or not so slightly) but wouldn't really change the nature of what you're doing - in a similar way to replacing your OTA with a gilbert gain cell, or a tube-based VCA.

The reason I ask is that tanh isn't exactly a convenient function to calculate in the digital domain. The two approaches I've seen are to approximate it using a fairly simple polynomial (use a different function, essentially) or to use a lookup+interp (which opens the way to arbitrary distortion flavours).

Thanks,
Tom

On 11 Aug 2011, at 05:39, Andrew Simper wrote:

> Yes, Antti has already written a paper on it, but he only derives the
> allpass response, for an svf you need a one pole integrator instead:
> 
> ENHANCED DIGITAL MODELS FOR ANALOG MODULATION EFFECTS
> Dafx 05
> 
> And pulls the following equations from:
> A. Gratz, Operational Transconductance Amplifiers
> http://synth.stromeko.net/diy/OTA.pdf
> 
> for an OTA you have:
> I = ictrl tanh ((v+ - v-) / 2 Vt)
> 
> so plonk it into an integrator circuit and integrate that with forward
> euler and you get:
> vc += g * tanh (in)
> 
> Andrew Simper
> --
> cytomic - sound music software
> mobile: +61-450-774-230
> skype: andrewsimper
> 
> 
> 
> On 11 August 2011 11:30, <lanterma at ece.gatech.edu> wrote:
>> 
>> On Aug 10, 2011, at 9:46 PM, Scott Nordlund wrote:
>> 
>>>>> Assuming work in the digital domain: Is tanh distortion something that works in a filter I think the Rossum paper is "Making Digital Filters Sound 'Analog'". He suggests clipping (or otherwise distorting) the delay path of a biquad, but not the input or output. It's a pretty dated paper, from 1992, so it's probably not something to rely on unless you're just looking to do something cheaply.
>> 
>> That sounds like the one I was thinking of.
>> 
>>>>> Antti Huovilainen wrote the stuff about emulating the Moog transistor ladder filter by embedding tanh functions (derived from transistor differential pairs). I don't know how much of that would be applicable to state variable filters.
>> 
>> I guess for SVF you'd be modeling the tanh of the OTAs used in something like the Oberheim SEM VCF.
>> 
>> A while ago I worked out where the tanh should go for an OTA-C one-pole stage, like the OTA-C cells used in the typical Prophet 5 type four-stages-with-negative-feedback configuration. The result wound up similar to Antti's Moog ladder formulation, but the tanh functions wound up in different places. Last time I looked for my notes though I couldn't find it...
>> 
>> ...I'm guessing this is probably something Antti's already worked out somwhere. ;)
>> 
>> - Aaron
>> _______________________________________________
>> Synth-diy mailing list
>> Synth-diy at dropmix.xs4all.nl
>> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at dropmix.xs4all.nl
> http://dropmix.xs4all.nl/mailman/listinfo/synth-diy




More information about the Synth-diy mailing list