# deeuu/loudness

> Part of [LISQM](https://zhenxianli.github.io/LISQM/) (List of Implementations of Sound Quality Metrics), a list of open-source implementations of psychoacoustic metrics. Data as of 2026-10-28. Web page: https://zhenxianli.github.io/LISQM/projects/deeuu-loudness.html

**Legacy project.** Not maintained. Its last commit was in August 2019, more than three years ago. Kept here for reference. Its code may follow an older edition and may not run with current software.

C++ library with SWIG Python bindings for building loudness models from cascaded processing modules. Includes Moore–Glasberg models for stationary sounds (ANSI S3.4-2007, Chen et al. 2011) and time-varying sounds (Glasberg & Moore 2002, Chen & Hu 2012), and stationary Zwicker loudness after DIN 45631:1991.

- **Repository:** https://github.com/deeuu/loudness
- **Language:** C++, Python
- **Kind:** Library/Toolbox (Functions to call from your own code: a Python package, a MATLAB toolbox, or a C, C++, C#, Rust or Julia library.)
- **Group:** legacy (Archived, or no commit for three years or more. Kept for reference. The code may follow an older edition and may not run with current software.)
- **Licence:** GPL-3.0-or-later
- **Latest release:** no release
- **Last commit:** 2019-08-08 (inactive since 2019-08)
- **GitHub stars:** 40
- **Maintainers:** Dominic Ward
- **AI assistance:** not stated
- **How to cite:** The project does not say how to cite it. Cite the repository with the version or commit you used.
- **Entry checked:** 2026-10-06

## What it implements

| Metric | Edition | Functions | Status | Validation (as stated) | Notes |
|---|---|---|---|---|---|
| [Zwicker loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-zwicker.html) | [DIN 45631:1991](https://www.dinmedia.de/en/standard/din-45631/1666531) (stationary only) | `StationaryLoudnessDIN456311991` | available | compared with GENESIS ACOUSTICS code (Python port) | Uses 28 third-octave filters with third-order Butterworth responses after ANSI S1.11:1986; there is no time-varying (DIN 45631/A1) model. |
| [Moore–Glasberg loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-moore-glasberg.html) | [Chen et al. (2011)](https://doi.org/10.1016/j.heares.2011.08.001) | `StationaryLoudnessCHGM2011` | available | own tests only | — |
| [Moore–Glasberg loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-moore-glasberg.html) | [ANSI/ASA S3.4-2007](https://webstore.ansi.org/standards/asa/ANSIASAS32007R2020) (with the binaural inhibition of Moore & Glasberg (2007) for two ears) | `StationaryLoudnessANSIS342007` | available | own tests only | — |
| [Time-varying loudness (Moore–Glasberg–Schlittenlacher)](https://zhenxianli.github.io/LISQM/metrics/loudness-moore-glasberg-time-varying.html) | [Glasberg & Moore (2002)](https://aes2.org/publications/elibrary-page/?id=11081) | `DynamicLoudnessGM2002` | available | own tests only | Per the header, excitation patterns follow ANSI S3.4-2007, and parameter sets use the modified long-term time constants of Moore et al. (2003) and the ANSI S3.4-2007 equation for specific loudness at high levels. |

## How it was validated

As reported by the project; LISQM has not run the code. Two implementations that agree can still share the same error.

- [Zwicker loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-zwicker.html), DIN 45631:1991: compared with GENESIS ACOUSTICS code (Python port)
  - Ported or adapted from BASIC program of DIN 45631 (Zwicker et al., 1991).
  - Tested against "a quick and dirty Python port of the Matlab code private by GENESIS ACOUSTICS".
- [Moore–Glasberg loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-moore-glasberg.html), Chen et al. (2011); [Time-varying loudness (Moore–Glasberg–Schlittenlacher)](https://zhenxianli.github.io/LISQM/metrics/loudness-moore-glasberg-time-varying.html), Glasberg & Moore (2002): own tests only
- [Moore–Glasberg loudness](https://zhenxianli.github.io/LISQM/metrics/loudness-moore-glasberg.html), ANSI/ASA S3.4-2007: own tests only
  - Unit tests cover each module and model.
  - A validation script writes computed and expected loudness of pure tones to CSV; the expected values are labelled "Table 7" and "Example 2" without naming their source.

## Notes

- Also includes the dynamic loudness model of Chen & Hu (2012) (`DynamicLoudnessCH2012`) and partial-loudness stages after Moore, Glasberg & Baer (1997) and Chen et al. (2011) (`SpecificPartialLoudnessMGB1997`, `SpecificPartialLoudnessCHGM2011`); neither has an entry in this list.
- The interface is modelled on AIM-C. Building needs libsndfile, FFTW and zlib; the Python bindings need SWIG 3.
- The last commit touching the source code, bindings or Python package was on 2017-06-01; the last commit (2019-08-08) updated the README.
- `swig/setup.py` names the Python package `loudness` 0.0.1, but it was never published on PyPI.

## Before you rely on it

- The README says "This project is still in heavy development so is not stable".
- The PyPI package named `loudness` is an unrelated LUFS (ITU-R BS.1770) project (iver56/loudness); this library has to be built from source.

## Sources

- https://github.com/deeuu/loudness
- https://github.com/deeuu/loudness/blob/master/README.md
- https://github.com/deeuu/loudness/tree/master/src/models
- https://github.com/deeuu/loudness/tree/master/python/tests
- https://pypi.org/project/loudness/
