Calculation of filter coefficients given characteristic

From: Eric Scheirer (eds@media.mit.edu)
Date: Fri Nov 12 1999 - 12:50:43 EST


Hi all,

If there's some enterprising person out there that knows about
filter design and would care to write an user-defined opcode
that calculates coefficients for iirt() or for a series of biquad(),
given a filter specification (order, passband ripple, depth of
cutoff band, transition width), it would be very useful for me.
(I use SAOL to generate stimuli to psychoacoustic experiments,
and it's a pain to always go back and forth between Matlab
and SAOL.)

You might be able to start with the Matlab code for ellip() or
one of those and simplify and translate it to SAOL.

I'd like to use it as follows:

instr foo() {
  asig a,x;
  table ta(empty,20);
  table tb(empty,20);

  // i-time

  make_filter(ta,tb,5,1000,3,30,1000);

  ...

  // a-time

  a = iirt(x,ta,tb,5);
}

iopcode make_filter(table ta, table tb, ivar order, ivar cut,
                           ivar ripple, ivar reject, ivar twidth) {

 // your code here :)

}

Any takers?

Best,

 -- Eric

+-----------------+
| Eric Scheirer |A-7b5 D7b9|G-7 C7|Cb C-7b5 F7#9|Bb |B-7 E7|
|eds@media.mit.edu| < http://sound.media.mit.edu/~eds >
| 617 253 1750 |A A/G# F#-7 F#-/E|Eb-7b5 D7b5|Db|C7b5 B7b5|Bb|
+-----------------+



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:36 EST