Skip to main content

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.

Metadata

Release files for PALA 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PALA 0.2.0
File Size Uploaded
pala-0.2.0.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PALA 0.2.0
File Interpreter ABI Platform
pala-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 26.0 kB

Release files / pala-0.2.0.tar.gz

Download URL pala-0.2.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
891ab22546003940638e8a8e6ad313428d665d9dc33f08745386166512ba3ed1
BLAKE2b-256 checksum
How to use checksums
091b73891e807fef13bed108e426bbf13e00eb4e85904513b48afe13a7d7b88b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / pala-0.2.0-py3-none-any.whl

Download URL pala-0.2.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2a96775438247d00d1a33b72c56326ba7b38c28b1773ab4abfc23fb8d6d17a3
BLAKE2b-256 checksum
How to use checksums
2d21a588ff39b7d53a62ea397316b211f892f7da8dc97c1f388ccdaec215007d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page