Csound Csound-dev Csound-tekno Search About

Re: Frequency Shifting & Hilbert Transforms

Date1999-03-18 11:59
FromJens Groh
SubjectRe: Frequency Shifting & Hilbert Transforms
Hello Josep, hello list!

Josep M Comajuncosas  wrote:
> I´m rather intrigued with your code though I din ´t have had engough time to test it.
> Why are you using biquad sections instead of filter2 which implement a transposed form-II digital filter lattice?
> How did you design the elliptical filter?

Thanks - I'm happy to read a positive reply.
I didn't get filter2 nor zfilter2 to work. Actually, I would have preferred them, especially zfilter2 because of its tuneability. But I encountered strange problems: The filters were unstable - no idea, why. Even when partitioned in biquad sections with the same coefficients that I use with the biquad opcode, their output signals swung up to infinity. I didn't try Csound versions other than DirectCsound 2.7 nor tried anyhow to track the problem down. Maybe I misunderstood something about (z)filter2.
The coefficients were designed with a commercial DOS program from the days of yore. Not a good one, but the only one I had access to at that time. It uses probably the bilinear transform method. The filter and its design procedure may be improvable, but for the moment, I just wanted to have some not-too-bad filter.

Happy frequency shifting!
Jens

P.S. Dear Sean Costello, would you like to tell us what you want to use the frequency shifter for?

Date1999-03-24 17:43
FromErik Spjut
SubjectRe: Frequency Shifting & Hilbert Transforms
I forget that not everyone reads all of the messages on the list. Useful
IIR filters have poles very near to the unit circle. To keep the filters
from going unstable requires some very sophisticated numerical algorithms.
John ff. and I made some attempts to improve the numerical stability of
filter2 et al. but they didn't help enough. The filter2 family works fine
for two-or-fewer-pole filters but is numerically unstable at higher pole
counts when the poles are near the unit circle. When someone with numerical
methods experienec has time, we'll try to fix the filter2 family for higher
orders. Any volunteers?

At 12:59 PM +0100 3/18/99, Jens Groh wrote:
>Hello Josep, hello list!
>
>Josep M Comajuncosas  wrote:
>> I´m rather intrigued with your code though I din ´t have had engough
>>time to test it.
>> Why are you using biquad sections instead of filter2 which implement a
>>transposed form-II digital filter lattice?
>> How did you design the elliptical filter?
>
>Thanks - I'm happy to read a positive reply.
>I didn't get filter2 nor zfilter2 to work. Actually, I would have
>preferred them, especially zfilter2 because of its tuneability. But I
>encountered strange problems: The filters were unstable - no idea, why.
>Even when partitioned in biquad sections with the same coefficients that I
>use with the biquad opcode, their output signals swung up to infinity. I
>didn't try Csound versions other than DirectCsound 2.7 nor tried anyhow to
>track the problem down. Maybe I misunderstood something about (z)filter2.
>The coefficients were designed with a commercial DOS program from the days
>of yore. Not a good one, but the only one I had access to at that time. It
>uses probably the bilinear transform method. The filter and its design
>procedure may be improvable, but for the moment, I just wanted to have
>some not-too-bad filter.
>
>Happy frequency shifting!
>Jens
>
>P.S. Dear Sean Costello, would you like to tell us what you want to use
>the frequency shifter for?


Dr. R. Erik Spjut