|
1 | | -# PALA |
2 | | - Python Audio Loudness Analysis |
| 1 | +# PALA – Python Audio Loudness Analysis |
| 2 | + |
| 3 | +PALA is a modular Python package for measuring audio loudness according to the ITU-R BS.1770-5 standard.\ |
| 4 | +It provides LUFS (I/S/M), True Peak, RMS, DR and LRA calculations with K-weighting and gating. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## 🍇 Purpose |
| 9 | + |
| 10 | +The aim of PALA is to offer a unified, open-source loudness analysis tool for: |
| 11 | + |
| 12 | +- mastering and post-production engineers |
| 13 | +- researchers in psychoacoustics and signal processing |
| 14 | +- developers building automated workflows |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## 🏢 Installation |
| 19 | + |
| 20 | +```bash |
| 21 | +pip install pala |
| 22 | +``` |
| 23 | + |
| 24 | +Or from source: |
| 25 | + |
| 26 | +```bash |
| 27 | +git clone https://github.com/HBB-ThinkTank/PALA.git |
| 28 | +cd PALA |
| 29 | +pip install . |
| 30 | +``` |
| 31 | + |
| 32 | +--- |
| 33 | + |
| 34 | +## 🧠 Features (v0.2.0) |
| 35 | + |
| 36 | +- ✅ LUFS calculation (Integrated, Short-Term, Momentary) |
| 37 | +- ✅ True Peak (with oversampling), Sample Peak |
| 38 | +- ✅ RMS (AES and ITU-R variants) |
| 39 | +- ✅ DR (Dynamic Range), Crest Factor, Headroom |
| 40 | +- ✅ Loudness Range (LRA using 10–95 percentile) |
| 41 | +- ✅ Chunked processing for large audio files |
| 42 | +- ✅ Modular structure with `lufs`, `dynamics`, `utils`, `io` |
| 43 | + |
| 44 | +--- |
| 45 | + |
| 46 | +## 📊 Development Roadmap |
| 47 | + |
| 48 | +### Equal-Loudness Curves (Fletcher-Munson) |
| 49 | + |
| 50 | +- 🛠️ **Integration into frequency weighting** |
| 51 | +- 🛠️ **Application to LUFS evaluation** |
| 52 | + |
| 53 | +### Frequency Analysis |
| 54 | + |
| 55 | +- 🛠️ **FFT or Bark/octave band analysis** |
| 56 | +- 🛠️ **Loudness per frequency band** |
| 57 | + |
| 58 | +### LRA (Loudness Range) |
| 59 | + |
| 60 | +- ✅ **LRA based on LUFS segments (10–95 percentile)** |
| 61 | +- 🛠️ **Interchannel gating / hysteresis** |
| 62 | + |
| 63 | +### LUFS Calculation (ITU-R BS.1770) |
| 64 | + |
| 65 | +- ✅ **Momentary LUFS (400ms)** |
| 66 | +- ✅ **Short-Term LUFS (3s)** |
| 67 | +- ✅ **Integrated LUFS** |
| 68 | +- ✅ **Gating: Absolute (-70 LUFS)** |
| 69 | +- ✅ **Gating: Relative (-10 LU below average level)** |
| 70 | +- ✅ **Multichannel weighting (e.g. 1.0, 1.41)** |
| 71 | +- 🛠️ **Comparison with reference tools (e.g. pyloudnorm, ffmpeg)** |
| 72 | +- 🛠️ **Validation using ITU-R BS.2217 material** |
| 73 | + |
| 74 | +### Package Structure & Interfaces |
| 75 | + |
| 76 | +- ✅ **Modular package with analysis/lufs/dynamics/utils/io** |
| 77 | +- ✅ **Chunking support for large files** |
| 78 | +- ✅ **CLI support for single file input** |
| 79 | +- 🛠️ **CLI batch mode** |
| 80 | +- 🛠️ **Plot output (e.g. LUFS-M time curve)** |
| 81 | + |
| 82 | +### True Peak / Peak / RMS / DR |
| 83 | + |
| 84 | +- ✅ **True Peak with oversampling** |
| 85 | +- ✅ **Sample Peak (maximum sample value)** |
| 86 | +- ✅ **AES RMS (unweighted)** |
| 87 | +- ✅ **ITU-R RMS (K-weighted)** |
| 88 | +- ✅ **Crest Factor / Headroom** |
| 89 | +- ✅ **DR (True Peak - RMS)** |
| 90 | + |
| 91 | +### Publishing & Distribution |
| 92 | + |
| 93 | +- ✅ **setup.cfg / pyproject.toml** |
| 94 | +- ✅ **GitHub with README** |
| 95 | +- 🛠️ **Upload to PyPI (production release)** |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | +## 🔮 Status |
| 100 | + |
| 101 | +This project is in **alpha** stage. Results are close to professional tools (e.g. ffmpeg, pyloudnorm, APU plugins)\ |
| 102 | +but not yet fully validated against ITU-R BS.2217 reference material. |
| 103 | + |
| 104 | +Expect minor deviations (especially for edge cases or extreme signals). |
| 105 | + |
| 106 | +--- |
| 107 | + |
| 108 | +## 🛠️ Requirements |
| 109 | + |
| 110 | +- Python 3.8+ |
| 111 | +- numpy, scipy, soundfile, soxr, numba |
| 112 | + |
| 113 | +--- |
| 114 | + |
| 115 | +## 📄 License |
| 116 | + |
| 117 | +MIT License – free to use, modify and redistribute. |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +## 🙌 Contributions Welcome |
| 122 | + |
| 123 | +You’re invited to test, extend or improve the code – feel free to open issues or pull requests. |
| 124 | + |
0 commit comments