Codes for the rapid calculation of loudness and sharpness

Codes from Techniques for the rapid calculation of the excitation pattern in the time varying extensions to ANSI S3.4-2007

You are now following this Submission

Codes from "Techniques for the rapid calculation of the excitation pattern in the time varying extensions to ANSI S3.4-2007" implementing several methods for loudness and sharpness calculation. These codes predict the sound quality metrics loudness and sharpness using the methods described below.

Methods include:
stationaryLoudness.m: implements ANSI S3.4-2007 as well as the sharpness method cited below.
Glasberg_loudness.m: implements the methods from "A method of loudness applicable to time-varying sounds," Brian R. Glasberg, and Brian C. J. Moore. The Journal of the Audio Engineering Society, 50 (5), 331-342 (2002), http://www.aes.org/e-lib/browse.cfm?elib=11081. as well as the sharpness method cited below.
Both of these codes also implements psychoacoustic sharpness prediction methods from, "Extending sharpness calculation for an alternative loudness metric input," S. Hales Swift, and Kent L. Gee, The Journal of the Acoustical Society of America 142, EL549 (2017), doi: 10.1121/1.5016193.

A good place to start is by using testLoudness to calculate the loudness of a sinusoid. This script can be altered to consider a sound of interest. The input s is assumed to be in Pascals. Sounds need to be sampled at 32000 Hz unless you have the signal processing toolbox or another means of resampling.

Cite As

Stephen Hales Swift (2026). Codes for the rapid calculation of loudness and sharpness (https://www.mathworks.com/matlabcentral/fileexchange/73808-codes-for-the-rapid-calculation-of-loudness-and-sharpness), MATLAB Central File Exchange. Retrieved .

S. Hales Swift, and Kent L. Gee, "Techniques and example code for the rapid calculation of the excitation pattern in the time varying extensions to ANSI S3.4-2007," Proceedings of Meetings in Acoustics, 36 (XXXXXX), (2020). (forthcoming) (This is the paper to cite when describing loudness results from this implementation.) S. Hales Swift, and Kent L. Gee, "Extending sharpness calculation for an alternative loudness metric input," The Journal of the Acoustical Society of America 142, EL549 (2017); doi: https://doi.org/10.1121/1.5016193 (This is the paper to cite when describing sharpness results from this implementation.)

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.1

Fixed citation references

1.0.0