# Interpolating the Directional Room Impulse Response for Dynamic Spatial Audio Reproduction
## 2 DRIR Interpolation Framework
### Deriving the DOA for the FOA Encoded Image Sources  
Once the FOA signals at the two known locations have been decomposed into direct sound and specular reflections, these are analyzed to find the corresponding DOA of the direct sound and virtual image sources. Using this information, the DOA of the direct sound and reflections at the new location can be obtained using interpolation.  
The DOA of each FOA-encoded image source is determined using an existing approach to DOA estimation from B-format recordings [18] that has been found to provide accurate results when used for finding the DOA of multiple sources. Here, this method is applied to the FOA recordings of the specular reflections. The FOA encoding of the specular reflections of (11) is first converted to the time-frequency domain using the short-term Fourier transform (STFT), resulting in \((X^{i}_{spec,j}(n,k,L_{m}),Y^{i}_{spec,j}(n,k,L_{m}),\ Z^{i}_{spec,j}\Big{(}n,k,L _{m}),W^{i}_{spec,j}(n,k,L_{m})\Big{)}\) (labeled as a simplified version of \(\left(X^{i}_{j,m},\ Y^{i}_{j,m},Z^{i}_{j,m},W^{i}_{j,m}\right)\) in (12) and (13)), where \(k\) denotes discrete frequency. Here, a 1024-long STFT with 50% overlapping Kaiser-Bessel derived windows are used. The azimuth \(\theta^{i}_{j}(n,k,L_{m})\) and elevation \(\phi^{i}_{j}(n,k,L_{m})\) of each time-frequency instant, \((n,k)\), are given by:  
\[\theta^{i}_{j}(n,k,L_{m})=tan^{-1}\left(\frac{Re\Big{\{}W^{i}_{j,m}\cdot Y^{i}_ {j,m}\Big{\}}}{Re\Big{\{}\overline{W^{i}_{j,m}\cdot X^{i}_{j,m}}\Big{\}}}\right) \tag{12}\]  
Figure 3: Early reflections extracted from the \(W\) channel of the FOA RIR recording. Plotted are the power of the original RIR (blue), extracted reflections (orange), fast tracker (yellow), and slow tracker (purple): (**a**) without the specular reflections (orange); (**b**) with the specular reflections that are overlaid on top of the \(W\) channel RIR recording (blue curve).  
Figure 2: Direct sound component extracted from the \(W\) channel of the FOA RIR recording. Plotted are the power of the original RIR (blue), extracted component (orange), fast tracker (yellow), and slow tracker (purple): (**a**) without the direct sound (orange); (**b**) with the direct sound that is overlaid on top of the \(W\) channel RIR recording (blue curve).  
\[\phi_{j}^{i}(n,k,L_{m})=tan^{-1}\left(\frac{-Re\Big{\{}\overline{W_{j,m}^{i}}\cdot Z _{j,m}^{i}\Big{\}}}{\sqrt{Re\Big{\{}\overline{W_{j,m}^{i}}\cdot X_{j,m}^{i} \Big{\}}^{2}+Re\Big{\{}\overline{W_{j,m}^{i}}\cdot Y_{j,m}^{i}\Big{\}}^{2}}}\right) \tag{13}\]  
where the operator (\(Re\)) fetches the real part of a complex number, and the bar above a complex number (\(-\)) represents the conjugation operation. The time-frequency DOA estimates of (12) and (13) are calculated across the duration of the FOA signals and formed into a histogram, where the histogram bar represent the count of each DOA value and each histogram bin represents one degree resolution. Analyzing the histogram peaks provides an estimated DOA for the virtual image source (for full details, see [18]).