## 3 Dynamic Replacement of Impulse Responses  
We first examine filter impulse responses where the coefficients are not continuously changing, but are replaced at given points in time. This approach was first presented in [8], but is given a more detailed explanation here. It is related to the superposition strategy suggested by [PERSON] and [PERSON] [12]: when a filter change is called for, the signal input is disconnected from the currently running filter and applied to the new one. The old filter is left free-running, i.e., the old input samples propagate through the filter, and will eventually die out (for FIR filters after a time period equivalent to the filter length). The outputs of the two filters are added together. The next change adds another filter, and so on. To make this work, a number of filter processes must run in parallel. Our approach differs from [PERSON] and [PERSON] in that we propose to run all filters in the same filter process, simply by switching the new filter, coefficient by coefficient, into the same filter buffer as the old one. We claim that, for FIR filters, the results produced by the two approaches are equal, but that our approach avoids the added computational cost of computing two or more parallel convolution processes. By exploiting inherent properties of convolution, we also show that we may start convolving with the new filter impulse response in parallel with the generation/recording of it. As an initial step consider a simple filter of length \(N\) that is switched on at a given time index \(n_{s}\):  
\[h_{E}(m,n)= \begin{cases}0,&m<n_{s},\\ e_{n-m},&m\geq n_{s},\end{cases}  \tag{12}\]  
It should be obvious that inputs \(x(n)\) for \(n<n_{s}\) will not contribute to the output. If we apply Equation (10) and once again let \(l=n-m\), the first \(N\) samples of convolution output starting at time index \(n_{s}\) can be written as:  
\[y(n)=\sum_{l=0}^{n-n_{s}}e_{l}x(n-l)\qquad(n_{s}\leq n\leq n_{s}+N-1). \tag{13}\]  
After \(n=n_{s}+N-1\) the sum will be upper limited by \(l=N-1\). The first output sample, \(y(n_{s})\), depends on the first coefficient, \(e_{0}\) only. The second sample, \(y(n_{s}+1)\), depends on the first two, \(e_{0}\) and \(e_{1}\). In general, \(y(n_{s}+k)\) depends on coefficient \(e_{l}\) only if \(l\leq k\). Hence, the filter coefficients can be switched in one by one in parallel with the running convolution process. Now consider the counterpart, a filter of length \(N\) that is switched _off_ at the same time index \(n_{s}\) (and for simplicity assume that \(n_{s}>N\), the filter length):  
\[h_{C}(m,n)= \begin{cases}c_{n-m},&m<n_{s},\\ 0,&m\geq n_{s}.\end{cases}  \tag{14}\]  
Inputs \(x(n)\) for \(n\geq n_{s}\) will not contribute to the output. The first \(N\) samples of convolution output starting at \(n_{s}\) can be written as:  
\[y(n)=\sum_{l=n-n_{s}+1}^{N-1}c_{l}x(n-l)\qquad(n_{s}\leq n\leq n_{s}+N-1). \tag{15}\]  
The first output sample, \(y(n_{s})\), does _not_ depend on the first coefficient, \(c_{0}\). The second sample, \(y(n_{s}+1)\), does not depend on the first two, \(c_{0}\) and \(c_{1}\). In general, \(y(n_{s}+k)\) does not depend on coefficient \(c_{l}\) if \(l\leq k\). The natural extension of these two filters is the combined filter \(h_{C+E}\) where the coefficients are replaced at time index \(n_{s}\):  
\[h_{C+E}(m,n)= \begin{cases}c_{n-m},&m<n_{s},\\ e_{n-m},&m\geq n_{s}.\end{cases}  \tag{16}\]  
The first \(N\) samples of convolution output starting at \(n_{s}\) must be equal to the sum of the two filters discussed above:  
\[y(n)=\sum_{l=0}^{n-n_{s}}e_{l}x(n-l)+\sum_{l=n-n_{s}+1}^{N-1}c_{l}x(n-l)\qquad (n_{s}\leq n\leq n_{s}+N-1). \tag{17}\]  
A closer scrutiny reveals that coefficients \(e_{l}\) and \(c_{l}\) do not contribute to the same output sample \(y(n)\) for any \(l,n\). In fact, the filter coefficients \(c_{l}\) may be replaced with \(e_{l}\) one by one during the transition interval \([n_{s},n_{s}+N-1]\), while the convolution is running.