# Interpolating the Directional Room Impulse Response for Dynamic Spatial Audio Reproduction
## 2 DRIR Interpolation Framework
### Deriving the Interpolated FOA Signals at the Virtual Listening Location  
The framework considered in this paper assumes the two closest FOA signals recorded at positions \(L_{K1}\) and \(L_{K2}\) are used to find the interpolated FOA at an arbitrary interpolation position \(L_{I}\), with the listener looking towards the source of interest (see Figure 1). As an initial exploration, the interpolated DOA in this work is found using a linear interpolation approach that calculates the weighted average, formulated as follows:  
\[\theta_{j}^{i}(n,L_{I})=\frac{d_{I2}}{d_{1I}+d_{I2}}\cdot\theta_{j}^{i}(n,L_{ K1})+\frac{d_{1I}}{d_{1I}+d_{I2}}\cdot\theta_{j}^{i}(n,L_{K2}) \tag{14}\]  
\[\phi_{j}^{i}(n,L_{I})=\frac{d_{I2}}{d_{1I}+d_{I2}}\cdot\phi_{j}^{i}(n,L_{K1})+ \frac{d_{1I}}{d_{1I}+d_{I2}}\cdot\phi_{j}^{i}(n,L_{K2}) \tag{15}\]  
where \(d_{1I}\) and \(d_{I2}\) are the distance from \(L_{I}\) to \(L_{K1}\) and \(L_{K2}\), separately. This method is applied to interpolate for the direct sound and specular components using corresponding extracted DOAs from the \(W\) channels of the two FOA recordings (FOA 1 and FOA 2 in Figure 1). Note that the formulations consider the scenario where the listening position is closer to one of the two known positions. The closer recording contributes more than the other in the interpolated result, so the proportion defined for \(\theta_{j}^{i}(n,L_{K1})\) and \(\phi_{j}^{i}(n,L_{K1})\) at \(L_{K1}\) is the distance from \(L_{I}\) to \(L_{K2}\), \(d_{I2}\), divided by the overall distance \(d_{1I}+d_{I2}\). Next, the TOAs corresponding to the peak of the direct sound and specular reflections are found by using linear interpolation of the TOAs of the direct sound and specular reflections found in the two known FOA recordings as:  
\[n_{j}^{i}(n,L_{I})=\frac{d_{I2}}{d_{1I}+d_{I2}}\cdot n_{j}^{i}(n,L_{K1})+\frac {d_{1I}}{d_{1I}+d_{I2}}\cdot n_{j}^{i}(n,L_{K2}) \tag{16}\]  
where \(n_{j}^{i}(n,L_{I})\) is the interpolated time (in samples) for one window, and \(n_{j}^{i}(n,L_{K1})\) and \(n_{j}^{i}(n,L_{K2})\) are the TOAs (in samples) of peaks in the direct sound and specular reflections extracted from the two FOA microphones, respectively. With this information, the interpolated FOA signal can be found using the two known FOA recordings along with the interpolated TOA and DOA. This is achieved by taking the direct sound and specular reflections extracted from the known FOA recordings and encoded as individual FOA signals (see Equation (11)) and creating new FOA encodings of these reflections using the interpolated DOA and standard B-format encoding functions. The process is repeated up to the desired number of image sources. The peaks of these interpolated specular reflections are shifted so that they are located at the interpolated TOA of (16); this ensures that they are correctly located in time relative to the direct sound component. The final interpolated DRIR signal is obtained by summing the direct sound and time-shifted interpolated reflections. The final interpolated FOA signal is obtained by adding the interpolated specular component to the diffuse component, which is based on the diffuse component extracted from one known FOA recording and as derived in (10). When extracting the specular reflections from two FOA recordings, it is important that the reflections corresponding to the same image source (e.g., same first order reflection from the same wall) are used in the interpolation. If not, there is a risk that the DOAs used from both specular reflection components will correspond to different wall reflections and so result in an incorrect reflection DOA at the interpolated location. One approach to address this is to check the TOA of both specular reflections extracted from the two known FOA recordings. Provided that the known locations are not too far from each other, the amplitude of the extracted specular reflections will be similar (within a threshold), and the TOA can be used solely to identify any matching specular reflections.