Method and compressor for compressing audio dynamics

09767809 · 2017-09-19

    Inventors

    Cpc classification

    International classification

    Abstract

    A method of compressing the audio dynamics of an audio signal. The method includes a step of acquiring an audio signal; a step of selecting a first instant of the audio signal; a step of calculating a plurality of partial gains corresponding, respectively, to a plurality of observation windows of the audio signal that are centered on the first instant, the width of the observation windows following a geometric progression with a rate and first term that are predefined; a step of summing the partial gains calculated in a first corrective term; and a step of applying the first corrective term to the audio signal at the first instant.

    Claims

    1. A method of compressing audio dynamics of an audio signal, said method comprising: acquiring an audio signal; selecting a first instant of the audio signal; calculating a plurality of partial gains corresponding, respectively, to a plurality of observation windows of the audio signal that are centered on said first instant, the width of said observation windows following a geometric progression with a rate and first term that are predefined; summing the partial gains calculated in a first corrective term; generating an audio signal having compressed audio dynamics by applying the first corrective term to the audio signal at said first instant; and outputting the audio signal having compressed audio dynamics, wherein the outputting the audio signal having compressed audio dynamics protects a listener from high sound intensities in the acquired audio signal.

    2. The method according to claim 1, further comprising: selecting a second instant of the audio signal, the duration between the first instant and the second instant being substantially equal to the integration time of the human ear; calculating a plurality of partial gains corresponding, respectively, to a plurality of observation windows of the audio signal centered on said second instant, the width of said observation windows following said geometric progression; summing the partial gains calculated in a second corrective term; and applying the second corrective term to the audio signal at said second instant.

    3. The method according to claim 2, wherein the observation window is defined by the temporal window [t.sub.i−2.sup.n−1, t.sub.i−2.sup.n+1 [ centered on the instant t.sub.i, t.sub.i being the first instant or the second instant, so that the rate and the first term of said geometric progression are, respectively, equal to two and to the period of time between said first instant and said second instant.

    4. The method according to claim 2, wherein said period of time between said first instant and said second instant is substantially equal to 10 milliseconds.

    5. The method according to claim 1, further comprising: calculating a variable gain ranging linearly from said first corrective term to said second corrective term; and applying said variable gain to the audio signal over the period of time between said first instant and said second instant.

    6. The method according to claim 1, wherein the partial gain is calculated as follows: G i , n = ( L 0 - L i , n ) R n - 1 R n where G.sub.i,n is the partial gain at an instant t.sub.i and at an observation window of order n of said geometric progression, t.sub.i being said first or said second instant; L.sub.i,n is the level in decibels of the average energy of the audio signal in said observation window; L.sub.0 is the nominal level in decibels of the audio signal; and R.sub.n is a predefined compression rate to be applied to the observation window of order n.

    7. A non-transitory computer readable medium storing a program causing a computer to execute a method for compressing audio dynamics of an audio signal, the method comprising: acquiring an audio signal; selecting a first instant of the audio signal; calculating a plurality of partial gains corresponding, respectively, to a plurality of observation windows of the audio signal that are centered on said first instant, the width of said observation windows following a geometric progression with a rate and first term that are predefined; summing the partial gains calculated in a first corrective term; generating an audio signal having compressed audio dynamics by applying the first corrective term to the audio signal at said first instant; and outputting the audio signal having compressed audio dynamics, wherein the outputting the audio signal having compressed audio dynamics protects a listener from high sound intensities in the acquired audio signal.

    8. The non-transitory computer readable medium according to claim 7, further comprising: selecting a second instant of the audio signal, the duration between the first instant and the second instant being substantially equal to the integration time of the human ear; calculating a plurality of partial gains corresponding, respectively, to a plurality of observation windows of the audio signal centered on said second instant, the width of said observation windows following said geometric progression; summing the partial gains calculated in a second corrective term; and applying the second corrective term to the audio signal at said second instant.

    9. The non-transitory computer readable medium according to claim 8, wherein the observation window is defined by the temporal window [t.sub.i−2.sup.n−1, t.sub.i−2.sup.n+1 [centered on the instant t.sub.i, t.sub.i being the first instant or the second instant, so that the rate and the first term of said geometric progression are, respectively, equal to two and to the period of time between said first instant and said second instant.

    10. The non-transitory computer readable medium according to claim 8, wherein said period of time between said first instant and said second instant is substantially equal to 10 milliseconds.

    11. The non-transitory computer readable medium according to claim 7, further comprising: calculating a variable gain ranging linearly from said first corrective term to said second corrective term; and applying said variable gain to the audio signal over the period of time between said first instant and said second instant.

    12. The non-transitory computer readable medium according to claim 7, wherein the partial gain is calculated as follows: G i , n = ( L 0 - L i , n ) R n - 1 R n where G.sub.i,n is the partial gain at an instant t.sub.i and at an observation window of order n of said geometric progression, t.sub.i being said first or said second instant; L.sub.i,n is the level in decibels of the average energy of the audio signal in said observation window; L.sub.0 is the nominal level in decibels of the audio signal; and R.sub.n is a predefined compression rate to be applied to the observation window of order n.

    Description

    (1) Other objects and advantages of the invention will be seen from the description of embodiments, provided hereinafter with reference to the appended drawings in which:

    (2) FIG. 1 illustrates an audio signal cut into regular frames;

    (3) FIG. 2 illustrates observation windows of the audio signal;

    (4) FIG. 3 illustrates a method of calculating the gain curve of an audio compressor;

    (5) FIG. 4 illustrates an audio compressor.

    (6) Displayed in FIG. 1 is an audio signal 1 cut into frames of a constant duration T.sub.0 (i.e., in regular time fragments or frames of a duration T.sub.0).

    (7) Said frames are indexed by the instants t.sub.i=i.Math.T.sub.0. A frame of the audio signal 1 corresponds to the segment ranging from the instant t.sub.i to the instant t.sub.i+1.

    (8) Preferably, the duration T.sub.0 of a temporal frame of the audio signal 1 is on the order of the integration time of the human ear (from 10 to 100 milliseconds). In one embodiment, T.sub.0 is on the order of tens of milliseconds such as 5 ms, 10 ms, 20 ms or 30 ms.

    (9) With reference to FIG. 2, a corrective term S.sub.i defined as follows, is associated with each instant t.sub.i:

    (10) S i = .Math. n = 1 N G i , n
    where G.sub.i,n is a partial gain corresponding to an observation window of order n around the instant t.sub.i. N is a predefined natural whole number.

    (11) In other words, the corrective term S.sub.i is obtained by the sum of a series of partial gains G.sub.i,n corresponding to different observation windows centered on the instant t.sub.i and of different width.

    (12) An observation window of order n around the instant t.sub.i is defined by the temporal window [t.sub.i−2.sup.n−1, t.sub.i−2.sup.n+1 [(see FIG. 2). In this temporal window, the partial gain G.sub.i,n of order n around the instant t.sub.i is defined by the following equation:

    (13) G i , n = ( L 0 - L i , n ) R n - 1 R n
    where L.sub.i,n is the level in decibels of the average energy of the audio signal 1 in the temporal window concerned [t.sub.i−2.sup.n−1, t.sub.i−2.sup.n+1[; L.sub.0 is the nominal level in decibels of the audio signal 1; and R.sub.n is a predefined compression rate to apply to the observation window of order n.

    (14) The result is that, for a given temporal window [t.sub.i−2.sup.n−1, t.sub.i−2.sup.n+1 [, the partial gain G.sub.i,n is a function of the difference measured between the average energy L.sub.i,n of the signal over the width of said window and the nominal level L.sub.0 of the audio signal.

    (15) Moreover, it should be noted that the width of the observation windows (2T.sub.0, . . . , 2.sup.n−1T.sub.0, . . . , 2.sup.N−1T.sub.0) (see FIG. 2) follows a geometric progression up to an order N. The value of N is chosen in such a way as to best preserve the sensation of the dynamics of the audio signal. In one embodiment, N is equal to 10.

    (16) Advantageously, the use of observation windows, the width of which varies according to a geometric progression, makes it possible to limit the pumping effects and sharp variation of the compression.

    (17) Thus, the partial gains G.sub.i,n corresponding to N observation windows, the width of which follows a geometric progression with a rate of two and first term T.sub.0, are summed to obtain the corrective term S.sub.i associated with the instant t.sub.i of the audio signal 1.

    (18) Since the calculation of the corrective terms S.sub.i uses observation windows centered on the instant t.sub.i, and thus requires segments of the audio signal before and after the instant t.sub.i, it is assumed that at the beginning of the audio signal (t.sub.i=0), as well as at the end thereof, the audio segments thereof are equal to the nominal level L.sub.0.

    (19) A variable gain ranging linearly (see FIG. 3) from the corrective term S.sub.i (corresponding to the instant t.sub.i) to the corrective term S.sub.i+1 (corresponding to the instant t.sub.i+1) is applied to the audio signal 1 in the temporal window [t.sub.i, t.sub.i+1 [. The result is that, between the instants t.sub.i and t.sub.i+1, the elemental segment of the audio signal 1 receives a gain ranging linearly from the one-time corrective term S.sub.i (corresponding to the instant t.sub.i) to the corrective term S.sub.i+1 (corresponding to the instant t.sub.i+1).

    (20) In other words, the gain curve in decibels to apply to the audio signal in the window [t.sub.i, t.sub.i+1 [takes the following form:

    (21) S ( t ) = S i + 1 - S i T 0 t + t i + 1 S i - t i S i + 1 T 0

    (22) Thus, the calculation of the corrective terms S.sub.i at the different instants t.sub.i makes it possible to obtain the gain curve to apply to the input audio signal. The resulting correction curve is piecewise linear, meaning that it changes linearity (or slope) at the instants t.sub.i.

    (23) In order to reduce the differences in sound levels within the audio signal 1 around a nominal level L.sub.0, said gain curve is applied to the input audio signal. The amplitude of the audio signal at a given instant t is multiplied by the value of the corrective term S(t) at said instant of the gain curve.

    (24) Thus, the audio compressor acts variably in the time t on the input audio signal depending on the sound level of the signal at each instant and the corrective term of the gain curve at said instant. For sound levels that are near the nominal level, the output value remains nearly unchanged (slope of the gain curve close to 1). Otherwise, beginning at a certain sound level, a corrective term is applied (slope of the gain curve different from 1).

    (25) With reference to FIG. 4, the audio compressor 2 uses, as data, a given compression rate R.sub.n for each window of order n, duration T.sub.0 and number N of observation windows, for the compression of the dynamics of the input audio signal 1. The application of the gain curve, calculated by the audio compressor 2, to the input audio signal 1, gives in output an audio signal 3, the dynamics of which are compressed.

    (26) Advantageously, a plurality of dynamic ranges of the audio signal can be processed with different compression rates.

    (27) Advantageously, the dynamics compression method described above can be implemented in software form (as a plug-in or application, for example) or hardware in a console, an external rack or a sound processing digital workstation.