Main Content

rt60

Estimate decay time of room impulse response

Since R2025a

    Description

    rtsummary = rt60(rir,fs) returns a table describing the amount of time for the reverberation energy of the room impulse response to decay 60 dB (RT-60). The function estimates the decay time in each octave band according to the ISO-3382 standard [2][3]. The returned table also contains metrics described in ISO-3382 such as the curvature, C50 (speech clarity), C80 (music clarity), D50 (definition), and Ts (center time).

    example

    rtsummary = rt60(rir,fs,Name=Value) specifies options using one or more name-value arguments.

    example

    rt60(___) without any output arguments plots the reverberation time metrics for each octave band. You can select the octave bands in the plot to see the impulse response power and energy decay curve in each band.

    example

    Examples

    collapse all

    Read in a room impulse response for the interior of a church from a file.

    [rir,fs] = audioread("ChurchImpulseResponse-16-44p1-mono-5secs.wav");

    Call rt60 with the impulse response to get a table containing the RT-60 metrics for each octave center frequency.

    metrics = rt60(rir,fs)
    metrics=6×11 table
        CenterFrequencies     EDT       T20       T30       Topt              DegreeOfNonLinearity              Curvature      C50          C80        D50         Ts   
        _________________    ______    ______    ______    ______    _______________________________________    _________    ________    _________    ______    ________
    
               125           6.0856       NaN       NaN    6.2365    7.3997      2.438      2.438     1.7044         NaN      -6.0616      -4.8223    19.849     0.44521
               250           6.0207    6.4347    6.7053    6.4347    5.1429    0.58978     1.0775    0.58978      4.2059      -6.9081      -4.8076    16.929     0.40977
               500           5.3181    6.0276    6.0413    5.9859    3.0841    0.77807    0.49503     0.3772     0.22695      -2.9446       -2.438     33.67       0.319
              1000           4.7896    5.3202    5.5298    5.3276    5.4525    0.26611    0.89927     0.2395      3.9388     -0.66439    -0.039779    46.183     0.22816
              2000           4.0822    4.4473    4.5732    4.3312    14.253    0.64798    0.53592    0.30591      2.8315       1.6968       2.2301    59.645     0.15107
              4000           2.9998    3.3613    3.5392    3.2139    53.436     1.5334     1.6486    0.40026      5.2938       3.8169       4.4364    70.659    0.087573
    
    

    Call rt60 with no output arguments to plot the RT-60 metrics for each octave band. You can select the different octave bands to view the energy decay curve and linear fits in each band.

    rt60(rir,fs)

    Figure contains 2 axes objects. Axes object 1 with title RT-60, xlabel Octave Center Frequency (Hz), ylabel Time (s) contains 9 objects of type stair, line, patch. One or more of the lines displays its values using only markers These objects represent EDT, T20, T30, Topt. Axes object 2 with title Octave Center Frequency - 1000 Hz, xlabel Time (s), ylabel dB contains 6 objects of type line. These objects represent IR, EDC, EDT [0,-10] : 4.790 s, T20 [-5,-25] : 5.320 s, T30 [-5,-35] : 5.530 s, Topt [-5,-26] : 5.328 s.

    Load a room impulse response and call rt60 to compute the RT-60 metrics for one third octave bands on the range from 100 to 16,000 Hz.

    [rir,fs] = audioread("ChurchImpulseResponse-16-44p1-mono-5secs.wav");
    rt60(rir,fs,Bandwidth="1/3 octave",FrequencyRange=[100,16000])

    Figure contains 2 axes objects. Axes object 1 with title RT-60, xlabel Octave Center Frequency (Hz), ylabel Time (s) contains 9 objects of type stair, line, patch. One or more of the lines displays its values using only markers These objects represent EDT, T20, T30, Topt. Axes object 2 with title 1/3 Octave Center Frequency - 1000 Hz, xlabel Time (s), ylabel dB contains 6 objects of type line. These objects represent IR, EDC, EDT [0,-10] : 4.348 s, T20 [-5,-25] : 5.421 s, T30 [-5,-35] : 5.498 s, Topt [-5,-46] : 5.616 s.

    Call rt60 again on the same impulse response, this time modifying the octave filter bank parameters by using a higher filter order and filtering in the backward direction. See how the modifications affect the RT-60 metrics. The rt60 function throws a warning if the specified octave filter bank does not comply with the IEC 61260-1 standard.

    rt60(rir,fs, ...
        Bandwidth="1/3 octave",FilterOrder=48, ...
        FilterDirection="backward",FrequencyRange=[100,16000])

    Figure contains 2 axes objects. Axes object 1 with title RT-60, xlabel Octave Center Frequency (Hz), ylabel Time (s) contains 9 objects of type stair, line, patch. One or more of the lines displays its values using only markers These objects represent EDT, T20, T30, Topt. Axes object 2 with title 1/3 Octave Center Frequency - 1000 Hz, xlabel Time (s), ylabel dB contains 6 objects of type line. These objects represent IR, EDC, EDT [0,-10] : 4.585 s, T20 [-5,-25] : 5.574 s, T30 [-5,-35] : 5.658 s, Topt [-5,-33] : 5.614 s.

    Compute the RT-60 values of a room impulse response using the default forward filtering.

    [rir,fs] = audioread("ChurchImpulseResponse-16-44p1-mono-5secs.wav");
    bw = "1/3 octave";
    frequencyRange = [50,500];
    metrics = rt60(rir,fs,Bandwidth=bw,FrequencyRange=frequencyRange);

    According to ISO 3382-1:2009, section 7.3, for results to be reliable, BT must be greater than 16, where B is the filter bandwidth in Hz, and T is the measured reverberation time in seconds.

    To check if the results are reliable, first get the filter bandwidths. Use the octaveFilterBank getBandedgeFrequencies for a precise calculation.

    bwhz = diff(getBandedgeFrequencies(octaveFilterBank(bw,FrequencyRange=frequencyRange)));

    Check if the measurements are reliable.

    T20_isreliable = metrics.T20 .* bwhz(:) > 16;
    T30_isreliable = metrics.T30 .* bwhz(:) > 16;
    Topt_isreliable = metrics.Topt .* bwhz(:) > 16;

    Create a table indicating which results are reliable. See how the results are not reliable for the lower bandwidths for this room impulse response.

    reliableResults = table(T20_isreliable,T30_isreliable,Topt_isreliable, ...
        VariableNames=["T20","T30","Topt"], ...
        RowNames=arrayfun(@(x)num2str(x),metrics.CenterFrequencies,UniformOutput=false))
    reliableResults=10×3 table
                T20      T30     Topt 
               _____    _____    _____
    
        50     false    false    false
        63     false    false    false
        80     false    false    true 
        100    false    false    true 
        125    false    false    true 
        160    true     false    true 
        200    true     false    true 
        250    true     true     true 
        315    true     true     true 
        400    true     true     true 
    
    

    Input Arguments

    collapse all

    Room impulse response used to estimate the reverberation decay time of the acoustic space, specified as a vector of real numbers. Impulse responses are generally in the two to five second range and should include the noise floor in the end by continuing to capture after the reverberation tail has diminished beneath the noise floor. Measurements for larger spaces with lower noise floors, such as churches, require longer time captures.

    Data Types: single | double

    Sample rate of room impulse response, in Hz. The sample rate must be greater than or equal to 2000 Hz.

    Data Types: single | double

    Name-Value Arguments

    collapse all

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: rt60(ir,fs,Bandwidth="1/3 octave")

    Bandwidth of filters used to measure reverberation time, in octaves, specified as "1 octave" or "1/3 octave".

    Data Types: char | string

    Order of the octave filters, specified as a positive even integer.

    Data Types: single | double

    Frequency range of the octave filter bank in Hz, specified as a two-element row vector of increasing values in the range [20,fs/2]. The default frequency range depends on the Bandwidth. If the Bandwidth is "1 octave", the default frequency range is [125,4000]. If the Bandwidth is "1/3 octave", the default frequency range is [100,5012].

    Data Types: single | double

    Filter direction used by the octave filter bank, specified as "forward", "zero", or "backward".

    • "forward" — The function applies minimum phase filters in the standard forward direction.

    • "zero" — The function applies zero phase filters in the frequency domain.

    • "backward" — The function applies minimum phase filters on the time-reversed signal.

    Data Types: char | string

    Noise compensation method, specified as "truncate-correct" or "subtract-truncate-correct".

    • "truncate-correct" — The function uses the Lundby algorithm to estimate the noise floor and the intersection between the reverberation tail and the noise floor. The function truncates and compensates the squared impulse response according to ISO 3382-1 [2].

    • "subtract-truncate-correct" — In addition to the truncation and compensation, the function subtracts the noise floor from the squared impulse response. This method does not follow ISO 3382-1, but [4] demonstrated that this method introduced the least systematic noise of several evaluated methods.

    In both methods, the function assumes the room impulse response has at least the last 10% of its duration correspond to noise.

    Data Types: char | string

    Output Arguments

    collapse all

    Summary of the RT-60 metrics specified by ISO 3382-1 and ISO 3382-2, returned as a table with the following variables:

    • CenterFrequencies — Nominal center frequencies of the octave bands in Hz.

    • EDT — Early decay time (EDT), in seconds. The rt60 function computes the EDT by making a linear fit of the decay curve from 0 to -10 dB and extrapolating to the 60 dB decay time.

    • T20 — Reverberation time for 20 dB decay (T20), in seconds. The rt60 function computes the T20 by making a linear fit of the decay curve from -5 to -25 dB and extrapolating to the 60 dB decay time.

    • T30 — Reverberation time for 30 dB decay (T30), in seconds. The rt60 function computes the T20 by making a linear fit of the decay curve from -5 to -35 dB and extrapolating to the 60 dB decay time.

    • Topt — Optimal decay time, in seconds, based on the range of the decay curve that yields the best linear fit. The measurement begins at -5 dB and chooses the range which yields the best linear approximation while remaining 10 dB above the detected noise floor.

    • DegreeOfNonLinearity — Degree of nonlinearity, as described in ISO 3382-2, returned as an N-by-4 matrix, where N is the number of octave bands. This value describes the correlation of the linear fit to the energy decay curve. The columns of the matrix correspond to the four decay ranges analyzed: EDT, T20, T30, and Topt. According to ISO 3382-2:2008 B.2, typical values are between 0 and 5.

    • Curvature — Level of curvature, defined as 100*|T30/T20 - 1|, as defined by ISO 3382-2. According to ISO 3382-2:2008 B.3, typical values are between 0 and 5.

    • C50 — Clarity metric in dB using a 50 ms cutoff, as described in ISO 3382-1. Clarity is a measure of early to late arriving sound energy. C50 is typically used to describe speech clarity.

    • C80 — Clarity metric in dB using an 80 ms cutoff, as described in ISO 3382-1. C80 is typically used to describe music clarity.

    • D50 — Definition metric using a 50 ms cutoff, as described in ISO 3382-1. Definition is a measure of the early to total sound energy.

    • TS — Center time in seconds, as described in ISO 3382-1. Center time is the center of gravity of the squared impulse response. Center time avoids discrete division of the impulse response into early and late periods.

    For the EDT, T20, T30, and Topt metrics, if the detected noise floor does not allow 10 dB of headroom over the range, the measurement is invalid and returned as NaN.

    References

    [1] IEC 61260-1:2014. "Electroacoustics — Octave-band and fractional-octave-band filters — Part 1: Specifications." International Electrotechnical Commission.

    [2] ISO 3382-1:2009. "Acoustics — Measurement of room acoustic parameters — Part 1: Performance spaces." International Organization for Standardization.

    [3] ISO 3382-2:2008. "Acoustics — Measurement of room acoustic parameters — Part 2: Reverberation time in ordinary rooms." International Organization for Standardization.

    [4] Guski, Martin. Influences of External Error Sources on Measurements of Room Acoustic Parameters. Aachener Beiträge Zur Technischen Akustik, Band 24. Berlin: Logos Verlag Berlin GmbH, 2015.

    Version History

    Introduced in R2025a