1
$\begingroup$

(I am trying to create an IIR audio filter that adds reverb to an initial sample)

Say I designed an analog filter to model acoustic attenuation based on the following mathematical model:

$$ I = I_0 e^{pt}, $$

Where $p$ is some constant such that $-1 \leq p < 0$.

In the laplace domain, this is simply

$$ \mathfrak{L}\{I\} = \dfrac{1}{s-p} $$

Using the impulse invariant transform, I get the digital equivalent

$$ Z\{I\} = \dfrac{z}{z-e^{pT_s}}, $$

Which inherently has one pole.

How do I add more resolution to this filter? Implementing this as a digital filter makes my audio sample sound like garbage. Would adding arbitrary taps keeps it from modeling the original analog decay?

Using experimental attenuation data and frequency sampling for an FIR equivalent, I can easily obtain 50000 poles and create a very clear reverb-adding filter.

Both IIR and FIR methods were tested in MATLAB, with the FIR using MATLAB's built-in church impulse response.

(Sorry if the question is unclear, I'm a bit new at this.)

$\endgroup$
  • $\begingroup$ What are the two poles in Z{I} given $e^{pT_s}$ is a real number? Please provide more details on the filter implementation that resulted in garbage including sampling rate, p that was used and the quantization for all signals. $\endgroup$ – Dan Boschen Nov 26 '18 at 17:37
  • $\begingroup$ Sorry for the delay (no pun intended). I was thinking in terms of the Matlab implementation, which requires two polynomial coefficients. Upon reflection I realize I made the mistake of thinking this meant there were two poles. It should be one pole. I used Ts = 0.01. Matlab code is here: pastebin.com/j2PHzN9f $\endgroup$ – ntjess Nov 26 '18 at 20:15
1
$\begingroup$

Doing a decent sounding audio reverb with IIR filters is difficult. You need way more poles that you can generate with a normal IIR structure and you need a way to do it efficiently.

  1. There is a significant trade off between sound quality versus MIPS, memory, latency & controllabilty
  2. A good starting point is the original Schroeder reverb, which uses comb filters and warped allpass filters. See for example: https://ccrma.stanford.edu/~jos/pasp/Example_Schroeder_Reverberators.html
  3. You want to get lots of poles cheaply. For example, wrapping a feedback loop around a long delay will create lots of poles with just a single multiply + add.
  4. Ideally the poles are randomly distributed and have no regularity to them. The simple Schroeder algortihm doesn't quite do this, so it tends to sound "ringy" or "metallic".
  5. A better alternative are feedback delay networks. See for example https://ccrma.stanford.edu/~jos/pasp/FDN_Reverberation.html. These work by having multiple delay lines of different lengths with a feedback matrix: i.e. each delay is fed back into all delays. This creates a very large number of relatively low Q poles.
  6. Finally you can dial in all the frequency dependencies and also add some early reflections as sparse FIR filters (with IIR frequency shaping on the spares tabs)
$\endgroup$
  • $\begingroup$ Thank you for the multi-faceted answer. Does this mean the route I was taking can't lead to a proper reverb filter? $\endgroup$ – ntjess Nov 27 '18 at 3:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.