- Python 96.1%
- Dockerfile 3.9%
|
Jan Willhaus [bot]
c45ca20b45
All checks were successful
Bump version / bump-version (push) Has been skipped
Tests / pytest-ubuntu-latest-3.10 (push) Successful in 1m57s
Tests / pytest-ubuntu-latest-3.11 (push) Successful in 1m50s
Tests / pytest-ubuntu-latest-3.12 (push) Successful in 1m49s
Tests / pytest-ubuntu-latest-3.13 (push) Successful in 1m43s
Tests / pytest-ubuntu-latest-3.14 (push) Successful in 1m35s
Publish / build (push) Successful in 28s
Publish / publish (push) Successful in 30s
Docker Build / docker-build (push) Successful in 8m17s
|
||
|---|---|---|
| .forgejo/workflows | fix(ci): populate release notes body properly | |
| drmeter | build(ci): Update workflows | |
| tests | Replace black with ruff format | |
| .dockerignore | Add docker build | |
| .gitignore | Add docker build | |
| .pre-commit-config.yaml | build(ci): Update workflows | |
| CHANGELOG.md | bump: version 0.4.8 → 0.4.9 | |
| codecov.yml | build: Add codecov config | |
| Dockerfile | fix(docker): Restore docker build | |
| LICENSE | Refresh repo scaffolding | |
| pyproject.toml | bump: version 0.4.8 → 0.4.9 | |
| README.md | build(ci): Update workflows | |
| tox.toml | build(ci): Update workflows | |
| uv.lock | bump: version 0.4.8 → 0.4.9 | |
Dynamic Range (DR) meter 🎧
PyPI PyPI - Python Version PyPI - Downloads
Linter/Formatter: Ruff Code style: Black Dependency management: poetry
A Dynamic Range (DR) analyzer for audiofiles.
The algorithm has been reverse-engineered using the available information and officially endorsed software to calcuate the DR value. The analysis results of drmeter are verified to be within a ±0.5 absolute tolerance from the results produced by officially endorsed software (see #testing).
This project is in no way affiliated with the Pleasurize Music Foundation or its Dynamic Range Project.
Installation
The recommended method for using drmeter is with uv and uvx specifically:
uvx drmeter --help
Any regular pip install drmeter will do, too.
There is also a container image available at codeberg.org/janw/drmeter:
docker run --rm --tty --workdir /src -v "$PWD:/src" \
codeberg.org/janw/drmeter --output json path/to/files
Usage
See drmeter --help for usage instructions. drmeter expects a single path to a file or a directory to analyze, and defaults to an "animated" progress display, emitting the results to stdout in the process.
$ drmeter 'Nobody There (Beautiful Scars).wav'
Analyzing Dynamic Range of Nobody There (Beautiful Scars).wav ...
╭──────────────────────────────────────────────────────────────────────╮
│ DR Peak RMS Filename │
├──────────────────────────────────────────────────────────────────────┤
│ DR12 -0.10 dB -15.02 dB Nobody There (Beautiful Scars).wav │
╰──────────────────────────────────────────────────────────────────────╯
Using the --quiet/-q flag will silence most of the output and only print the calculated DR score to stdout:
$ drmeter 'Nobody There (Beautiful Scars).wav' -q
DR12
Alternatively drmeter supports a more detailed JSON-formatted output using the --output/-o json parameter, including both per-channel and totaled results. Using the --output parameter redirects the progress display to stderr, so that the formatted output can be piped to other applications or to file. If you do not require the progress display, it can be silenced using --quiet/-q here, too.
# Save a copy to file
$ drmeter -ojson -q 'Nobody There (Beautiful Scars).wav' | tee dr.json
{
"filename": "/.../Nobody There (Beautiful Scars).wav",
"dr_score": [
11.93,
11.63
],
"peak_db": [
...
]
}
# Parse JSON using jq
$ drmeter -ojson -q 'Nobody There (Beautiful Scars).wav' | jq '.[].overall_dr_score'
11.78