• No results found

Source Directivity

In document Mehra_unc_0153D_15381.pdf (Page 71-77)

4.3 Source and Listener Directivity Formulation

4.3.1 Source Directivity

In this section, a far-field source representation is presented that can be used to efficiently handle dynamic, data-driven source directivity. Next, a novel directivity formulation is proposed to incorporate this source representation into a general frequency-domain wave-based propagation technique. All the variables used henceforth, except the SH basis functions, positions and speed of sound, are frequency-dependent. For the sake of brevity these dependencies are not mentioned explicitly.

Figure 4.1: Overview of the source and listener directivity formulation: Given a scene and a source position, a set of pressure fields due to elementary spherical harmonic (SH) sources are pre- computed using a frequency-domain, wave-based sound propagation technique. Next, these pressure fields are encoded in the basis functions (e.g. multipoles) and stored for runtime use. At runtime, a SH decomposition of the dynamic source directivity is performed to compute the corresponding SH coefficients. The final pressure field is computed as a summation of the pressure fields due to SH sources (evaluated at the listener position) weighted by the appropriate SH coefficients. In order to incorporate dynamic listener directivity in wave-based techniques, an interactive plane-wave decomposition approach based on derivatives of the pressure field is proposed. Acoustic responses for both ears are computed at runtime by using this efficient plane-wave decomposition of the pressure field and the HRTF-based listener directivity. These binaural acoustic responses are convolved with the (dry) audio to compute the propagated spatial sound at the listener position.

Source representation The radiation pattern of a generic directional source can be expressed using the one-point multipole expansion (Ochmann, 1995) as:

s(x,y) = L−1 X l=0 l X m=−l blm h 2 l(2πνr/c)Ylm(θ, φ), (4.7)

wheres(x,y)is the pressure field at point xof the directional source centered at pointy, h2l(.)

are the spherical Hankel functions of second kind,Ylm(.)are complex-valued SH basis functions,

(r, θ, φ)is the vector(x−y)expressed in spherical coordinates,blm are weights andLis order of the expansion,νis the frequency, andcis the speed of sound. This source formulation is valid in both near and far-field of the source1.

The choice of source representation for directional sources is motivated by the measured direc- tivity data that is currently available for real-world sound sources. Most available measurements have been collected by placing sources in an anechoic chamber and recording their directivity by

1

Far-field refers to the region of space where the distancedof any point in that region to the source is greater than the wavelengthλof the sound emitted by the source. The complementary region is the near-field (Kino, 1987, p. 165).

rotating microphones every few degrees at a fixed distance from the source. Typically, these mea- surements are carried out at a distance of a few meters, which corresponds to the far-field region for the frequencies emitted by these sources2. Keeping this in mind, we chose a source representation that corresponds to the far-field radiation pattern of a directional source. Under far-field approxi- mation,h2l(z) ≈ˆjl+1e−ˆjz/zwhereˆj =√−1simplifying equation (4.7) to the following source representation (Menzies, 2007): s(x,y) = e −ˆj2πνr/c r L−1 X l=0 l X m=−l almYlm(θ, φ), (4.8) = L−1 X l=0 l X m=−l almslm(x,y), (4.9) = e −ˆj2πνr/c r D(θ, φ), (4.10)

wherealm =blmˆjl+1c/(2πν)are the SH coefficients,slm(x,y) = e−ˆj2rπνr/cYlm are the elementary SH sources, and D(θ, φ) = P P

almYlm(θ, φ) is the source directivity function specified for each frequency either analytically or measured or simulated at discrete sample directions. The directivity function can be complex-valued (both magnitude and phase) or real-valued (magnitude- only) function. Typically, the measured data is magnitude-only and available as directivities averaged over octave-wide frequency bands (PTB, 1978).

Sound propagation for directional sources We now describe the approach for incorporating di- rectional sources in a general frequency-domain, wave-based sound propagation technique. The steps outlined below are repeated for frequency samples in the range[0, νmax], whereνmaxis the

maximum frequency simulated.

The linearity of the Helmholtz equation implies that the pressure field of a linear combination of sources is a linear combination of their respective pressure fields (Pierce, 1989). The proposed source representation for directional sources is a linear combination of elementary SH sourcesslm(x,y)

with different weightsalm (equation (4.9)). Therefore, for a given scene, if the pressure fieldplm(x)

corresponding to each of the elementary SH sourcesslm(x,y)is precomputed, then the pressure

2For a distanced >3.43m, corresponds to far-field for all the frequenciesν >100Hz (for all wavelengthsλ=c/ν < 3.43m).

fieldp(x)due to any directional sources(x,y)can be expressed as the linear combination of the precomputed pressure fieldsplm(x)of these elementary SH sources with the same weightsalm:

X l X m almslm(x,y) | {z } s(x,y) −→ X l X m almplm(x) | {z } p(x) .

The pressure fields for elementary SH sources can be computed using any wave-based sound propagation technique. In the case of interactive applications, this computation is performed during the preprocessing stage, and the resulting pressure field data is efficiently encoded and stored. This pressure field data completely defines the acoustic response to any directional source at the given position up to the SH approximation order. At runtime, the specified source directivityD(θ, φ)is decomposed into a SH-based representation using SH projection methods, and the resulting weights alm are used to compute the final pressure field at listener position, as described above.

SH projection Given an analytical expression for the directivity functionD(θ, φ), the SH coeffi- cientsalm can be computed by SH projection as follows:

alm = Z 2π 0 Z π 0 D(θ, φ)Ylm(θ, φ) sinθ dθ dφ. (4.11)

This expression can be evaluated either symbolically or numerically, depending onD(θ, φ)(Green, 2003).

Given the directivity functionD(θ, φ)at sampled locations{(θ1, φ1),(θ2, φ2), ...,(θn, φn)},

the spherical harmonic expansion can be fitted to this function in the least-square sense, by solving an over-determined linear system(n > L2)to compute the coefficientsalm:

X

l

X

m

Ylmk, φk) alm =D(θk, φk). fork= 1, ..., n; (4.12)

The source representation can handle both complex-valued and real-valued directivities. In case the directivity function is real-valued (as the widely available measured data is magnitude only), the real-valued SH functions (Green, 2003) are used in the aforementioned expressions.

Dynamic and Rotating Directivity For a source with dynamic directivity, the SH decomposition of the source directivity functionD(θ, φ) is computed at runtime. This is performed by solving equation (4.12) at interactive rates using fast linear solvers (such as Intel MKL). For the special case of a rotating directional source, the new spherical harmonic coefficientsarotlm after rotation can be computed by applying the spherical harmonic rotation matrix to the original coefficientsal0m0 as follows: arot lm = X l0 X m0 Z(lm, l0m0) al0m0, (4.13)

whereZ(j, k)is the(j, k)thentry of the spherical harmonic rotation matrixZ, described in detail by Green et al. (Green, 2003). Matrices can also be derived for more general rotations about arbitrary axes (Green, 2003, p. 21-26).

Note that the linearity of the Helmholtz equation and the use of the spherical harmonic basis enables this source directivity framework to handle dynamic directivity at runtime without running the offline simulation again.

4.3.2 Spatial Audio

In this section, we discuss the method for computing spatial sound using efficient plane-wave decomposition of the pressure field and the HRTF-based listener directivity. To support a moving and rotating listener (dynamic listener directivity), one needs to update the SH coefficients of the HRTFsβlm and plane-wave decompositionαlm interactively. The head rotation of listener can be incorporated by applying SH rotation techniques to the HRTF’s SH coefficients (equation (4.12)). However, in order to handle listener translation, the SH coefficients of the plane-wave decomposition will have to be recomputed at runtime. Previous techniques for plane-wave decomposition (Park and Rafaely, 2005; Rafaely and Avni, 2010; Zotkin et al., 2010) cannot compute these coefficients at interactive rates.

Plane-wave decomposition using derivatives A novel method to compute the SH coefficients of the plane-wave decomposition at interactive rates using the derivatives of the pressure field is proposed next.

Theorem:The SH coefficients of the plane-wave decomposition of the pressure field at a point in space can be expressed as a linear combination of pressure field derivatives at that point.

Proof: Given the polynomial expression of thenthorder andqthdegree SH as

Ynq(s) =A

X

(a,b,c)

Γa,b,c sax sby scz,

whereΓa,b,cis a constant,s= (sx, sy, sz)is the unit vector in the direction of plane wave propagation,

a ≥ 0, b ≥ 0, c ≥ 0, and a+b +c = n. For computing the SH coefficient of the plane- wave decompositionαnq, multiply both sides byαlmY

lm (whereY

lm is conjugate SH) and apply

summation and integral operators to give

X l X m αlm Z Ynq Y ∗ lmds=A X (a,b,c) Γa,b,c X l X m αlm Z sax sby scz Y∗ lmds.

Using the orthonormality property of SH, we get

αnq =A X (a,b,c) Γa,b,c X l X m αlm Z sax sby scz Y∗ lmds. (4.14)

We denote the partialathx-derivative, partialbthy-derivative, partialcthz-derivative of pressure field asp(a,b,c) = ∂x∂aa+∂yb+b∂zcpc. The total pressure at pointx(equation 4.3) along with the SH-expansion for

signature functionµ(s)gives

p(x) = 1 4π X l X m αlm Z S ψs(x)Y ∗ lm(s)ds.

On differentiating and evaluating the above expression atx0, we get 4π (ˆjk)a+b+c p (a,b,c)(x 0) = X l X m αlm Z saxsby sczY∗ lmds, (since ψs(x0) = 1).

Substituting above expression in equation (4.14), we get

αnq =A X (a,b,c) Γa,b,c 4π (ˆjk)a+b+c p (a,b,c)(x 0). (4.15)

The above expression relates the pressure field derivatives to the SH coefficients of the plane-wave decomposition, at the listener positionx0. This gives us an efficient method to compute the plane-

wave decomposition using derivatives of the pressure field.

Sound propagation for directional listeners At runtime, the pressure field derivatives at the lis- tener position are computed interactively by differentiating the pressure field’s basis functions corresponding to the wave-based propagation techniqueanalyticallyrather than using a finite dif- ference stencil (Section 4.4). Therefore, higher-order derivatives do not suffer from numerical instabilities allowing the SH coefficients of the plane-wave decomposition to be computed to higher- orders (equation (4.15)). Finally, we compute the spatial sound for the left and right ears as a dot product of the SH coefficients of the plane-wave decomposition and the HRTFs (equation (4.6)).

Over the years years, several SH-based models have been proposed for representing HRTFs (Rafaely and Avni, 2010; Pollow et al., 2012). This work is orthogonal to those techniques. As discussed above, to compute spatial audio, a dot product of SH coefficients of the HRTFs and the plane wave decomposition of pressure field is required (Rafaely and Avni, 2010). These techniques focus on the first part - computing better HRTF coefficients. The main contribution of this work lies in the second part - efficiently computing SH coefficients of the plane-wave decomposition at interactive rates to support a moving and rotating listener. This allows efficient computation of spatial sound for a moving listener at runtime. The approach can compute spatial sound for a head-tracked listener at interactive rates and provides the flexibility to use personalized (user-customized) HRTFs without recomputing the simulation results.

In document Mehra_unc_0153D_15381.pdf (Page 71-77)