Dplug icon indicating copy to clipboard operation
Dplug copied to clipboard

Better version of IIR filter

Open p0nce opened this issue 5 years ago • 3 comments

Create a new IIR filter facility in a dplug:iir module, splitted in two.

  • [ ] Pole-Zero realization should be separated from computation of those Pole and Zero placement.
  • [ ] Smoothing should be configurable too. The PoleZero computation should be push-style, and no pole-zero pair inversion occur without its control (because that would be detrimental to smoothing)
  • [ ] DC auto-initialization (inversion of the realization) should be supported because it's very useful for control signals at startup
  • [ ] multi-channel should be supported, since it's probably more efficient
  • [ ] should allow multiple Pole-Zero realizations (templated ?)
  • [x] ~~correct one-poles... https://dsp.stackexchange.com/a/54088~~ => it's tricky, see one pole varaitions in dplug/dsp/iir.d
  • [ ] Operates on AudioBuffer
  • [ ] not sure how to allow modulation, in Panagement this is per-sample...
  • [ ] serial section possibly parallelized with the trick of delaying them to run them in parallel: https://github.com/EleonoreMizo/pedalevite/blob/master/src/mfx/dsp/iir/SvfCore4Simd.h

Summing Up

The role of the pole-zero realization is to filter, hold state, hold smoothing state. It has a maximum number of pole-zero (8 ? 6 ?) The role of the pole-zero computation is to compute pole and zeros when needed.

Computation feeds realization with pole and zero, and choose their relative order.

Advantages: the last filter structure you need. Downsides: conflating realization and design was a bit more friendly.

p0nce avatar Dec 04 '19 11:12 p0nce

Desired realizations: Direct Form I / transposed Direct Form II / Andy Simper's oversampled state variable filter

p0nce avatar Dec 08 '19 12:12 p0nce

First need to make a few dplug:audio "processors", like a silence detector or a delayline

p0nce avatar Sep 09 '21 09:09 p0nce

Doing this necessitates in turn to define AudioContext and audio processors in a future-proof way

p0nce avatar Sep 09 '21 10:09 p0nce