Skip to main content

Python Audio Loudness Analysis

Project description

PALA – Python Audio Loudness Analysis

PALA is a modular Python package for measuring audio loudness according to the ITU-R BS.1770-5 standard.
It provides LUFS (I/S/M), True Peak, RMS, DR and LRA calculations with K-weighting and gating.


🍇 Purpose

The aim of PALA is to offer a unified, open-source loudness analysis tool for:

  • mastering and post-production engineers
  • researchers in psychoacoustics and signal processing
  • developers building automated workflows

🏢 Installation

pip install pala

Or from source:

git clone https://github.com/HBB-ThinkTank/PALA.git
cd PALA
pip install .

🧠 Features (v0.2.0)

  • ✅ LUFS calculation (Integrated, Short-Term, Momentary)
  • ✅ True Peak (with oversampling), Sample Peak
  • ✅ RMS (AES and ITU-R variants)
  • ✅ DR (Dynamic Range), Crest Factor, Headroom
  • ✅ Loudness Range (LRA using 10–95 percentile)
  • ✅ Chunked processing for large audio files
  • ✅ Modular structure with lufs, dynamics, utils, io

📊 Development Roadmap

Equal-Loudness Curves (Fletcher-Munson)

  • 🛠️ Integration into frequency weighting
  • 🛠️ Application to LUFS evaluation

Frequency Analysis

  • 🛠️ FFT or Bark/octave band analysis
  • 🛠️ Loudness per frequency band

LRA (Loudness Range)

  • LRA based on LUFS segments (10–95 percentile)
  • 🛠️ Interchannel gating / hysteresis

LUFS Calculation (ITU-R BS.1770)

  • Momentary LUFS (400ms)
  • Short-Term LUFS (3s)
  • Integrated LUFS
  • Gating: Absolute (-70 LUFS)
  • Gating: Relative (-10 LU below average level)
  • Multichannel weighting (e.g. 1.0, 1.41)
  • 🛠️ Comparison with reference tools (e.g. pyloudnorm, ffmpeg)
  • 🛠️ Validation using ITU-R BS.2217 material

Package Structure & Interfaces

  • Modular package with analysis/lufs/dynamics/utils/io
  • Chunking support for large files
  • CLI support for single file input
  • 🛠️ CLI batch mode
  • 🛠️ Plot output (e.g. LUFS-M time curve)

True Peak / Peak / RMS / DR

  • True Peak with oversampling
  • Sample Peak (maximum sample value)
  • AES RMS (unweighted)
  • ITU-R RMS (K-weighted)
  • Crest Factor / Headroom
  • DR (True Peak - RMS)

Publishing & Distribution

  • setup.cfg / pyproject.toml
  • GitHub with README
  • 🛠️ Upload to PyPI (production release)

🔮 Status

This project is in alpha stage. Results are close to professional tools (e.g. ffmpeg, pyloudnorm, APU plugins)
but not yet fully validated against ITU-R BS.2217 reference material.

Expect minor deviations (especially for edge cases or extreme signals).


🛠️ Requirements

  • Python 3.8+
  • numpy, scipy, soundfile, soxr, numba

📄 License

MIT License – free to use, modify and redistribute.


🙌 Contributions Welcome

You’re invited to test, extend or improve the code – feel free to open issues or pull requests.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pala-0.2.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pala-0.2.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file pala-0.2.0.tar.gz.

File metadata

  • Download URL: pala-0.2.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pala-0.2.0.tar.gz
Algorithm Hash digest
SHA256 891ab22546003940638e8a8e6ad313428d665d9dc33f08745386166512ba3ed1
MD5 0f7e391626c5a6b6588dab6af40b06e2
BLAKE2b-256 091b73891e807fef13bed108e426bbf13e00eb4e85904513b48afe13a7d7b88b

See more details on using hashes here.

File details

Details for the file pala-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pala-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pala-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2a96775438247d00d1a33b72c56326ba7b38c28b1773ab4abfc23fb8d6d17a3
MD5 3f2b769c4a3670d66772c1a08d4671fd
BLAKE2b-256 2d21a588ff39b7d53a62ea397316b211f892f7da8dc97c1f388ccdaec215007d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page