# Interpolating the Directional Room Impulse Response for Dynamic Spatial Audio Reproduction
## 2 DRIR Interpolation Framework
### Separating FOA Signals into Specular and Diffuse Components  
The approach we propose here is based on analyzing the FOA signals to find short segments of signals containing local peaks that are compared against energy thresholds. This is inspired by approaches to tracking noise levels in audio signal processing and, in particular, the approach of [23], which aims to distinguish between short-duration impulsive noise and longer duration increases in the noise level. Here, this approach is used to separate the DRIR into the direct sound, specular components (similar to impulsive noise components, including the direct sound) and diffuse components (similar to noise signals) through the comparison of the output power from two tracking filters: a fast and a slow tracker filter applied to shorter and longer duration segments, respectively. For each FOA impulse response in this paper, a RIR cleaner is firstly applied to remove the direct current components (achieved by designing a high pass filter with cut-off frequency set to 20 Hz, corresponding to the minimum audible frequency by the human listening system). The four-channel FOA DRIR is then normalized with any silence parts removed. The cleaned FOA DRIR is then decomposed into the direct sound, several specular components and diffuse components. This is achieved by analyzing the power of the \(W\) channel with a fast and a slow tracker as follows:  
\[P_{w}^{fast}(n)=P_{w}(n)*H_{fast}(n) \tag{4}\]  
\[P_{w}^{slow}(n)=P_{w}(n)*H_{slow}(n) \tag{5}\]where \(P_{w}(n)=W_{j}(n,\ L_{m})^{2}\) is the power of the \(W\) channel of the DRIR signal, \((*)\) is the convolution operator, and \(H_{fast}(n)\) and \(H_{slow}(n)\) are filters that derive the average short-term and longer-term power within the region centered at time \(n\), respectively. These signals will be analyzed to find short-term peaks in the average RIR power relative to the longer-term average RIR power and as explained further below. Note that this approach is most suited to the direct sound and early specular reflections where it is assumed that these are adequately separated in time. Later sections of the DRIR, where individual components are located closer in time and not extracted by the specular analysis approach, are assumed diffuse and would be synthesized using existing decorrelation techniques [24] or a decaying noise model rather than interpolation. These filters are based on window functions, and are defined as follows:  
\[H_{fast}(n)=\frac{win_{fast}(n)}{\sum win_{fast}(n)} \tag{6}\]  
\[H_{slow}(n)=\frac{win_{slow}(n)}{\sum win_{slow}(n)} \tag{7}\]  
where \(win_{fast}(n)\) and \(win_{slow}(n)\) are Hanning windows centered at sample time \(n\), with their lengths corresponding to the chosen discrete time constants of \(T_{fast}=round\left(\tau_{fast}\cdot f\right)\) and \(T_{slow}=round(\tau_{slow}\cdot f)\), respectively. Both \(\tau_{fast}\) and \(\tau_{slow}\) denote the continuous time lengths selected for the two weighted average filters in (6) and (7), separately, with \(fs\) being the sampling frequency of the DRIR recording. By looking into the ratio of the resultant filtered power \(P_{w}^{fast}(n)\) to \(P_{w}^{slow}(n)\) from (4) and (5), the salience of their difference can be measured for peak detection, which is highly related to the ratio of \(\tau_{fast}\) to \(\tau_{slow}\). In this paper, \(\tau_{fast}=\)0.0003 (s) and \(\tau_{slow}=0.002\) (s) were chosen based on informal experiments, which generally mean fine-tuning parameters for finding the optimal around a measured or empirical value of parameters that are not well-determined for a practical application. Similar experiments have been conducted for two other thresholds in this section. For the ratio of \(\tau_{fast}\) to \(\tau_{slow}\), there is an empirical value of 0.1 for peak detection applications, and the magnitude of a few milliseconds of \(\tau_{slow}\) matches the time length of specular reflections considering the employed dataset [21] in this paper.