THE AUDITORY MODELING TOOLBOX

Applies to version: 1.1.0

View the code

Go to function

GLASBERG2002 - Loudness model for time-variant signals

Usage

[results] = glasberg2002(inSig,fs);

Input parameters

inSig monaural input signal
fs sampling frequency [Hz]

Output parameters

results output struct containing the long-term and short-term loudness

Description

Optional parameters:

'fs',fs model-internal sampling frequency [Hz]; it is strongly recommended to use the default of 32000 Hz
'flow',flow lowest frequency at which to evaluate the outer/middle ear transfer function
'fhigh',fhigh highest frequency at which to evaluate the outer/middle ear transfer function
'order',order order of the FIR filter used for deriving the outer/middle ear transfer function
'fftLen',fftLen length of the fft used for preprocessing the inputSignal
'vLimitingIndices',vLimitingIndices
 vector [1 x 5] containing boundaries [Hz] at which to separate the inputSignal during frequency analysis
'hannLenMs',hannLenMs
 vector [1 x 5] containing the size [ms] of the windows used for frequency analysis of the inputSignal
'timeStep',timeStep integration duration for short-term loudness [s]
'compensationtype' flag; specifies the outer/middle ear transfer function. Can be 'tfOuterMiddle1997','tfOuterMiddle2007', or 'specLoud'

This code calculates the excitation patterns, the long-term and short-term loudness.

Example:

fs = 32000; t = linspace(0,1,fs); sig = sin(2*pi*1000*t).'; inSig = scaletodbspl(sig,100);

Note that currently fs must be 32000 Hz.

References:

B. R. Glasberg and B. C. J. Moore. A Model of Loudness Applicable to Time-Varying Sounds. J. Audio Eng. Soc, 50(5):331--342, 2002. [ http ]

B. C. J. Moore, B. R. Glasberg, and T. Baer. A Model for the Prediction of Thresholds, Loudness, and Partial Loudness. J. Audio Eng. Soc, 45(4):224--240, 1997. [ http ]