[sdiy] Re: IIR and FIR
Scott Gravenhorst
music.maker at gte.net
Fri Jun 6 15:47:19 CEST 2008
Magnus Danielson <magnus at rubidium.dyndns.org> 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
I googled "bilinear transform", but I didn't see what you wrote above... I read about the
process a while back, but I intend to do more reading. Where can I read about integrators
transformed bilinearly to explain what you've done?
>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.
I actually just ignored the sin() bit because my corner frequencies would be low enough
that the sine function output would be fairly linear anyway, amounting to mostly a
constant for the calculation. I used an arbitrary "faux frequency" value instead of doing
the full calculation and control the corner frequency with the raw values from the
modulator (an EG) instead. It works, but is uncalibrated, a fact that doesn't matter in
my application.
I'm curious now, my choice of using an SVF wasn't based on superior knowledge of filters,
I tried it because I like the ones I've heard in the analog domain. Did I just get
extremely lucky (I did know about the sample rate thing ahead of doing it)? - because the
thing seems to work _very_ well.
I would, however, like to see what other digital filter topologies can be used and compare
their "effort coefficient", something Veronica eluded to in her last post. For music,
filters that can be swept or modulated are useful, especially if resonance is also
numerically controllable. So there are two major control requirements I place on filters
used in the audio path for timbre control - frequency control and resonance control. SVF
is a good one, but it likes a high sample rate. High sample rate isn't always possible,
especially as the number of synth features increases.
-- 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