[sdiy] Re: IIR and FIR
Scott Gravenhorst
music.maker at gte.net
Fri Jun 6 15:26:36 CEST 2008
Veronica Merryfield <veronica.merryfield at shaw.ca> wrote:
>Here's a few links to get you going
>
>www.gamedev.net/reference/articles/article845.asp
>www.music.mcgill.ca/~gary/307/week2/filters.html
>members.tripod.com/acmerock/tech/DXi2Tutorial.htm
Ah, thanks, Magnus' email started me reading about bilinear transforms which I looked
at earlier while I was investigating digital filter topologies.
>But as I said, you really do have to pay a lot of attention to the
>numbers. Whilst the third of the links above has the term calculations
>for a variety of filter types, each term requires a trig function and
>some a divide. The simple formulas hide the effects of not only sample
>rate and quantisation errors of the samples, but it is compounded by
>quantisation of the terms and calculations. This is further affected
>by the trig functions and so on. I did the most work with fixed point
>16 bit DSP simulating diesel engines to test ECUs and it took a lot of
>fiddling to get the thing to work well but it did work extremely well.
>With floats, things are a lot easier and in many cases most people
>probably don't look into the numbers too deeply but for a PIC
>implementation. Unless a fast PIC and floats are used, a fair amount
>of care and time are going to be needed to make it work but I know it
>can work since a PIC is not too far away from a Z80.
>
>(One can get very fed up with Z transforms and bilinears after a
>while, specially if the IIR keeps oscillating on you). Which reminds
>me, they can produce beautiful sines :)
>
>
>On 5-Jun-08, at 5:09 PM, Magnus Danielson wrote:
>
>> From: Scott Gravenhorst <music.maker at gte.net>
>> Subject: [sdiy] Re: IIR and FIR
>> Date: Thu, 05 Jun 2008 16:24:13 -0700
>> Message-ID: <200806052324.m55NOD9l030103 at linux7.lan>
>>
>>>> Veronica Merryfield wrote:
>>>> I have used IIR filters going back 20 years now even on a poor 6Mhz
>>>> Z80 and they do resonate. FIRs don't resonate but IIRs do - it's why
>>>> they are called Infinite Impulse Response . I can some code
>>>> somewhere
>>>> in my archive for taking cutoff frequency and resonance and
>>>> producing
>>>> the parameters which I can try to find if required but there are
>>>> examples on the web.
>>>
>>> Are these sweepable filters?
>>>
>>> I'm interested in a frequency sweepable IIR with controllable
>>> resonance. I.e., are they an acceptable alternative to an SVF?
>>>
>>> An SVF sounds very good to me, but does have high sample rate
>>> demands.
>>
>> Now, this is a bit problematic. Bilinear transformed filters (which
>> have good
>> properties) tend to use arctan compensation. Doing that in realtime is
>> expensive. However, for higher sample rates the filter cut-off stays
>> close to
>> 0 and things can be approximated and behave fairly linear.
>>
>> If you map your integrators bilinearly you get for each integrator
>>
>> i1 = i0
>> i0 = i1 + i*T
>> o = i0 + i1
>>
>> where i is the input, o the output and T is the sample time. i0 and
>> i1 is the
>> integrator state variables.
>>
>> Converting a normal SVF into this form is trivial and only a slight
>> variation
>> of what you already have around:
>>
>> http://www.fpga.synth.net/pmwiki/pmwiki.php?n=FPGASynth.SVF
>>
>> However, you can approximate the sin such that f = 2 pi Fc / Fs. I
>> think you
>> are getting my point... the real trick is the sample rate and the
>> handy
>> reductions it allows you to do.
>>
>> Cheers,
>> Magnus
>> _______________________________________________
>> 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
>
-- ScottG
-----------------------------------------------------------------
-- Scott Gravenhorst
-- GateManPoly - FPGA Based Polyphonic MIDI LA/FM Synthesizer
-- GateMan-III - FPGA Based Monophonic MIDI LA/FM Synthesizer
-- PolyDaWG/8 - FPGA Based 8 Voice Polyphonic MIDI Synthesizer
-- FatMan: home1.gte.net/res0658s/fatman/
-- NonFatMan: home1.gte.net/res0658s/electronics/
-- When the going gets tough, the tough use the command line.
More information about the Synth-diy
mailing list