# Patent

## Title
Loudness modification of multichannel audio signals

## Abstract

Scaling, by a desired amount sm, the overall perceived loudness Lm of a multichannel audio signal, wherein perceived loudness is a nonlinear function of signal power P, by scaling the perceived loudness of each individual channel Lc by an amount substantially equal to the desired amount of scaling of the overall perceived loudness of all channels sm, subject to accuracy in calculations and the desired accuracy of the overall perceived loudness scaling sm. The perceived loudness of each individual channel may be scaled by changing the gain of each individual channel, wherein gain is a scaling of a channel's power. Optionally, in addition, the loudness scaling applied to each channel may be modified so as to reduce the difference between the actual overall loudness scaling and the desired amount of overall loudness scaling.

## Background
CROSS-REFERENCE TO RELATED APPLICATIONS; BENEFIT CLAIM
This application claims the benefit as a Continuation of Non-Provisional application Ser. No. 13/338,143 filed on Dec. 27, 2011, which is a continuation of application Ser. No. 13/215,058 filed on Aug. 22, 2011 (now U.S. Pat. No. 8,600,074 issued Dec. 3, 2011, which is a Continuation of application Ser. No. 12/225,988 filed on Mar. 26, 2009 (now U.S. Pat. No. 8,019,095 issued Sep. 13, 2011), which is a National Stage Application under 35 U.S.C. §371 of International Application No. PCT/US2007/006444, with a filing date of Mar. 14, 2007, which claims the benefit of U.S. Provisional Patent Application Ser. No. 60/857,617 filed on Nov. 7, 2006 and U.S. Provisional Patent Application Ser. No. 60/789,523 filed on Apr. 4, 2006, the entire contents of all of which are hereby incorporated by reference as if fully set forth herein, under 35 U.S.C. §120. The applicant(s) hereby rescind any disclaimer of claim scope in the parent application(s) or the prosecution history thereof and advise the USPTO that the claims in this application may be broader than any claim in the parent application(s).


TECHNICAL FIELD
The invention relates to audio signal processing. In particular, the invention relates to adjusting the overall perceived loudness of a multichannel audio signal while retaining approximately the relative perceived loudness between all the channels in order to preserve the perceived spatial balance. The invention includes not only methods but also corresponding computer programs and apparatus.
REFERENCES AND INCORPORATION BY REFERENCE
Certain techniques for measuring and adjusting perceived (psychoacoustic loudness) useful in better understanding aspects the present invention are described in published International patent application WO 2004/111994 A2, of Alan Jeffrey Seefeldt et al, published Dec. 23, 2004, entitled “Method, Apparatus and Computer Program for Calculating and Adjusting the Perceived Loudness of an Audio Signal” and in “A New Objective Measure of Perceived Loudness” by Alan Seefeldt et al, Audio Engineering Society Convention Paper 6236, San Francisco, Oct. 28, 2004. Said WO 2004/111994 A2 application and said paper are hereby incorporated by reference in their entirety.
Certain other techniques for measuring and adjusting perceived (psychoacoustic loudness) useful in better understanding aspects the present invention are described in published International patent application WO 2006/047600 A1 of Alan Jeffrey Seefeldt, published May 4, 2006, entitled “Calculating and Adjusting the Perceived Loudness and/or the Perceived Spectral Balance of an Audio Signal.” Said WO 2006/047600 A1 application is hereby incorporated by reference in its entirety.
BACKGROUND ART
Many methods exist for objectively measuring the perceived loudness of audio signals. Examples of methods include A, B and C weighted power measures as well as psychoacoustic models of loudness such as “Acoustics—Method for calculating loudness level,” ISO 532 (1975) and said PCT/US2005/038579 application. Weighted power measures operate by taking the input audio signal, applying a known filter that emphasizes more perceptibly sensitive frequencies while deemphasizing less perceptibly sensitive frequencies, and then averaging the power of the filtered signal over a predetermined length of time. Psychoacoustic methods are typically more complex and aim to better model the workings of the human ear. They divide the signal into frequency bands that mimic the frequency response and sensitivity of the ear, and then manipulate and integrate these bands while taking into account psychoacoustic phenomenon such as frequency and temporal masking, as well as the non-linear perception of loudness with varying signal intensity. The aim of all methods is to derive a numerical measurement that closely matches the subjective impression of the audio signal.
Accurate modeling of the non-linearity of the human auditory system forms the basis of perceptual models of loudness. In the 1930's, Fletcher and Munson found that the relative change in sensitivity decreased as the level of sound increased. In the 1950's, Zwicker and Stevens built on the work of Fletcher and Munson and developed more accurate and realistic models. FIG. 1, published by Zwicker, shows the growth of loudness of both a 1 kHz tone and uniform exciting noise (UEN, noise with equal power in all critical bands). For a signal level below what is often termed the “hearing threshold,” no loudness is perceived. Above this threshold, there is a quick rise in perceived loudness up to an asymptote where loudness grows linearly with signal level. Where FIG. 1 shows the non-linear behavior for a 1 kHz tone, the equal loudness contours of ISO 226 in FIG. 2 show the same behavior but as a function of frequency for sinusoidal tones. The contour lines, at increments of 10 phon, show the sound pressure levels across frequency that the human ear perceives as equally loud. The lowest line represents the “hearing threshold” as a function of frequency. At lower levels the lines of equal loudness compress closer together such that relatively smaller changes in sound pressure level cause more significant changes in perceived loudness than at higher levels.
The non-linear and frequency varying behavior of the human auditory system has a direct impact on the perceived timbre and imaging of audio signals. A complex, wideband audio signal, for example music, presented at a particular sound pressure level is perceived as having a particular spectral balance or timbre. If the same audio signal is presented at a different sound pressure level and, as shown in FIG. 2, the growth of perceived loudness is different for different frequencies, the perceived spectral balance or timbre of the audio signal will be different. A complex, wideband multichannel audio signal, presented over multiple loudspeakers, is also perceived as having a particular spatial balance. Spatial balance refers to the impression of the location of sound elements in the mix as well as the overall diffuseness of the mix due to the relative level of audio signals between two or more loudspeakers. If the same multichannel audio signal is presented at a different overall sound pressure level, the non-linear growth in perceived loudness and differing growth of loudness across frequency leads to a change in the perceived spatial balance of the multichannel audio signal. This is especially apparent when there is a significant difference in level between channels. Quieter channels will be affected differently to louder channels which, for example, can lead to quiet channels dropping below the hearing threshold and audibly disappearing when the overall level is reduced.
In many situations there is a desire to adjust or scale the perceived loudness of an audio signal. The most obvious examples are the traditional volume or level controls that appear on many devices including consumer music players, home theater receiver/amplifiers and professional mixing consoles. This simple volume or level control gain adjusts the audio signal without any consideration of the human auditory system and resulting change in perceived timbre and spatial balance.
More recently Seefeldt et. al (said WO 2004/111994 A2 application) and Seefeldt (said PCT/US2005/038579 application) have disclosed inventions, aspects of which enable accurate scaling of the perceived loudness of a monophonic audio signal and, depending on whether implementations thereof are wideband or multiband, maintain the perceived timbre. According to aspects of such inventions, a desired loudness scaling or target loudness may be achieved by, in essence, inverting the loudness measurement model and calculating either a wideband gain or multiband gains that can be applied to the audio signal.
While such approaches solve the problem of adjusting the loudness of a monophonic audio signal, the question still remains of how to adjust the loudness of a multichannel audio signal.
Multichannel loudness is typically calculated as a function of the sum of the power in each channel. For weighted power methods such as the A, B and C weighted measures mentioned above, the multichannel loudness is a simple sum of the weighted power in each channel. Commonly for psychoacoustic models of loudness, a critical band power spectrum or excitation spectrum is first calculated for each channel and the excitation spectrums are then summed across all the channels to create a single excitation spectrum. Each excitation band is passed through a non-linearity, such as FIG. 1, to create a measure of loudness per band, known as specific loudness, and the specific loudness is summed across frequency to calculate a single, wideband loudness value. For both weighted power and psychoacoustics methods, the function of the sum of the power in each channel may include additional per channel weightings to take into account head related transfer function (HRTF) effects.
Because the loudness of a multichannel signal can be calculated relatively simply, it is possible to calculate a single gain that, when applied to all channels, causes an overall desired change in loudness. However, this single gain may have undesirable effects on other attributes of the multichannel presentation. If differences exist in the relative signal levels between channels in the multichannel presentation and if all channels are scaled by the same gain, quieter channels will have a larger perceived change in their loudness than louder channels. This may cause a change in the perceived spatial balance that is worst when some channels fall below the threshold of hearing. For example, in many 5.1 audio mixes for film, the front channels contain signals of a significantly higher level than the surround channels. The center channel in particular is generally used to reproduce dialogue. The lower level surround channels, however, may contain signals that create a sense of diffuseness in the mix. For example, they may contain the reverberant portion of the dialogue in order to simulate the effect of someone speaking in a large room. As the loudness of such a signal is decreased by applying the same gain to all channels, the surround channels decrease in loudness more rapidly than the front channels, eventually falling below the threshold of hearing. The result is a significant collapse in the intended diffuse spatial balance.
According to aspects of the present invention, a desired scaling in the overall perceived loudness of a multichannel presentation may be achieved to a desired accuracy, while retaining, to a desired accuracy, the relative perceived loudness among channels in order to preserve a perceived spatial balance or timbre.



DESCRIPTION OF THE DRAWINGS
FIG. 1 shows the non-linear growth of loudness for both a 1 kHz tone and uniform exciting noise (UEN).
FIG. 2 shows the equal loudness contours of ISO 226. The horizontal scale is frequency in Hertz (logarithmic base 10 scale) and the vertical scale is sound pressure level in decibels.
FIG. 3 shows a set of critical band filter responses useful for computing an excitation signal for a psychoacoustic loudness model.
FIGS. 4a-f depict the specific loudness spectra and gains resulting from the modification of the specific loudness of a multichannel audio signal.



DISCLOSURE OF THE INVENTION
The invention is directed to a method for scaling, by a desired amount sm, the overall perceived loudness Lm of a multichannel audio signal, wherein perceived loudness is a nonlinear function of signal power P, by scaling the perceived loudness of each individual channel Lc by an amount substantially equal to the desired amount of scaling of the overall perceived loudness of all channels sm, subject to accuracy in calculations and the desired accuracy of the overall perceived loudness scaling sm. The perceived loudness of each individual channel may be scaled by changing the gain of each individual channel, wherein gain is a scaling of a channel's power.
Optionally, in addition, the loudness scaling applied to each channel is modified so as to reduce the difference between the actual overall loudness scaling and the desired amount of overall loudness scaling.
The loudness scaling applied to each channel may be modified by applying a common multiplier to the gain of each channel or by adding a common scaling offset to the scaling of each channel.
The perceived loudness of each channel and the overall perceived loudness may both be measured in each of a plurality of frequency bands and the amplitude of each channel adjusted in such frequency bands. The frequency bands may be critical bands. Alternatively, the perceived loudness of each channel and the overall perceived loudness may both be measured in a single wideband frequency band.
In another aspect, the invention may be practiced by apparatus adapted to perform any of the above-mentioned methods.
In yet another aspect, the invention may be practiced by a computer program, stored on a computer-readable medium for causing a computer to perform any of the above-mentioned methods.
GENERAL DESCRIPTION OF INVENTION
In general terms, the measure of loudness L may be described as a function F of signal power P. Signal power P is a power measure of the audio signal. This could be the A, B or C weighted power or a multiband excitation spectrum. See, for example, ANSI S1.42-2001 (R2006), American National Standard Design Response of Weighting Networks for Acoustical Measurements. The function F is a non-linearity designed to approximate variations in the growth of loudness. This function could be as simple as the single UEN function of FIG. 1 applied to a single, wideband power measure or as complex as a psychoacoustic model of loudness where the excitation spectrum is converted, through different per-band nonlinearities, to a specific loudness spectrum and then to a single loudness value (as in said PCT/US2005/038579 application, for example). It should be noted that while traditional weighted power loudness measures such as A weighted power attempt to take into account the frequency varying sensitivity of the human auditory system, they do not take into account the variation in level sensitivity. It may therefore be useful to pass a traditional weighted power measure through a non-linearity such as the one described above.

L=F{P}  (1)

Assuming that the loudness function is invertible, a gain scaling g of the signal power P may be calculated such that the gain change results in a particular, desired scaling s of the perceived loudness.




  
    
      
        
          s
          ·
          L
        
        =
        
          F
          ⁢
          
            {
            
              g
              ·
              P
            
            }
          
        
      
    
    
      
        (
        
          2
          ⁢
          a
        
        )
      
    
  
  
    
      
        g
        =
        
          
            
              F
              
                -
                1
              
            
            ⁢
            
              {
              
                s
                ·
                L
              
              }
            
          
          P
        
      
    
    
      
        (
        
          2
          ⁢
          b
        
        )
      
    
  




Thus, gain g is a scaling of the power P, whereas s is a scaling of the loudness L.

If the function F were linear, then Eqn. 2a would simplify to sL=g F{P}=gL that yields the trivial solution g=s, independent of the signal power P. However, with a nonlinear function F, the gain g is, in general, a function of the signal power P as shown in Eqn. 2b. In other words, different signal powers P require different gains g for the same loudness scaling s.
The overall (all channel) measure of loudness Lm of a multichannel audio signal may, in practice, be approximated as a function of the sum of the per channel power Pc of each of the channels in the multichannel audio signal. The total number of channels is C.




  
    
      
        
          L
          m
        
        =
        
          F
          ⁢
          
            {
            
              
                ∑
                
                  c
                  =
                  1
                
                C
              
              ⁢
              
                P
                c
              
            
            }
          
        
      
    
    
      
        (
        3
        )
      
    
  




Note that the sum of the per-channel power may be weighted to take into account head related transfer function (HRTF) effects. That is, signals from different spatial directions may have slightly different, relative perceived loudness. If one knows or assumes where the listener is in relation to the loudspeakers reproducing the multiple channels, then one may build a model of the signals arriving at a listener's ears as a function of the individual channel signals (generally, filtered and summed versions of the channel signals). The loudness may then be computed from such ear signals. In practice, however, performing a power sum of the channel signals works well for most listening environments.
Now again assuming that the loudness function is invertible, a single gain gm applied to all channels may be calculated such that the result is a desired scaling sm of the overall perceived loudness.




  
    
      
        
          
            s
            m
          
          ·
          
            L
            m
          
        
        =
        
          F
          ⁢
          
            {
            
              
                g
                m
              
              ⁢
              
                
                  ∑
                  
                    c
                    =
                    1
                  
                  C
                
                ⁢
                
                  P
                  c
                
              
            
            }
          
        
      
    
    
      
        (
        
          4
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          g
          m
        
        =
        
          
            
              F
              
                -
                1
              
            
            ⁢
            
              {
              
                
                  s
                  m
                
                ·
                
                  L
                  m
                
              
              }
            
          
          
            
              ∑
              
                c
                =
                1
              
              C
            
            ⁢
            
              P
              c
            
          
        
      
    
    
      
        (
        
          4
          ⁢
          b
        
        )
      
    
  




However, applying the same gain scaling gm to all the channels may undesirably affect the spatial balance of the modified audio. In particular, the computation of the gain gm will be most influenced by the channels with the greatest amount of power. If other channels have significantly less power, then the gain gm may cause a significantly different perceived change in these lower level channels in comparison to the higher level channels due to the non-linearity of human loudness perception. If the scaling sm corresponds to an attenuation in loudness, too much attenuation may be applied to these lower level channels. As a result, the relative contribution of such low level channels to the spatial balance of the mix will be diminished, and at worst, the channels will become completely inaudible.
The present invention addresses the problem of maintaining the spatial balance of a multichannel audio signal while imparting a desired change to its overall loudness. Accurately measuring and characterizing the spatial balance of a multichannel audio signal is highly complex. Portions of the spectra of the various channels may fuse perceptually into virtual sources located between the speakers through which the channels are played, while other portions of the channels may combine to form the perception of a diffuse sound field surrounding the listener. Measuring the perceived loudness of these various components in relation to each other is not a well understood problem as it involves the complex phenomenon of certain audio signal components partially masking other components. The degree of masking is a function of the level of each source as well as the spatial location and diffuseness of each source. Even if one were able to accurately measure all these aspects of the spatial balance, attempting to preserve their relative measures as the overall loudness is scaled would likely involve a complex non-linear optimization process.
Consider, however, a simple example of a two-channel signal in which each channel contains a signal that does not overlap spectrally with the signal in the other channel. Each channel will then be perceived as a distinct source with neither source masking the other. In this simple case, it becomes clear that maintaining the relative loudness of the two components may be achieved by scaling the loudness of each individual channel (rather than the gain of each channel) by the same amount. The inventors have found that applying this solution generally to a multichannel signal helps preserve the spatial balance without the introduction of any objectionable side-effects.
In a basic implementation of aspects of the invention, the perceived loudness of each individual channel Lc (taken in isolation) may be scaled by an amount of scaling sc substantially equal to a desired amount of scaling, sm, of the overall perceived loudness of all channels, subject to accuracy in calculations and the desired accuracy of the overall perceived loudness scaling. This solution mitigates the problem, mentioned above, of low level channels falling below the threshold of hearing due to the influence of higher level channels. Such a scaling in the perceived loudness of each individual channel Lc may be accomplished by controlling the individual gain gc of each channel (where such gain gc is a scaling of the channel's power Pc). Note, as discussed further below, that such individual channel gains gc generally are not the same as the gain gm mentioned above in connection Eqns. 4a and 4b. This may be may be better understood, for example, by reference to Eqns. 5a and 5b:




  
    
      
        
          
            
              s
              m
            
            ·
            
              L
              c
            
          
          =
          
            F
            ⁢
            
              {
              
                
                  g
                  c
                
                ·
                
                  P
                  c
                
              
              }
            
            ⁢
            
              
            
            ⁢
            for
            ⁢
            
              
            
            ⁢
            each
            ⁢
            
              
            
            ⁢
            of
            ⁢
            
              
            
            ⁢
            C
            ⁢
            
              
                
              
              ⁢
              
                
              
            
            ⁢
            channels
          
        
        ⁢
        
          

        
        ⁢
        or
      
    
    
      
        (
        
          5
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          g
          c
        
        =
        
          
            
              
                F
                
                  -
                  1
                
              
              ⁢
              
                {
                
                  
                    s
                    m
                  
                  ·
                  
                    L
                    c
                  
                
                }
              
            
            
              P
              c
            
          
          ⁢
          
            
          
          ⁢
          for
          ⁢
          
            
          
          ⁢
          each
          ⁢
          
            
          
          ⁢
          of
          ⁢
          
            
          
          ⁢
          C
          ⁢
          
            
          
          ⁢
          channels
        
      
    
    
      
        (
        
          5
          ⁢
          b
        
        )
      
    
  




where sc=sm.

Although such a basic implementation of the invention substantially maintains the spatial balance and is usable in many applications, such implementations may not assure that the desired overall scaling sm of the multichannel perceived loudness Lm is achieved due to the non-linearity of the function F. Because F is non-linear, the gain gm given by Eqn. 4b is, in general, not equal to the gains gc given by Eqn. 5b. Therefore, the loudness of all channels after the application of gm to all channels is not equal, in general, to the loudness of all channels after applying the gains gc to each respective channel:




  
    
      
        
          F
          ⁢
          
            {
            
              
                ∑
                
                  c
                  =
                  1
                
                C
              
              ⁢
              
                
                  g
                  m
                
                ⁢
                
                  P
                  c
                
              
            
            }
          
        
        ≠
        
          F
          ⁢
          
            {
            
              
                ∑
                
                  c
                  =
                  1
                
                C
              
              ⁢
              
                
                  g
                  c
                
                ⁢
                
                  P
                  c
                
              
            
            }
          
        
      
    
    
      
        (
        
          6
          ⁢
          a
        
        )
      
    
  




Substituting the left hand side of Eqn. 6a with Eqn. 4a and gc with Eqn. 5b yields the equivalent expression:





  
    
      
        
          
            s
            m
          
          ·
          
            L
            m
          
        
        ≠
        
          F
          ⁢
          
            {
            
              
                ∑
                
                  c
                  =
                  1
                
                C
              
              ⁢
              
                
                  F
                  
                    -
                    1
                  
                
                ⁢
                
                  {
                  
                    
                      s
                      m
                    
                    ·
                    
                      L
                      c
                    
                  
                  }
                
              
            
            }
          
        
      
    
    
      
        (
        
          6
          ⁢
          b
        
        )
      
    
  




Thus, there may be a difference or error between (1) the perceived loudness of all channels resulting from scaling the perceived loudness of each of the individual channels Lc by the desired overall perceived loudness scaling factor sm (expressed, for example, by the right hand portion of Eqn. 6b) and (2) the perceived loudness of all channels resulting from scaling directly by the overall loudness scaling factor sm (expressed, for example, by the left hand portion of Eqn. 6b). One may express this error as a scaling delta Δsm which when summed with the desired overall loudness scaling sm turns Eqn. 6b into an equality:




  
    
      
        
          
            (
            
              
                s
                m
              
              +
              
                Δ
                ⁢
                
                  
                
                ⁢
                
                  s
                  m
                
              
            
            )
          
          ⁢
          
            L
            m
          
        
        =
        
          F
          ⁢
          
            {
            
              
                ∑
                
                  c
                  =
                  1
                
                C
              
              ⁢
              
                
                  F
                  
                    -
                    1
                  
                
                ⁢
                
                  {
                  
                    
                      s
                      m
                    
                    ⁢
                    
                      L
                      c
                    
                  
                  }
                
              
            
            }
          
        
      
    
    
      
        (
        
          6
          ⁢
          c
        
        )
      
    
  




or, rearranging,





  
    
      
        
          Δ
          ⁢
          
            
          
          ⁢
          
            s
            m
          
        
        =
        
          
            
              F
              ⁢
              
                {
                
                  
                    ∑
                    
                      c
                      =
                      1
                    
                    C
                  
                  ⁢
                  
                    
                      F
                      
                        -
                        1
                      
                    
                    ⁢
                    
                      {
                      
                        
                          s
                          m
                        
                        ⁢
                        
                          L
                          c
                        
                      
                      }
                    
                  
                
                }
              
            
            
              L
              m
            
          
          -
          
            s
            m
          
        
      
    
    
      
        (
        
          6
          ⁢
          d
        
        )
      
    
  




For any function F that realistically models the non-linear level behavior of human perception, such errors are generally small because the growth of loudness is close to linear over a large range. However, to minimize such errors, it may be desirable to add an optional correction to the basic implementation of the invention. Without loss of generality, one may represent such a correction as scaling deltas Δsc introduced to the loudness scaling of each individual channel so that that the overall loudness scaling error Δsm in Eqn. 6d is reduced. Generally, the scaling deltas Δsc are different from channel to channel. Incorporation of these channel scaling deltas Δsc into Eqn. 6d yields the modified expression:




  
    
      
        
          Δ
          ⁢
          
            
          
          ⁢
          
            s
            m
          
        
        =
        
          
            
              F
              ⁢
              
                {
                
                  
                    ∑
                    
                      c
                      =
                      1
                    
                    C
                  
                  ⁢
                  
                    
                      F
                      
                        -
                        1
                      
                    
                    ⁢
                    
                      {
                      
                        
                          (
                          
                            
                              s
                              m
                            
                            +
                            
                              Δ
                              ⁢
                              
                                
                              
                              ⁢
                              
                                s
                                c
                              
                            
                          
                          )
                        
                        ⁢
                        
                          L
                          c
                        
                      
                      }
                    
                  
                
                }
              
            
            
              L
              m
            
          
          -
          
            s
            m
          
        
      
    
    
      
        (
        
          6
          ⁢
          e
        
        )
      
    
  




The individual channel gains with the application of such a correction are then given by:





  
    
      
        
          g
          c
          Δ
        
        =
        
          
            
              
                F
                
                  -
                  1
                
              
              ⁢
              
                {
                
                  
                    (
                    
                      
                        s
                        m
                      
                      +
                      
                        Δ
                        ⁢
                        
                          
                        
                        ⁢
                        
                          s
                          c
                        
                      
                    
                    )
                  
                  ⁢
                  
                    L
                    c
                  
                
                }
              
            
            
              P
              c
            
          
          ⁢
          
            
          
          ⁢
          for
          ⁢
          
            
          
          ⁢
          each
          ⁢
          
            
          
          ⁢
          of
          ⁢
          
            
          
          ⁢
          C
          ⁢
          
            
          
          ⁢
          channels
        
      
    
    
      
        (
        
          6
          ⁢
          f
        
        )
      
    
  




One may employ any suitable technique to arrive at channel scaling deltas Δsc, within some tolerable range, so that the absolute value of the overall loudness scaling error Δsm in Eqn. 6e is made smaller than that in Eqn. 6d. Thus, the absolute value of Δsm is made smaller. In the two implementation examples given below, it is, ideally, reduced to zero. However, the degree of the reduction in the absolute value of Δsm may be traded off against the size of each channel scaling delta Δsc so as to minimize audible channel loudness variation artifacts, in which case the ideal value of Δsm is not zero. The two examples of correction implementations are next described below.
An example of one way to implement such a correction is to compute first the individual channel gains gc according to a basic implementation of the invention as in Eqn. 5b and to compute next a single correction gain G for all channels that is multiplied by each channel gain gc to yield corrected channel gains, gcΔ=Ggc. The gain G is computed so that the overall loudness after the application of the gains gcΔ to each channel is equal to the original overall loudness scaled by the desired amount:




  
    
      
        
          
            s
            m
          
          ⁢
          
            L
            m
          
        
        =
        
          
            F
            ⁢
            
              {
              
                
                  ∑
                  
                    c
                    =
                    1
                  
                  C
                
                ⁢
                
                  
                    g
                    c
                    Δ
                  
                  ⁢
                  
                    P
                    c
                  
                
              
              }
            
          
          =
          
            F
            ⁢
            
              {
              
                G
                ⁢
                
                  
                    ∑
                    
                      c
                      =
                      1
                    
                    C
                  
                  ⁢
                  
                    
                      g
                      c
                    
                    ⁢
                    
                      P
                      c
                    
                  
                
              
              }
            
          
        
      
    
    
      
        (
        
          7
          ⁢
          a
        
        )
      
    
  




Solving for G Yields:





  
    
      
        G
        =
        
          
            
              F
              
                -
                1
              
            
            ⁢
            
              {
              
                
                  s
                  m
                
                ⁢
                
                  L
                  m
                
              
              }
            
          
          
            
              ∑
              
                c
                =
                1
              
              C
            
            ⁢
            
              
                g
                c
              
              ⁢
              
                P
                c
              
            
          
        
      
    
    
      
        (
        
          7
          ⁢
          b
        
        )
      
    
  




This correction reduces the absolute value of the overall loudness scaling error Δsm. Ideally, as is evident from inspection of Eqn. 7a (there is no Δsm factor—the scaling error is set to zero), it is reduced to zero. In practical arrangements, the scaling error may not be zero as a result of calculation accuracy, signal processing time lags, etc. Also, as mentioned above, the size of each channel scaling delta Δsc may be taken into account in limiting the degree of reduction of the Δsm error factor.
The corresponding channel scaling deltas Δsc are not specified directly but rather implicitly through the calculation of G. Given G, one may rearrange Eqn. 6f to solve for each channel's scaling delta Δsc as the ratio of the loudness of the particular channel after the application of the corrected channel gain gcΔ to the loudness of the original channel minus the desired overall loudness scaling:




  
    
      
        
          Δ
          ⁢
          
            
          
          ⁢
          
            s
            c
          
        
        =
        
          
            
              F
              ⁢
              
                {
                
                  
                    Gg
                    c
                  
                  ⁢
                  
                    P
                    c
                  
                
                }
              
            
            
              L
              m
            
          
          -
          
            s
            m
          
        
      
    
    
      
        (
        
          7
          ⁢
          c
        
        )
      
    
  




Note that it is not necessary to solve for Δsc (the desired correction to the overall (multichannel) loudness is effected by adjusting each channel's gain by applying the common G factor). Eqn. 7c is shown for the purpose of exposition in explaining the first correction example.
Because in practice the overall loudness scaling achieved by way of the individual channel gains is close to the desired overall loudness scaling sm, the resulting correction gain G typically is close to unity and the corresponding channel scaling deltas are close to zero. As a result, the correction is not likely to cause any objectionable spatial changes.
An example of another way to apply a correction is to find a channel scaling delta Δs common to all channels, such that Δsc=Δs for all channels, which results in reducing the absolute value of the overall loudness scaling error Δsm. Ideally, as is evident from inspection of Eqn. 8 (there is no Δsm factor—the scaling error is set to zero), it is reduced to zero. In practical arrangements, the scaling error may not be zero as a result of calculation accuracy, signal processing time lags, etc. Plugging these constraints into Eqn. 6e yields the condition:




  
    
      
        
          
            s
            m
          
          ⁢
          
            L
            m
          
        
        =
        
          F
          ⁢
          
            {
            
              
                ∑
                
                  c
                  =
                  1
                
                C
              
              ⁢
              
                
                  F
                  
                    -
                    1
                  
                
                ⁢
                
                  {
                  
                    
                      (
                      
                        
                          s
                          m
                        
                        +
                        
                          Δ
                          ⁢
                          
                            
                          
                          ⁢
                          s
                        
                      
                      )
                    
                    ⁢
                    
                      L
                      c
                    
                  
                  }
                
              
            
            }
          
        
      
    
    
      
        (
        8
        )
      
    
  




One may solve Eqn. 8 for Δs and then compute the corresponding corrected channel gains gcΔ using Eqn. 6f in which Δsc=Δs for all channels. In practice, solving Eqn. 8 for Δs requires an iterative numerical technique and is therefore less desirable than the first correction implementation described.
Aspects of the two above-described correction examples may be summarized in the following table:










Summary of Correction Examples











Loudness Scaling (per


Version
Gain (per channel)
channel)





Version 1
Total gain of Ggc applied to each
Different scaling sm + Δsc



channel. G is the same for each
for each channel



channel, but gc is different for 




each channel.




Solve for each channel's gc using
The loudness scaling delta



Eqn. 5b and for common G 
Δsc is implicitly 



using Eqn. 7b
determined when solving 




for G


Version 2
A different gain gcΔ is applied to 
Same scaling sm + Δs for



each channel.
each channel



Solve for each channel's gcΔ using
Solve for the loudness



Eqn. 8 and Eqn. 6f in which
scaling delta Δs using Eqn.



Δsc = Δs for all channels
8









Other techniques may exist for applying approximately the same loudness scaling to each individual channel of a multichannel signal while at the same time applying approximately a desired change to the overall loudness, and this invention is meant to cover all such techniques.
BEST MODE FOR CARRYING OUT THE INVENTION
In said WO 2004/111994 A2 application and said PCT/US2005/038579 application, Seefeldt et al and Seefeldt disclose, among other things, an objective measure of perceived loudness based on a psychoacoustic model. From a monophonic audio signal, x[n], the method first computes an excitation signal E[b,t] approximating the distribution of energy along the basilar membrane of the inner ear at critical band b during time block t. This excitation may be computed from the Short-time Discrete Fourier Transform (STDFT) of the audio signal as follows:




  
    
      
        
          E
          ⁡
          
            [
            
              b
              ,
              t
            
            ]
          
        
        =
        
          
            
              λ
              b
            
            ⁢
            
              E
              ⁡
              
                [
                
                  b
                  ,
                  
                    t
                    -
                    1
                  
                
                ]
              
            
          
          +
          
            
              (
              
                1
                -
                
                  λ
                  b
                
              
              )
            
            ⁢
            
              
                ∑
                k
              
              ⁢
              
                
                  
                    
                    
                      T
                      ⁡
                      
                        [
                        k
                        ]
                      
                    
                    
                  
                  2
                
                ⁢
                
                  
                    
                    
                      
                        C
                        b
                      
                      ⁡
                      
                        [
                        k
                        ]
                      
                    
                    
                  
                  2
                
                ⁢
                
                  
                    
                    
                      X
                      ⁡
                      
                        [
                        
                          k
                          ,
                          t
                        
                        ]
                      
                    
                    
                  
                  2
                
              
            
          
        
      
    
    
      
        (
        9
        )
      
    
  




where X[k,t] represents the STDFT of x[n] at time block t and bin k. T[k] represents the frequency response of a filter simulating the transmission of audio through the outer and middle ear, and Cb[k] represents the frequency response of the basilar membrane at a location corresponding to critical band b. FIG. 3 depicts a suitable set of critical band filter responses in which forty bands are spaced uniformly along the Equivalent Rectangular Bandwidth (ERB) scale, as defined by Moore and Glasberg (B. C. J. Moore, B. Glasberg, T. Baer, “A Model for the Prediction of Thresholds, Loudness, and Partial Loudness,” Journal of the Audio Engineering Society, Vol. 45, No. 4, April 1997, pp. 224-240). Each filter shape is described by a rounded exponential function and the bands are distributed using a spacing of 1 ERB. Lastly, the smoothing time constant λb in (9) may be advantageously chosen proportionate to the integration time of human loudness perception within band b.

Using equal loudness contours, such as those depicted in FIG. 2, the excitation at each band is transformed into an excitation level that would generate the same loudness at 1 kHz. Specific loudness, a measure of perceptual loudness distributed across frequency and time, is then computed from the transformed excitation, E1kHz[b,t], through a compressive non-linearity. One such suitable function to compute the specific loudness N[b,t] is given by:




  
    
      
        
          N
          ⁡
          
            [
            
              b
              ,
              t
            
            ]
          
        
        =
        
          β
          ⁡
          
            (
            
              
                
                  (
                  
                    
                      
                        E
                        
                          1
                          ⁢
                          kHz
                        
                      
                      ⁡
                      
                        [
                        
                          b
                          ,
                          t
                        
                        ]
                      
                    
                    
                      TQ
                      
                        1
                        ⁢
                        kHz
                      
                    
                  
                  )
                
                α
              
              -
              1
            
            )
          
        
      
    
    
      
        (
        10
        )
      
    
  




where TQ1kHz is the threshold in quiet at 1 kHz and the constants β and α are chosen to match growth of loudness data as shown in FIG. 1. Finally, the total loudness, L[t], represented in units of sone, is computed by summing the specific loudness across bands:





  
    
      
        
          L
          ⁡
          
            [
            t
            ]
          
        
        =
        
          
            ∑
            b
          
          ⁢
          
            N
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
        
      
    
    
      
        (
        11
        )
      
    
  




For the purposes of adjusting the audio signal, one may wish to compute a wideband gain g[t], which when multiplied by the audio signal makes the loudness of the adjusted audio equal to some desired target loudness, {circumflex over (L)}[t], as measured by the described psychoacoustic technique. The target loudness {circumflex over (L)}[t] may be computed in a variety of ways. For example, in the case of a volume control it may be computed as a fixed scaling of the original loudness L[t]. Alternatively, more sophisticated functions of the loudness L[t] may be used, such as an Automatic Gain Control (AGC) or Dynamic Range Control (DRC). Regardless of how {circumflex over (L)}[t] is computed, the corresponding gain g[t] is computed in the same way. Letting the function FL represent the transformation from excitation to loudness such that

L[t]=FL{E[b,t]}  (12a)

the gain g[t] is computed such that

{circumflex over (L)}[t]=FL{g[t]E[b,t]}  (12b)

Rearranging (12a-b), one arrives at the solution





  
    
      
        
          g
          ⁡
          
            [
            t
            ]
          
        
        =
        
          
            
              
                F
                L
                
                  -
                  1
                
              
              ⁢
              
                {
                
                  
                    s
                    ⁡
                    
                      [
                      t
                      ]
                    
                  
                  ⁢
                  
                    L
                    ⁡
                    
                      [
                      t
                      ]
                    
                  
                
                }
              
            
            
              E
              ⁡
              
                [
                
                  b
                  ,
                  t
                
                ]
              
            
          
          ⁢
          
            
          
          ⁢
          for
          ⁢
          
            
          
          ⁢
          any
          ⁢
          
            
          
          ⁢
          b
        
      
    
    
      
        (
        
          12
          ⁢
          c
        
        )
      
    
  




where s[t] is the loudness scaling associated with {circumflex over (L)}[t] such that





  
    
      
        
          s
          ⁡
          
            [
            t
            ]
          
        
        =
        
          
            
              L
              ^
            
            ⁡
            
              [
              t
              ]
            
          
          
            L
            ⁡
            
              [
              t
              ]
            
          
        
      
    
    
      
        (
        
          12
          ⁢
          d
        
        )
      
    
  




and the inverse function FL−1 is constrained to generate an excitation that is a wideband scaling of the original excitation E[b,t]. Due to the nature of the function FL (a non-linearity applied to each band followed by a summation across bands), a closed form solution for the inverse function FL−1 does not exist. Instead, an iterative technique described in said WO 2004/111994 A2 application may be used to solve for the gain g[t].

Rather than compute a wideband gain g[t] to modify the audio, one may instead compute a multiband gain g[b,t] which when applied to the original audio results in a modified audio signal whose specific loudness is substantially equal to some desired target specific loudness {circumflex over (N)}[b,t]. By computing a multiband gain instead of a wideband gain, control of the perceived spectral balance, or timbre, of the audio may be achieved. For example, with a volume control, the target specific loudness may be computed as a band-independent scaling of the original specific loudness N[b,t], thereby preserving the original timbre of the audio as the volume is changed. In said PCT/US2005/038579 application, a variety of other techniques for computing {circumflex over (N)}[b,t] as a function of N[b,t] are described, including AGC, multiband DRC, and Dynamic EQ (DEQ). Letting the function FN represent the transformation from excitation to specific loudness such that

N[b,t]=FN{E[b,t]}  (13a)

the gain g[b,t] is computed such that

{circumflex over (N)}[b,t]=FN{g[b,t]E[b,t]}  (13b)

Rearranging (13a-b), one arrives at the solution





  
    
      
        
          g
          ⁡
          
            [
            
              b
              ,
              t
            
            ]
          
        
        =
        
          
            
              F
              N
              
                -
                1
              
            
            ⁢
            
              {
              
                
                  s
                  ⁡
                  
                    [
                    
                      b
                      ,
                      t
                    
                    ]
                  
                
                ⁢
                
                  N
                  ⁡
                  
                    [
                    
                      b
                      ,
                      t
                    
                    ]
                  
                
              
              }
            
          
          
            E
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
        
      
    
    
      
        (
        
          13
          ⁢
          c
        
        )
      
    
  




where s[b,t] is the specific loudness scaling associated with {circumflex over (N)}[b,t] such that





  
    
      
        
          s
          ⁡
          
            [
            
              b
              ,
              t
            
            ]
          
        
        =
        
          
            
              N
              ^
            
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
          
            N
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
        
      
    
    
      
        (
        
          13
          ⁢
          d
        
        )
      
    
  




In said PCT/US2005/038579 application, several techniques for computing FN−1 in (12c) are described, including a closed form expression, a lookup table, and iterative search.
Consider now a multichannel audio signal xc[n], c=1 . . . C, from which an excitation Ec[b,t] may be computed for each channel c. A total excitation Em[b,t] for the multichannel signal may be computed by summing all the channel excitations:




  
    
      
        
          
            E
            m
          
          ⁡
          
            [
            
              b
              ,
              t
            
            ]
          
        
        =
        
          
            ∑
            
              c
              =
              1
            
            C
          
          ⁢
          
            
              E
              c
            
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
        
      
    
    
      
        (
        
          14
          ⁢
          a
        
        )
      
    
  




and a corresponding total loudness and specific loudness may be computed from the total excitation according to:

Lm[t]=FL{Em[b,t]}  (14b)

Nm[b,t]=FN{Em[b,t]}  (14c)

Likewise the loudness and specific loudness of each individual channel may be computed from each channel excitation:

Lc[t]=FL{Ec[b,t]}  (15a)

Nc[b,t]=FN{Ec[b,t]}  (15b)

Now suppose that one wishes to modify the multichannel audio signal so that either the total loudness Lm[t] is scaled by sm[t] or the total specific loudness Nm[b,t] is scaled by sm[b,t]. In the first case, one may solve for a wideband gain gm[t] such that

sm[t]Lm[t]=FL{gm[t]Em[b,t]}  (16a)

and in the second case solve for a multiband gain gm[b,t] such that

sm[b,t]Nm[b,t]=FN{gm[b,t]Em[b,t]}  (16b)

In both cases the same gain is then applied to all channels c, but as discussed earlier, this may result is a distortion of the perceived spatial balance of the multichannel signal. In order to preserve the spatial balance, one may instead compute gains gc[t] or gc[b,t] for each channel such that each individual channel loudness or specific loudness is scaled by the desired amount:

sm[t]Lc[t]=FL{gc[t]Ec[b,t]}  (17a)

sm[b,t]Nc[b,t]=FN{gc[b,t]Ec[b,t]}  (17b)

This way, the relative loudness or specific loudness between all channels is preserved. However, when these gains gc[t] or gc[b,t] are applied to the corresponding channels of the original multichannel audio, the total loudness of the resulting modified multichannel audio signal may not exactly equal the total loudness of the original multichannel audio signal scaled by the desired amount. More specifically,




  
    
      
        
          
            
              
                s
                m
              
              ⁡
              
                [
                t
                ]
              
            
            ⁢
            
              
                L
                m
              
              ⁡
              
                [
                t
                ]
              
            
          
          ≠
          
            
              F
              L
            
            ⁢
            
              {
              
                
                  ∑
                  
                    c
                    =
                    1
                  
                  C
                
                ⁢
                
                  
                    
                      g
                      c
                    
                    ⁡
                    
                      [
                      t
                      ]
                    
                  
                  ⁢
                  
                    
                      E
                      c
                    
                    ⁡
                    
                      [
                      
                        b
                        ,
                        t
                      
                      ]
                    
                  
                
              
              }
            
          
        
        ⁢
        
          

        
        ⁢
        and
      
    
    
      
        (
        
          18
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            
              s
              m
            
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
          ⁢
          
            
              N
              m
            
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
        
        ≠
        
          
            F
            N
          
          ⁢
          
            {
            
              
                ∑
                
                  c
                  =
                  1
                
                C
              
              ⁢
              
                
                  
                    g
                    c
                  
                  ⁡
                  
                    [
                    
                      b
                      ,
                      t
                    
                    ]
                  
                
                ⁢
                
                  
                    E
                    c
                  
                  ⁡
                  
                    [
                    
                      b
                      ,
                      t
                    
                    ]
                  
                
              
            
            }
          
        
      
    
    
      
        (
        
          18
          ⁢
          b
        
        )
      
    
  




In many cases, the two sides of Eqns. 18a and 18b will be nearly equal and therefore for some applications the resulting error may be ignored. For the best results, however, one may compute a correction gain G[t] or G[b,t] applied to all channels such that




  
    
      
        
          
            
              
                s
                m
              
              ⁡
              
                [
                t
                ]
              
            
            ⁢
            
              
                L
                m
              
              ⁡
              
                [
                t
                ]
              
            
          
          =
          
            
              F
              L
            
            ⁢
            
              {
              
                
                  G
                  ⁡
                  
                    [
                    t
                    ]
                  
                
                ⁢
                
                  
                    ∑
                    
                      c
                      =
                      1
                    
                    C
                  
                  ⁢
                  
                    
                      
                        g
                        c
                      
                      ⁡
                      
                        [
                        t
                        ]
                      
                    
                    ⁢
                    
                      
                        E
                        c
                      
                      ⁡
                      
                        [
                        
                          b
                          ,
                          t
                        
                        ]
                      
                    
                  
                
              
              }
            
          
        
        ⁢
        
          

        
        ⁢
        and
      
    
    
      
        (
        
          19
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            
              s
              m
            
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
          ⁢
          
            
              N
              m
            
            ⁡
            
              [
              
                b
                ,
                t
              
              ]
            
          
        
        =
        
          
            F
            N
          
          ⁢
          
            {
            
              
                G
                ⁡
                
                  [
                  
                    b
                    ,
                    t
                  
                  ]
                
              
              ⁢
              
                
                  ∑
                  
                    c
                    =
                    1
                  
                  C
                
                ⁢
                
                  
                    
                      g
                      c
                    
                    ⁡
                    
                      [
                      
                        b
                        ,
                        t
                      
                      ]
                    
                  
                  ⁢
                  
                    
                      E
                      c
                    
                    ⁡
                    
                      [
                      
                        b
                        ,
                        t
                      
                      ]
                    
                  
                
              
            
            }
          
        
      
    
    
      
        (
        
          19
          ⁢
          b
        
        )
      
    
  




This way the desired total loudness scaling may be achieved. In most cases, the correction gain G[t] or G[b,t] is small, and therefore the spatial balance of the multichannel signal is largely preserved.
In FIGS. 4a-4f are depicted plots of the specific loudness and multiband gains for the modification of a multichannel audio signal consisting of five channels: left, center, right, left-surround, and right-surround. This particular audio signal is dominated by dialogue in the center channel, with the remaining four channels containing ambience signals of a much lower level used to convey to the impression of being in a large hall. For this particular case, the multiband gains gm[b,t] and gc[b,t] (c=1 . . . 5) are computed in order to achieve a specific loudness scaling of sm[b,t]=0.16 for all bands b. Examining the center channel (c=2) in FIG. 4b, one notes that the two specific loudness spectra resulting from the application of the same gain for all channels gm[b,t] and the channel-specific gain g2[b,t] are nearly identical. This is because the center channel contains the vast majority of the signal energy, and therefore computation of gm[b,t] from the combined excitation Em[b,t] is influenced mainly by this channel. Examining the remaining channels, however, one notes a large discrepancy between the two specific loudness spectra resulting from the application of gm[b,t] and gc[b,t]. In these cases, because the signals are so small in comparison to the center channel, application of gm[b,t] results in a modified specific loudness that is far smaller than the desired scaling of 0.16. For many bands, the modified specific loudness falls below the threshold of hearing. This is most evident in the left and right surround channels (c=4 and 5). Application of gc[b,t], on the other hand, results in the desired specific loudness scaling. In FIG. 4f is depicted the specific loudness of all channels combined after the application of gm[b,t] to all channels and of gc[b,t] to each respective channel. One notes that, in the first case, the modified specific loudness is equal to the original combined specific loudness scaled by the desired amount, as expected. Application of gc[b,t] to each respective channel results in a modified specific loudness that is close to this result, but a small error exists at the lower and higher bands. This error is eliminated through the further application of the correction gain G[b,t], which is close to zero dB for most bands b. The average absolute value of G[b,t] across bands is 0.6 dB, and the maximum absolute value of G[b,t] is only 3.7 dB. Returning to FIGS. 4a-4e, one notes that the application of the correction gain has only a minor effect on the modified specific loudness of each individual channel.
Implementation
The invention may be implemented in hardware or software, or a combination of both (e.g., programmable logic arrays). Unless otherwise specified, algorithms and processes included as part of the invention are not inherently related to any particular computer or other apparatus. In particular, various general-purpose machines may be used with programs written in accordance with the teachings herein, or it may be more convenient to construct more specialized apparatus (e.g., integrated circuits) to perform the required method steps. Thus, the invention may be implemented in one or more computer programs executing on one or more programmable computer systems each comprising at least one processor, at least one data storage system (including volatile and non-volatile memory and/or storage elements), at least one input device or port, and at least one output device or port. Program code is applied to input data to perform the functions described herein and generate output information. The output information is applied to one or more output devices, in known fashion.
Each such program may be implemented in any desired computer language (including machine, assembly, or high level procedural, logical, or object oriented programming languages) to communicate with a computer system. In any case, the language may be a compiled or interpreted language.
Each such computer program is preferably stored on or downloaded to a storage media or device (e.g., solid state memory or media, or magnetic or optical media) readable by a general or special purpose programmable computer, for configuring and operating the computer when the storage media or device is read by the computer system to perform the procedures described herein. The inventive system may also be considered to be implemented as a computer-readable storage medium, configured with a computer program, where the storage medium so configured causes a computer system to operate in a specific and predefined manner to perform the functions described herein. A number of embodiments of the invention have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the invention. For example, some of the steps described herein may be order independent, and thus can be performed in an order different from that described.

## Claims

1. A method for processing an audio signal having at least a first channel and a second channel, the method comprising:
determining a first gain to scale a loudness of the first channel from a first loudness to a second loudness, each of the first loudness and the second loudness being a respective value of a nonlinear function of a power of the first channel; and
determining a second gain to scale a loudness of the second channel from a third loudness to a fourth loudness, each of the third loudness and the fourth loudness being a respective value of a nonlinear function of a power of the second channel;
wherein the first gain and the second gain are selected so that a first ratio between the second loudness and the first loudness equals a second ratio between the fourth loudness and the third loudness;
where the method is performed by one or more computing devices.

2. The method of claim 1, wherein the first channel is a front channel and the second channel is a surround channel.

3. The method of claim 1, wherein a spatial balance between the first channel and the second channel is substantially maintained.

4. The method of claim 1, wherein the first gain and the second gain is a multi-band gain.

5. The method of claim 1, wherein the first gain and the second gain is a wide-band gain.

6. The method of claim 1, wherein the first loudness, the second loudness, the third loudness, and the fourth loudness represent perceived loudness.

7. An apparatus for processing an audio signal having a first channel and a second channel, the apparatus comprising:
a subsystem, implemented at least partially in hardware that determines a first gain to scale a loudness of the first channel from a first loudness to a second loudness, each of the first loudness and the second loudness being a respective value of a nonlinear function of a power of the first channel; and
a subsystem, implemented at least partially in hardware that determines a second gain to scale a loudness of the second channel from a third loudness to a fourth loudness, each of the third loudness and the fourth loudness being a respective value of a nonlinear function of a power of the second channel;
wherein the first gain and the second gain are selected so that a first ratio between the second loudness and the first loudness equals a second ratio between the fourth loudness and the third loudness.

8. The apparatus of claim 7, wherein the first channel is a front channel and the second channel is a surround channel.

9. The apparatus of claim 7, wherein a spatial balance between the first channel and the second channel is substantially maintained.

10. The apparatus of claim 7, wherein the first gain and the second gain is a multi-band gain.

11. The apparatus of claim 7, wherein the first gain and the second gain is a wide-band gain.

12. The apparatus of claim 7, wherein the first loudness, the second loudness, the third loudness, and the fourth loudness represent perceived loudness.

13. A non-transitory computer readable medium, storing software instructions for processing an audio signal having a first channel and a second channel, which when executed by one or more processors cause performance of the steps of:
determining a first gain to scale a loudness of the first channel from a first loudness to a second loudness, each of the first loudness and the second loudness being a respective value of a nonlinear function of a power of the first channel; and
determining a second gain to scale a loudness of the second channel from a third loudness to a fourth loudness, each of the third loudness and the fourth loudness being a respective value of a nonlinear function of a power of the second channel;
wherein the first gain and the second gain are selected so that a first ratio between the second loudness and the first loudness equals a second ratio between the fourth loudness and the third loudness.

14. The non-transitory computer readable medium of claim 13, wherein the first channel is a front channel and the second channel is a surround channel.

15. The non-transitory computer readable medium of claim 13, wherein a spatial balance between the first channel and the second channel is substantially maintained.

16. The non-transitory computer readable medium of claim 13, wherein the first gain and the second gain is a multi-band gain.

17. The non-transitory computer readable medium of claim 13, wherein the first gain and the second gain is a wide-band gain.

18. The non-transitory computer readable medium of claim 13, wherein the first loudness, the second loudness, the third loudness, and the fourth loudness represent perceived loudness.