Yeah, either sample the IR or sample the spectrum and use some fitting procedure (which might give you better results if you want a relatively short FIR).Music Engineer wrote:taylor expansion? why so complicated? i think, i would rather just record the impulse response. am i missing something?Miles1981 wrote:Other way, you can create a FIR out of a IIR. Just do a Taylor expansion of the polynomial and truncate it at some point. That's your FIR.
IIR-filter vs. FIR-filter : equivalence law ?
- KVRAF
- 7890 posts since 12 Feb, 2006 from Helsinki, Finland
-
- KVRist
- Topic Starter
- 98 posts since 18 Jul, 2010 from Beerlin
Hi,mystran wrote:Yeah, either sample the IR or sample the spectrum and use some fitting procedure (which might give you better results if you want a relatively short FIR).Music Engineer wrote:taylor expansion? why so complicated? i think, i would rather just record the impulse response. am i missing something?Miles1981 wrote:Other way, you can create a FIR out of a IIR. Just do a Taylor expansion of the polynomial and truncate it at some point. That's your FIR.
do you have a sample implementation (language doesn't matter) for your approach (sampling the spectrum and fitting procedure) ? Thanks.
-
Zaphod (giancarlo) Zaphod (giancarlo) https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=111268
- KVRAF
- 2596 posts since 23 Jun, 2006
For the simple case iir to fir, just process a dirac and you get the impulse response directly, truncated to a maximum size. A simple technique is fading it. That's all.
-
- KVRist
- Topic Starter
- 98 posts since 18 Jul, 2010 from Beerlin
I probably just find the most precise FIR (arbitrary length) for the use case and implement the most promising version of partitioned FFT (Radix <x>) based convolution, before implement learning and approximate the IIR.
Should be doable realtime with any contemporary CPU. The question is, whether it still responds okay to parameter changes with a huge number of coefficients.
Should be doable realtime with any contemporary CPU. The question is, whether it still responds okay to parameter changes with a huge number of coefficients.
-
- KVRist
- Topic Starter
- 98 posts since 18 Jul, 2010 from Beerlin
@Zaphod
I should have edited the question, that the use-case FIR -> IR - Filter is the interesting one (at the moment) for performance reasons.
I should have edited the question, that the use-case FIR -> IR - Filter is the interesting one (at the moment) for performance reasons.
-
Zaphod (giancarlo) Zaphod (giancarlo) https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=111268
- KVRAF
- 2596 posts since 23 Jun, 2006
No, fir filter is the worst thing in the world if you want to "change coefficients".
Fir is rather cpu intensive (due tuo the high number of taps) and in general is achieved using fft. It is hardly dynamic.
The opposite works, but you need first a min phase conversion (someone suggested Hilbert here, it is straightforward) and to approximate the fir using some sort of error minimization approach. You get an iir, which is easy on cpu. There are several tricks for fixing the phase - they are based on gauss too. But while in fir case you can "interpolate", in this case it is not so easy to do. It doesn't work that way.
If you explain what you want to do maybe we can be more helpful.
Fir is rather cpu intensive (due tuo the high number of taps) and in general is achieved using fft. It is hardly dynamic.
The opposite works, but you need first a min phase conversion (someone suggested Hilbert here, it is straightforward) and to approximate the fir using some sort of error minimization approach. You get an iir, which is easy on cpu. There are several tricks for fixing the phase - they are based on gauss too. But while in fir case you can "interpolate", in this case it is not so easy to do. It doesn't work that way.
If you explain what you want to do maybe we can be more helpful.