Abstract:
This invention addresses sound recording and mixing methods for 3-D audio rendering of multiple sound sources over headphones or loudspeaker playback systems. Economical techniques are provided, whereby directional panning and mixing of sounds are performed in a multi-channel encoding format which preserves interaural time difference information and does not contain head-related spectral information. Decoders are provided for converting the multi-channel encoded signal into signals for playback over headphones or various loudspeaker arrangements. These decoders ensure faithful reproduction of directional auditory information at the eardrums of the listener and can be adapted to the number and geometrical layout of the loudspeakers and the individual characteristics of the listener. A particular multi-channel encoding format is disclosed, which, in addition to the above advantages, is associated with a practical microphone technique for producing 3-D audio recordings compliant with the decoders described.

Description:
FIELD OF THE INVENTION 
     The present invention relates generally to audio recording, and more specifically to the mixing, recording and playback of audio signals for reproducing real or virtual three-dimensional sound scenes at the eardrums of a listener using loudspeakers or headphones. 
     BACKGROUND 
     A well-known technique for artificially positioning a sound in a multi-channel loudspeaker playback system consists of weighting an audio signal by a set of amplifiers feeding each loudspeaker individually. This method, described e.g. in [Chowning71], is often referred to as “discrete amplitude panning” when only the loudspeakers closest to the target direction are assigned non-zero weights, as illustrated by the graph of panning functions in  FIG. 1 . Although  FIG. 1  shows a two-dimensional loudspeaker layout, the method can be extended with no difficulty to three-dimensional loudspeaker layouts, as described e.g. in [Pulkki97]. A drawback of this technique is that it requires a high number of channels to provide a faithful reproduction of all directions. Another drawback is that the geometrical layout of the loudspeakers must be known at the encoding and mixing stage. An alternative approach, described in [Gerzon85], consists of producing a ‘B-Format’ multi-channel signal and reproducing this signal over loudspeakers via an ‘Ambisonic’ decoder, as illustrated in  FIG. 2 . Instead of discrete panning functions, the B Format uses real-valued spherical harmonics. The zero-order spherical harmonic function is named W, while the three first-order harmonics are denoted X, Y, and Z. These functions are defined as follows:
 
 W (σ,φ)=1
 
 X (σ,φ)=cos(φ)cos(σ)
 
 Y (σ,φ)=cos(φ)sin(σ)
 
 Z (σ,φ)=sin(φ)
 
where σ and φ denote respectively the azimuth and elevation angles of the sound source with respect to the listener, expressed in radians. An advantage of this technique over the discrete panning method is that B Format encoding does not require knowledge of the loudspeaker layout, which is taken into account in the design of the decoder. A second advantage is that a real-world B-Format recording can be produced with practical microphone technology, known as the ‘Soundfield Microphone’ [Farrah79]. As illustrated in  FIG. 2 , this allows for combining microphone-encoded sounds with electronically encoded sounds to produce a single B-format recording. First-order Ambisonic decoders do not reconstruct the acoustic pressure information at the ears of the listener except at low frequencies (below about 700 Hz). As described e.g. in [Bamford95], the frequency range can be extended by increasing the order of spherical harmonics, but only at the expense of a higher number of encoding channels and loudspeakers.
 
     3-D audio reproduction techniques which specifically aim at reproducing the acoustic pressure at the two ears of a listener are usually termed binaural techniques. This approach is illustrated in  FIG. 3  and reviewed e.g. in [Jot95]. A binaural recording can be produced by inserting miniature microphones in the ear canals of an individual or dummy head. Binaural encoding of an audio signal (also called binaural synthesis) can be performed by applying to a sound signal a pair of left and right filters modeling the head-related transfer functions (HRTFs) measured on an individual or a dummy head for a given direction. As shown in  FIG. 3 , a HRTF can be modeled as a cascaded combination of a delaying element and a minimum-phase filter, for each of the left and right channels. A binaurally encoded or recorded signal is suitable for playback over headphones. For playback over loudspeakers, a cross-talk canceller is used, as described e.g. in [Gardner97]. 
     Conventional binaural techniques can provide a more convincing 3-D audio reproduction, over headphones or loudspeakers, than the previously described techniques. However, they are not without their own drawbacks and difficulties.
         Compared to discrete amplitude panning or B-Format encoding, binaural synthesis involves a significantly larger amount of computation for each sound source. An accurate finite impulse response (FIR) model of an HRTF typically requires a 1-ms long response, i.e. approximately 100 additions and multiplies per sample period at a sample rate of 48 kHz, which amounts to 5 MIPS (million instructions per second).   The HRTF can only be measured at a set of discrete positions around the head. Designing a binaural synthesis system which can faithfully reproduce any direction and smooth dynamic movements of sounds is a challenging problem involving interpolation techniques and time-variant filters, implying an additional computational effort.   The binaurally recorded or encoded signal contains features related to the morphology of the torso, head, and pinnae. Therefore the fidelity of the reproduction is compromised if the listener&#39;s head is not identical to the head used in the recording or the HRTF measurements. In headphone playback, this can cause artifacts such as an artificial elevation of the sound, front-back confusions or inside-the-head localization.   In reproduction over two loudspeakers, the listener must be located at a specific position for lateral sound locations to be convincingly reproduced (beyond the azimuth of the loudspeakers), while rear or elevated sound locations cannot be reproduced reliably.       

     [Travis96] describes a method for reducing the computational cost of the binaural synthesis and addresses the interpolation and dynamic issues. This method consists of combining a panning technique designed for N-channel loudspeaker playback and a set of N static binaural synthesis filter pairs to simulate N fixed directions (or “virtual loudspeakers”) for playback over headphones. This technique leads to the topology of  FIG. 4   a , where a bank of binaural synthesis filters is applied after panning and mixing of the source signals. An alternative approach, described in [Gehring96], consists of applying the binaural synthesis filters before panning and mixing, as illustrated in  FIG. 4   b . The filtered signals can be produced off-line and stored so that only the panning and mixing computations need to be performed in real time. In terms of reproduction fidelity, these two approaches are equivalent. Both suffer from the inherent limitations of the multi-channel positioning techniques. Namely, they require a large number of encoding channels to faithfully reproduce the localization and timbre of sound signals in any direction. 
     [Lowe95] describes a variation of the topology of  FIG. 4   a , in which the directional encoder generates a set of two-channel (left and right) audio signals, with a direction-dependent time delay introduced between the left and right channels, and each two-channel signal is panned between front, back and side “azimuth placement” filters. [Chen96] uses an analysis method known as principal component analysis (PCA) to model any set of HRTFs as a weighted sum of frequency-dependent functions weighted by functions of direction. The two sets of functions are listener-specific (uniquely associated to the head on which the HRTF were measured) and can be used to model the left filter and the right filter applied to the source signal in the directional encoder. [Abel97] also shows the topologies of  FIGS. 4   a  and  4   b  and uses a singular value decomposition (SVD) technique to model a set of HRTFs in a manner essentially equivalent to the method described in [Chen96], resulting in the simultaneous solution for a set of filters and the directional panning functions. 
     There remains a need for a computationally efficient technique for high-fidelity 3-D audio encoding and mixing of multiple audio signals. It is desirable to provide an encoding technique that produces a non listener-specific format. There is a need for a practical recording technique and suitably designed decoders to provide faithful reproduction of the pressure signals at the ears of a listener over headphones or two-channel and multi-channel loudspeaker playback systems. 
     SUMMARY OF THE INVENTION 
     A method for positioning an audio signal includes selecting a set of spatial functions and providing a set of amplifiers. The gains of the amplifiers being dependent on scaling factors associated with the spatial functions. An audio signal is received and a direction for the audio signal is determined. The scaling factors are adjusted depending on the direction. The amplifiers are applied to the audio signal to produce first encoded signals. The audio signal is then delayed. The second filters are then applied to the delayed signal to produce second encoded signals. The resulting encoded signals contain directional information. In one embodiment of the invention, the spatial functions are the spherical harmonic functions. The spherical harmonics may include zero-order and first-order harmonics and higher order harmonics. In another embodiment, the spatial functions include discrete panning functions. 
     Further in accordance with the method of the invention, a decoding of the directionally encoded audio includes providing a set of filters. The filters are defined based on the selected spatial functions. 
     An audio recording apparatus includes first and second multiplier circuits having adjustable gains. A source of an audio signal is provided, the audio signal having a time-varying direction associated therewith. The gains are adjusted based on the direction for the audio. A delay element inserts a delay into the audio signal. The audio and delayed audio are processed by the multiplier circuits, thereby creating directionally encoded signals. In one embodiment, an audio recording system comprises a pair of soundfield microphones for recording an audio source. The soundfield microphones are spaced apart at the positions of the ears of a notional listener. 
     According to the invention, a method for decoding includes deriving a set of spectral functions from preselected spatial functions. The resulting spectral functions are the basis for digital filters which comprise the decoder. 
     According to the invention, a decoder is provided comprising digital filters. The filters are defined based on the spatial functions selected for the encoding of the audio signal. The filters are arranged to produce output signals suitable for feeding into loudspeakers. 
     The present invention provides an efficient method for 3-D audio encoding and playback of multiple sound sources based on the linear decomposition of HRTF using spatial panning functions and spectral functions, which
         guarantees accurate reproduction of ITD cues for all sources over the whole frequency range   uses predetermined panning functions.       

     The use of predetermined panning functions offers the following advantages over methods of the prior art which use principal components analysis or singular value decomposition to determine panning functions and spectral functions:
         efficient implementation in hardware or software   non-individual encoding/recording format   adaptation of the decoder to the listener   improved multi-channel loudspeaker playback       

     Two particularly advantageous choices for the panning functions are detailed, offering additional benefits:
         Spherical harmonics   allow to make recordings using available microphone technology (a pair of Soundfield microphones)   yield a recording format that is a superset of the B format standard   associated to a special decoding technique for multi-channel loudspeaker playback   Discrete panning functions   guarantees exact reproduction of chosen directions   increased efficiency of implementation (by minimizing the number of non-zero panning weights for each source)   associated to a special decoding technique for multi-channel loudspeaker playback       

    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         FIG. 1 : Discrete panning over 4 loudspeakers. Example of discrete panning functions. 
         FIG. 2 : B-format encoding and recording. Playback over 6 loudspeakers using Ambisonic decoding. 
         FIG. 3 : Binaural encoding and recording. Playback over 2 speakers using cross-talk cancellation. 
         FIG. 4 : (a) Post-filtering topology. (b) Pre-filtering topology. 
         FIG. 5 : (a) Post-filtering and (b) pre-filtering topologies, with control of interaural time difference for each sound source. 
         FIG. 6 : Binaural B Format encoding with decoding for playback over over headphones. 
         FIG. 7 : Original and reconstructed HRTF with Binaural B Format (first-order reconstruction). 
         FIG. 8 : Binaural B Format reconstruction filters (amplitude frequency response). 
         FIG. 9 : Binaural B Format decoder for playback over 4 speakers. 
         FIG. 10 : Binaural Discrete Panning using 6 encoding channels, with decoder for playback over 2 speakers with cross-talk cancellation. 
         FIG. 11 : Binaural Discrete Panning using 6 encoding channels, with decoder for playback over 4 speakers with cross-talk cancellation. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Modeling HRTF Using Predetermined Spatial Functions 
     Given a set of N spatial panning functions {g i (σ , φ), i=0, 1, . . . N−1} the procedure for modeling HRTF according to the present invention is as follows. This procedure is associated to the topologies described in  FIG. 5   a  and  FIG. 5   b  for directionally encoding one or several audio signals and decoding them for playback over headphones.
     1. Measuring HRTFs for a set of positions {(σ p , φ p ), p=1, 2, . . . P}. The sets of left-ear and right-ear HRTFs will be denoted, respectively, as:
 
{ L (σ p ,φ p   ,f )} and { R (σ p ,φ p   ,f )}, for  p= 1, 2, . . .  P , where f denotes frequency.
   2. Extracting the left and right delays t L (σ p , φ p ) and t R (σ p , φ p ) for every position. Denoting T(σ, φ, f)=exp(2πj f t(σ, φ)), the time-delay operator of duration t, expressed in the frequency domain, the left-ear and right-ear HRTFs are expressed by:
 
 L (σ p ,φ p   ,f )= T   L (σ p ,φ p   ,f )   L   (σ p ,φ p,f),  
 
 R (σ p ,φ p   ,f )= T   R (σ p ,φ p   ,f )   R   (σ p ,φ p   ,f ), for  p= 1, 2, . . .  P.  
   3. Equalization removing a common transfer function from all HRTFs measured on one ear. This transfer function can include the effect of the measuring apparatus, loudspeaker, and microphones used. It can also be the delay-free HRTF  L  (or  R ) measured for one particular direction (free-field equalization), or a transfer function representing an average of all the delay-free HRTFs  L  (or  R ) measured over all positions (diffuse-field equalization).   4. Symmetrization, whereby the HRTFs and the delays are corrected in order to verify the natural left-right symmetry relations:
 
   R   (σ,φ, f )=   L   (2π−σ,φ, f ) and  t   L (σ,φ)= t   R (2π−σ,φ).
   5. Derivation of the set of reconstruction filters {L i (f)} and {R i (f)} satisfying the approximate equations:
 
   L   (σ p ,φ p   ,f )≈Σ {i=0, . . . N−1}   g   i (σ p ,φ p ) L   i ( f ),
 
   R   (σ p ,φ p   ,f )≈Σ {i=0, . . . N−1}   g   i (σ p ,φ p ) R   i ( f ), for  p= 1, 2, . . .  P.  
   

     In practice, the measured HRTFs are obtained in the digital domain. Each HRTF is represented as a complex frequency response sampled at a given number of frequencies over a limited frequency range, or, equivalently, as a temporal impulse response sampled at a given sample rate. The HRTF set { L (σ p , φ p , f)} or { R (σ p , φ p , f)} is represented, in the above decomposition, as a complex function of frequency in which every sample is a function of the spatial variables σ and φ, and this function is represented as a weighted combination of the spatial functions g i (σ, φ). As a result, a sampled complex function of frequency is associated to each spatial function g i (σ, φ), which defines the sampled frequency response of the corresponding filter L 1 (f) or R i (f). It is noted that, due to the linearity of the Fourier transform, an equivalent decomposition would be obtained if the frequency variable f were replaced by the time variable in order to reconstruct the time-domain representation of the HRTF. 
     The equalization and the symmetrization of the HRTF sets  L (σ p , φ p , f) and  R (σ p , φ p , f), are not necessary to carrying out the invention. However, performing these operations eliminates some of the artifacts associated to the HRTF measurement method. Thus, it may be preferable to perform these operations for their practical advantages. 
     Step 2 is optional and is associated to the binaural synthesis topologies described in  FIGS. 5   a  and  5   b , where the delays t L (σ, φ) and t R (σ, φ) are introduced in the directional encoding module for each sound source. If step 2 is not applied, the binaural synthesis topologies of  FIGS. 4   a  and  4   b  can be used. If the delay extraction procedure is appropriately performed (as discussed below) the topologies of  FIGS. 5   a  and  5   b  will provide a higher fidelity with fewer encoding channels. It will be noted that adding or subtracting a common delay offset to t L (σ, φ) and t R (σ, φ) in the encoding module will have no effect over the perceived direction of sounds during playback, even if the delay offset varies with direction, as long as the interaural time delay difference (ITD), defined below, is preserved for each direction.
 
 ITD (σ,φ)= t   R (σ,φ)− t   L (σ,φ).
 
     It is noted that the above procedure differs from the methods of the prior art. Conventional analytical techniques, such as PCA and SVD, simultaneously produce the spectral functions and the spatial functions which minimize the least-squares error between the original HRTFs and the reconstructed HRTFs for a given number of channels N. In the elaboration of the present invention, it is recognized in particular, that these earlier methods suffer from the following drawbacks:
         The spatial panning functions cannot be chosen a priori.   The choice of error criterion to be minimized (mean squared error) enables the resolution of the approximation problem via tractable linear algebra. However, the technique does not guarantee that the model of the HRTF thus obtained is optimal in terms of perceived reproduction for a given number of encoding channels.       

     In comparison, the technique in accordance with the present invention permits a priori selection of the spatial functions, from which the spectral functions are derived. As will be apparent from the following description, several benefits of the present invention will result from the possibility of choosing the panning functions a priori and from using a variety of techniques to derive the associated reconstruction filters. 
     An immediate advantage of the invention is that the encoding format in which sounds are mixed in  FIG. 5   a  is devoid of listener specific features. As discussed below, it is possible, without causing major degradations in reproduction fidelity, to use a listener-independent model of the ITD in carrying out the invention. 
     Generally, it is possible to make a selection of spatial panning functions and tune the reconstruction filters to achieve practical advantages such as:
         enabling improved reproduction over multi-channel loudspeaker systems,   enabling the production of microphone recordings,   preserving a high fidelity of reproduction in chosen directions or regions of space even with a low number of channels.       

     Two particular choices of spatial panning functions will be detailed in this description: spherical harmonic functions and discrete panning functions. Practical methods for designing the set of reconstruction filters L i (f) and R i (f) will be described in more detail. From the discussion which follows, it will be clear to a person of ordinary skill in the relevant art that other spatial functions can be used and that alternative techniques for producing the corresponding reconstruction filters are available. 
     Delay Extraction Techniques 
     The extraction of the interaural time delay difference, ITD(σ p , φ p ), from the HRTF pair L(σ p , φ p , f) and R(σ p , φ p , f) is performed as follows. 
     Any transfer function H(f) can be uniquely decomposed into its all-pass component and its minimum-phase component as follows:
 
 H ( f )=exp( j φ( f )) H   min ( f )
 
where φ(f), called the excess-phase function of H(f), is defined by
 
φ( f )= Arg ( H ( f ))− Re (Hilbert(−Log| H ( f )|)).
 
     Applying this decomposition to the HRTFs L(σ p , φ p , f) and R(σ p , φ p , f), we obtain the corresponding excess-phase functions, φ R (σ p , φ p , f) and φ L (σ p , φ p , f), and the corresponding minimum-phase HRTFs, L min (σ p , φ p , f) and R min (σ p , φ p , f). The interaural time delay difference, ITD(σ p , φ p ), can be defined, for each direction (σ p , φ p ), by a linear approximation of the interaural excess-phase difference:
 
φ R (σ,φ, f )−φ L (σ,φ, f )≈2π fITD (σ,φ).
 
     In practice, this approximation may be replaced by various alternative methods of estimating the ITD, including time-domain methods such as methods using the cross-correlation function of the left and right HRTFs or methods using a threshold detection technique to estimate an arrival time at each ear. Another possibility is to use a formula for modeling the variation of ITD vs. direction. For instance,
         the spherical head model with diametrically opposite ears yields
 
 ITD (σ,φ)= r/c [ arcsin(cos(φ)sin(σ))+cos(φ)sin(σ)],
   the free-field model—where the ears are represented by two points separated by the distance 2r−yields
 
 ITD (σ,φ) 2 r/c  cos(φ)sin(σ),
 
where c denotes the speed of sound. In these two formulas, the value of the radius r can be chosen so that ITD(σ p , φ p ) is as large as possible without exceeding the value derived from the linear approximation of the interaural excess-phase difference. In a digital implementation, the value of ITD(σ p , φ p ), can be rounded to the closest integer number of samples, or the interaural excess-phase difference may be approximated by the combination of a delay unit and a digital all-pass filter.
       

     The delay-free HRTFs,  L (σ p , φ p , f) and  R (σ p , φ p , f), from which the reconstruction filters L i (f) and R i (f) will be derived, can be identical, respectively, to the minimum-phase HRTF L min (σ p , φ p , f) and R min (σ p , φ p , f). 
     Whatever the method used to extract or model the interaural time delay difference from the measured HRTF, it can be regarded as an approximation of the interaural excess-phase difference φ R (σ, φ, f)−φ L (σ, φ, f) by a model function φ(σ, φ, f):
 
φ R (σ,φ, f )−φ L (σ,φ, f )≈φ(σ,φ, f ).
 
     It may be advantageous, in order to improve the fidelity of the 3-D audio reproduction according to the present invention, to correct for the error made in this phase difference approximation, by incorporating the residual excess-phase difference into the delay-free HRTFs  L (σ p , φ p , f) and  R (σ p , φ p , f) as follows:
 
   L   ( f )= L   min ( f )exp( j φ L ( f )) and    R   ( f )= R   min ( f )exp( j φ R ( f )),
 
where φ L (f) and φ R (f) satisfy
 
φ R ( f )−φ L ( f )=φ R ( f )−φ L ( f )−φ(σ,φ, f ),
 
and either φ L (f)=0 or φ R (f)=0, as appropriate to ensure that the delay-free HRTFs  L (σ p , σ p , f) and  R (σ p , σ p , f) are causal transfer functions.
 
     Application of Spherical Harmonic Functions for Encoding and Recording 
     General Definition of Spherical Harmonics. 
     Of particular interest in the following description are the zero-order harmonic W and the first-order harmonics X, Y and Z defined earlier, as well as the second-order harmonics, U and V, and the third-order harmonics, S and T, defined below.
 
 U (σ,φ)=cos 2 (φ)cos(2σ)
 
 V (σ,φ)=cos 2 (φ)sin(2σ)
 
 S (σ,φ)=cos 3 (φ)cos(3σ)
 
 T (σ,φ)=cos 3 (φ)sin(3σ)
 
     Advantages of spherical harmonics include:
         mathematically tractable, closed form → interpolation between directions   mutually orthogonal   spatial interpretation (e.g. front-back difference)   facilitates recording       

       FIG. 6  illustrates this method in the case where the minimum-phase HRTFs are decomposed over spherical harmonics limited to zero and first order. The directional encoding of the input signal produces an 8-channel encoded signal herein referred to as a “Binaural B Format” encoded signal. The mixer provides for mixing of additional source signals, including synthesized sources. Conversely, 8 filters are used to decode this format into a binaural output signal. The method can be extended to include any or all of the above higher-order spherical harmonics. Using the higher orders provides for more accurate reconstruction of HRTFs, especially at high frequencies (above 3 kHz). 
     As discussed above, a Soundfield microphone produces B format encoded signals. As such, a Soundfield microphone can be characterized by a set of spherical harmonic functions. Thus from  FIG. 6 , it can be seen that encoding a sound in accordance with the invention to produce Binaural B Format encoded signals, simulates a free-field recording using two Soundfield microphones located at the notional position of the two ears. This simulation is exact if the directional encoder provides ITD according to the following free-field model:
 
 ITD (σ,φ)= t   R (σ,φ)− t   L (σ,φ)= d/c  cos(φ)sin(σ),
 
where d is the distance between the microphones. If the ITD model provided in the encoder takes into account the diffraction of sound around the head or a sphere, the encoded signal and the recorded signal will differ in the value of the ITD for sounds away from the median plane. This difference can be reduced, in practice, by adjusting the distance between the two microphones to be slightly larger than the distance between the two ears of the listener.
 
     The Binaural B Format recording technique is compatible with currently existing 8-channel digital recording technology. The recording can be decoded for reproduction over headphones through the bank of 8 filters L i (f) and R i (f) shown on  FIG. 6 , or decoded over two or more loudspeakers using methods to be described below. Before decoding, additional sources can be encoded in Binaural B Format and mixed into the recording. 
     The Binaural B Format offers the additional advantage that the set of four left or right channels can be used with conventional Ambisonic decoders for loudspeaker playback. Other advantages of using spherical harmonics as the spatial panning functions in carrying out the invention will be apparent in connection to multi-channel loudspeaker playback, offering an improved fidelity of 3-D audio reproduction compared to Ambisonic techniques. 
     Derivation of the Reconstruction Filters 
     For clarity, the derivation of the N reconstruction filters L i (f) will be illustrated in the case where the spatial panning functions g i (σ p , φ p ) are spherical harmonics. However, the methods described are general and apply regardless of the choice of spatial functions. 
     The problem is to find, for a given frequency (or time) f, a set of complex scalars L i (f) so that the linear combination of the spatial functions g i (σ p , φ p ) weighted by the L i (f) approximates the spatial variation of the HRTF  L (σ p , φ p , f) at that frequency (or time). This problem can be conveniently represented by the matrix equation
 
   L =GL,  
 
where
         the set of HRTF  L (σ p , φ p , f) defines the P×1 vector  L , P being the number of spatial directions   each spatial panning function g i (σ p , φ p ) defines the P×1 vector G i , and the matrix G is the P×N matrix whose columns are the vectors G i      the set of reconstruction filters L i (f) defines the N×1 vector of unknowns L.       

     The solution which minimizes the energy of the error is given by the pseudo inversion
 
 L =( G   T   G ) −1   G   T     L ,  
 
where (G T  G), known as the Gram matrix, is the N×N matrix formed by the dot products G(i, k)=G i   T  G k  of the spatial vectors. The Gram matrix is diagonal if the spatial vectors are mutually orthogonal.
 
     Simplest case: the sampled spatial functions are mutually orthogonal =&gt; filters are derived by orthogonal projection of the HRTF on the individual spatial functions (dot product computed at each frequency). Example: 2-D reproduction with regular azimuth sampling. If sampled functions are not mutually orthogonal, multiply by inverse of Gram matrix to ensure correct reconstruction. 
     Even when the panning functions g i (σ, φ) are mutually ortogonal, as is the case with spherical harmonics, the vectors G i  obtained by sampling these functions may not be orthogonal. This happens typically if the spatial sampling is not uniform (as is often the case with 3-D HRTF measurements). This problem can be remedied by redefining the spatial dot product so as to approximate the continuous integral of the product of two spatial functions
 
&lt; g   i   ,g   k &gt;=1/(4π)∫σ∫σ g   i (σ,φ) g   k (σ,φ)cos(φ) dσdφ 
 
by
 
&lt; g   i   ,g   k &gt;=Σ {p=1, . . . P}   g   i (σ p ,φ p ) g   k (σ p ,φ p ) dS ( p )= G   i   T   ΔG   k  
 
where Δ is a diagonal P×P matrix with Δ(p, p)=dS(p) and dS(p) is proportional to a notional solid angle covered by the HRTF measured for the direction (σ p , φ p ). This definition yields the generalized pseudo inversion equation
 
 L =( G   T   ΔG ) −1   G   T   Δ L ,  
 
where the diagonal matrix Δ can be used as a spatial weighting function in order to achieve a more accurate 3-D audio reproduction in certain regions of space compared to others, and the modified Gram matrix (G T  ΔG) ensures that the solution minimizes the mean squared error.
 
     Additional possibility: project on a subset of the chosen set of spatial functions using above methods. Then project the residual error over other spatial functions (cf aes16). Example: to optimize fidelity of reconstruction in horizontal plane, project on W, X, Y first, and then project error on Z. Note that process can be iterated in more than 2 steps. 
     By combining the above techniques, it is possible, for a given set of spatial panning functions, to achieve control over chosen perceptual aspects of the 3-D audio reproduction, such as the front/back or up/down discrimination or the accuracy in particular regions of space. 
       FIG. 7  illustrates the performance of the method for reconstructing the HRTF magnitude spectra in the horizontal plane (φ=0). For this reconstruction, only 3 channels per ear are necessary, since the Z channel is not used. The original data are diffuse-field equalized HRTFs derived from measurements on a dummy head. Due to the limitation to first-order harmonics, the reconstruction matches the original magnitude spectra reasonably well up to about 2 or 3 kHz, but the performance tends to degrade with increasing frequency. For large-scale applications, a gentle degradation at high frequencies can be acceptable, since inter-individual differences in HRTFs typically become prominent at frequencies above 5 kHz. The frequency responses of the reconstruction filters obtained in this case are shown on  FIG. 8 . 
     Adaptation of the Reconstruction Filters to the Listener 
     An advantage of a recording mad in accordance with the invention over a conventional two-channel dummy head recording is that, unlike prior art encoded signals, binaural B format encoded signals do not contain spectral HRTF features. These features are only introduced at the decoding stage by the reconstruction filters L i (f). Contrary to a conventional binaural recording, a Binaural B Format recording allows listener-specific adaptation at the reproduction stage, in order to reduce the occurrence of artifacts such as front-back reversals and in-head or elevated localization of frontal sound events. 
     Listener-specific adaptation can be achieved even more effectively in the context of a real-time digital mixing system. Moreover, the technique of the present invention readily lends itself to a real-time mixing approach and can be conveniently implemented as it only involves the correction of the head radius r for the synthesis of ITD cues and the adaptation of the four reconstruction filters L i (f). If diffuse-field equalization is applied to the headphones and to the measured HRTF, and therefore to the reconstruction filters L i (f), the adaptation only needs to address direction-dependent features related to the morphology of the listener, rather than variations in HRTF measurement apparatus and conditions. 
     Application of Discrete Panning Functions 
     Definition: functions which minimize the number of non-zero panning weights for any direction: 2 weights in 2D and 3 weights in 3D. For each panning function, there is a direction where this panning function reaches unity and is the only non-zero panning function. Example given in  FIG. 1  for 2D case. Many variations possible. 
     An advantage of discrete panning functions: fewer operations needed in encoding module (multiplying by panning weight and adding into the mix is only necessary for the encoding channels which have non-zero weights). 
     The projection techniques described above can be used to derive the reconstruction filters. Alternatively, it can be noted that each discrete panning function covers a particular region of space, and admits a “principal direction” (the direction for which the panning weight reaches 1). Therefore, a suitable reconstruction filter can be the HRTF corresponding to that principal direction. This will guarantee exact reconstruction of the HRTF for that particular direction. Alternatively, a combination of the principal direction and the nearest directions can be used to derive the reconstruction filter. When it is desired to design a 3D audio display system which offers maximum fidelity for certain directions of the sound, it is straightforward to design a set of panning functions which will admit these specific directions as principal directions. 
     Methods for Playback Over Loudspeakers 
     When used in the topologies of  FIGS. 5   a  and  5   b , the set of reconstruction filters obtained according to the present invention will provide a two-channel output signal suitable for high-fidelity 3D audio playback over headphones. As illustrated in  FIG. 3 , this two channel signal can be further processed through a cross-talk cancellation network in order to provide a two-channel signal suitable for playback over two loudspeakers placed in front of the listener. This technique can produce convincing lateral sound images over a frontal pair of loudspeakers, covering azimuths up to about ±120°. However, lateral sound images tend to collapse into the loudspeakers in response to rotations and translations of the listener&#39;s head. The technique is also less effective for sound events assigned to rear or elevated positions, even when the listener sits at the “sweet spot”. 
       FIG. 9  illustrates how, in the case of spherical harmonic panning functions, the reconstruction filters L i (f) can be utilized to provide improved reproduction over multi-channel loudspeaker playback systems. An advantage of the Binaural B Format is that it contains information for discriminating rear sounds from frontal sounds. This property can be exploited in order to overcome the limitations of 2-channel transaural reproduction, by decoding over a 4-channel loudspeaker setup. The 4-channel decoding network, shown in  FIG. 9 , makes use of the sum and difference of the W and X signals. 
     The binaural signal is decomposed as follows:
 
 L (σ,φ, f )= LF (σ,φ, f )+ LB (σ,φ, f )
 
where LF and LB are the “front” and “back” binaural signals, defined by:
 
 LF (σ,φ, f )=0.5{[ W (σ,φ)+ X (σ,φ)][ L   W ( f )+ L   X ( f )]+ Y (σ,φ)  L   Y ( f )+ Z (σ,φ) L   Z ( f )}
 
 LB (σ,φ, f )=0.5{[ W (σ,φ)− X (σ,φ)][ L   W ( f )− L   X ( f )]+ Y (σ,φ) L   Y ( f )+ Z (σ,φ) L   Z ( f )}
 
     It can be verified that LB=0 for (σ, φ)=(0, 0) and that LF=0 for (σ, φ)=(π, 0). The network of  FIG. 9  is designed to eliminate front-back confusions, by reproducing frontal sounds over the front loudspeakers and rear sounds over the rear loudspeakers, while elevated or lateral sounds are reproduced via both pairs of loudspeakers. This significantly improves the reproduction of lateral, rear or elevated sound images compared to a 2-channel loudspeaker setup (or to 4-channel loudspeaker reproduction using conventional pairwise amplitude panning or Ambisonic techniques). The listener is also allowed to move more freely than with 2-channel loudspeaker reproduction. By exploiting the Z component, a similar approach can be used to decode the binaural B format over a 3-D loudspeaker setup (comprising loudspeakers above or below the horizontal plane). 
       FIG. 11  illustrates how the present invention, applied with discrete panning functions, can be advantageously used to provide three-dimensional audio playback over two loudspeakers placed in front of the listener, with cross-talk cancellation. In this implementation of the invention, the discrete panning functions g i (σ, φ) and g 2 (σ, φ) are chosen so that their principal directions coincide, respectively, with the directions of the left and right loudspeakers from the listener&#39;s head (the principal direction of the discrete panning function g i (σ, φ) is defined as (σ i , φ i ) verifying g i (σ i , φ i )=1.0 and g j (σ i , φ i )=0 for j≠I). Furthermore, the reconstruction filters and the cross-talk cancellation networks are free-field equalized, for each ear, with respect to the direction of the closest loudspeaker. As a result of these conditions, it can be verified that, if an audio signal is panned to the direction of one of the two loudspeakers, it is fed with no modification to that loudspeaker and cancelled out from the output feeding the other loudspeaker. Therefore, the resulting loudspeaker playback system combines, in conjunction with the previously described advantages of the present invention, the advantage of conventional discrete panning systems and the advantages of binaural reproduction techniques using cross-talk cancellation. 
     The following notations are used in  FIG. 10  and  FIG. 11 :
           L   i|j  denotes the ratio of two delay-free HRTFs:
     L     i|j   = L   (σ i ,φ i   ,f )/   L   (σ j ,φ j,f);      L i|j  denotes the ratio of two delay-free HRTFs combined with the time difference between them:
 
 L   i|j =exp(2π jf[t (σ i ,φ i )− t (σ j ,φ j )])   L   (σ i ,φ i   ,f )/   L   (σ j ,φ j,f).  
       

       FIG. 11  illustrates how the decoder of  FIG. 10  can be modified to offer further improved three-dimensional audio reproduction over four loudspeakers arranged in a front pair and a rear pair. The method used is similar to the method used in the system of  FIG. 9 , in that a front cross-talk canceller and a rear cross-talk canceller are used, and they receive different combinations of the left and right encoded signals. These combinations are designed so that frontal sounds are reproduced over the front loudspeakers and rear sounds are reproduced over the rear loudspeakers, while elevated or lateral sounds are reproduced via both pairs of loudspeakers.  FIG. 11  shows an embodiment of the present invention using 6 encoding channel for each ear, where channels  1  and  2  are front left and right channels, channels  5  and  4  are rear left and right channels, and channels  3  and  6  are lateral and/or elevated channels. A particular advantageous property of this embodiment is that, if an audio signal is panned towards the direction of one of the four loudspeakers (corresponding to the principal direction of one of the channels  1 ,  2 ,  4 , or  5 ), it is fed with no modification to that loudspeaker and cancelled out from the output feeding the three other loudspeakers. It is noted that, generally, the systems of  FIG. 10  or  FIG. 11  can be extended to include larger numbers of encoding channels without departing from the principles characterizing the present invention, and that, among these encoding channels, one or more can have their principal direction outside of the horizontal plane so as to provide the reproduction of elevated sounds or of sounds located below the horizontal plane.