### Inverse Filtering

Whatever poles are chosen for the least-damped part, and however they
are computed (provided they are stable), the damped part can be
computed from the full impulse response and parametric part using
*inverse filtering*, as illustrated in the computed examples
above. The inverse filter is formed from zeros equal to the estimated
resonant poles. When the inverse filter is applied to the full
resonator impulse, a ``residual'' signal is formed which is defined as
the impulse response of the leftover, more damped modes. The residual
is in exactly the nonparametric form needed for commuting with the
string and convolving with the string excitation signal, such as a
``pluck'' signal. Feeding the residual signal to the parametric
resonator gives the original resonator impulse response to an
extremely high degree of accuracy. The error is due only to numerical
round-off error during the inverse and forward filtering computations.
In particular, the least-damped resonances need not be accurately
estimated for this to hold. When there is parametric estimation error,
the least-damped components will fail to be completely removed from
the residual signal; however, the residual signal through the
parametric resonator will always give an exact reconstruction of the
original body impulse response, to within roundoff error. This is
similar to the well known feature of linear predictive coding that
feeding the prediction error signal to the LP model always gives back
the original signal
[297].

The parametric resonator need not be restricted to all-pole filters,
however, although all-pole filters (plus perhaps zeros set manually to the
same angles but contracted radii) turn out to be very convenient and simple
to work with. Many filter design techniques exist which can produce a
parametric part having any prescribed number of poles and zeros, and
weighting functions can be used to ``steer'' the methods toward the
least-damped components of the impulse response. The equation-error method
illustrated in Fig. 8.13 is an example of a method
which can also compute zeros in the parametric part as well as poles.
However, for inverse filtering to be an option, the zeros must be
constrained to be *minimum phase* so that their inverses will be stable
poles.

#### Empirical Notes on Inverse Filtering

In experiments factoring guitar body impulse responses, it was found that the largest benefit per section comes from pulling out the main Helmholtz air resonance. Doing just this shortens the impulse response (excitation table) by a very large factor, and because the remaining impulse response is noise-like, it can be truncated more aggressively without introducing artifacts.

It also appears that the bandwidth estimate is not very critical in
this case. If it is too large, or if ``isolation zeros'' are not
installed behind the poles, as shown in
Figs. 8.18b and
8.21b, the inverse filtering serves
partially as a *preemphasis* which tends to flatten the guitar
body frequency response overall or cause it to rise with frequency.
This has a good effect on the signal-to-quantization-noise ratio
versus frequency. To maximize the worst-case
signal-to-quantization-noise versus frequency, the residual spectrum
should be flat since the quantization noise spectrum is normally close
to flat. A *preemphasis* filter for flattening the overall
spectrum is commonly used in speech analysis [363,297].
A better preemphasis in this context is an *inverse
equal-loudness* preemphasis, taking the inverse of an equal-loudness
contour near the threshold of hearing in the Fletcher-Munson curves
[475].
This corresponds to psychoacoustic ``noise shaping'' so that the
quantization noise floor is perceptually uniform, and decreasing
playback volume until it falls below the threshold of hearing results
in all of the noise disappearing across the entire spectrum at the
same volume.^{9.19}

Since in some fixed-point implementations, narrow bandwidths may be
difficult to achieve, good results are obtained by simply setting the
bandwidth of the single resonator to any minimum robust value. As a
result, there may still be some main-air-mode response in the residual
signal, but it is typically very small, and early termination of it using a
half-window for table shortening is much less audible than if the original
impulse response were similarly half-windowed. The net effect on the
instrument is to introduce *artificial damping* the main air mode in
the guitar body. However, since this mode rings so much longer than the
rest of the modes in the guitar body, shortening it does not appear to be
detrimental to the overall quality of the instrument. In general, it is
not desirable for isolated modes to ring longer than all others. Why would
a classical guitarist want an audible ``ringing'' of the guitar body near
Hz?

In computing figures 8.16 and Fig. 8.16b, the estimated of the main Helmholtz air mode was only . As a result, it is still weakly present in the inverse filter output (residual) spectrum Fig. 8.16b.

#### Matlab Code for Inverse Filtering

Below is the matlab source code used to extract the main Helmholtz air mode from the guitar body impulse response in Figures 8.14 through 8.17:

freq = 104.98; % estimated peak frequency in Hz bw = 10; % peak bandwidth estimate in Hz R = exp( - pi * bw / fs); % pole radius z = R * exp(j * 2 * pi * freq / fs); % pole itself B = [1, -(z + conj(z)), z * conj(z)] % numerator r = 0.9; % zero/pole factor (notch isolation) A = B .* (r .^ [0 : length(B)-1]); % denominator residual = filter(B,A,bodyIR); % apply inverse filter

**Next Section:**

Sinusoidal Modeling of Mode Decays

**Previous Section:**

Mode Extraction Techniques