| As usual, the devil is in the details. I used the filter design page to
generate some of the coefficients I used to test filter2 for IIR filters.
The filters work fine in infinite-precision math but fail miserably in
Csound's single-precision math. I agree that the proposed opcode would be
most wonderful. However, whoever does it is in for some tedious work in
finite precision arithmetic.
At 9:28 AM -0500 1/29/99, Michael Gogins wrote:
>I think this is a fantastic idea. It might also be interesting to create a
>general-purpose filter design program in Java, so all platforms can use it,
>that would format the filter coefficients into a line of Csound orc code for
>filter2.
>
>[stuff deleted]
>>
>>maybe something like this
>>
>>ar filtgen asig, iftype, ibandtype, iripple, iorder, icorner2, icorner2
>>
>>where
>>iftype : filtertype 1=Butterworth,2=Chebychev,3=Bessel
>>ibandtype : Bandtype 1=Lowpass , 2=Highpass, 3=Bandpass, 4=Bandstop
>>iripple : ripple in dB for Chebychev filter
>>iorder : order of filter
>>icorner1 : cornerfrequency 1
>>icorner2 = cornerfrequency 2, for Bandpass/Bandstop filters
>>
>>the opcode would then at inittime design the filter and maybe show
>>a graphic output of freq ,phase and impulse response.
>>
>>at http://www.cs.york.ac.uk/~fisher/mkfilter/ there is an online
>>interactive filter design page.
>>The source code is available to download too, but I haven't found anything
>>about license.
>>If this is interesting one could off course ask the author if it's okay
>>to use his sources in csound.
>>
>>Roger K
-------------------------------------------------------------------------------
Erik Spjut (spyoot, rhymes with cute) - Associate Professor of Engineering
and Associate Director for Engineering Computing, Center for Design Education
Harvey Mudd College, Claremont, CA 91711-5990 USA
Erik_Spjut@hmc.edu Ph & Voice mail (909) 607-3890 Fax (909) 621-8967
|